Add Calc Script Permissions
/essbase/rest/v1/applications/{applicationName}/databases/{databaseName}/scripts/{scriptName}/permissions
Adds permissions to the specified script for the specified user or group. Applicable only for calculation scripts.
Request
- application/json
- application/xml
-
applicationName(required): string
Application name.
-
databaseName(required): string
Database name.
-
scriptName(required): string
Script name.
User or group details.
object
-
group:
boolean
true or false. Whether the id refers to a group.
-
id:
string
User or group ID.
-
links:
array links
-
name:
string
User or group name.
-
role:
string
User or group role.
Response
- application/json
- application/xml
200 Response
Script permission added successfully.
object
-
group:
boolean
true or false. Whether the id refers to a group.
-
id:
string
User or group ID.
-
links:
array links
-
name:
string
User or group name.
-
role:
string
User or group role.
400 Response
Bad Request
Failed to add permissions for the script. The application, database, or script name may be incorrect; the user or group ID may be incorrect; or the specified user or group may not have sufficient privileges.
415 Response
Not Acceptable
The media type isn't supported or wasn't specified.
500 Response
Internal Server Error.
Examples
The following example shows how to use the Essbase REST API to give a user or group permission to execute a calc script. The user or group must be provisioned at least Database Update permission for the application.
This example uses cURL to access the REST API from a Windows shell script. The calling user's ID and password are variables whose values are set in properties.bat
.
Script with cURL Command
The following example gives user1 permission to run the calc script named actuals
against the Sample Basic cube.
call properties.bat
curl -X POST https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/actuals/permissions -H "accept: application/json" -H "Content-Type:application/json" -d '{"id": "user1"}' -u %User%:%Password%
Example of Response Body
{
"id" : "user1"
}