Get Calc or MDX Script

get

/essbase/rest/v1/applications/{applicationName}/databases/{databaseName}/scripts/{scriptName}

Returns the named calculation or MDX script from the specified application and database.

Request

Path Parameters
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

OK

Script returned successfully, including links get, edit, or delete the script and to get its contents.

Body ()
Root Schema : Script
Type: object
Show Source

400 Response

Bad Request

Failed to get the script. The application, database, or script name may be incorrect.

500 Response

Internal Server Error.

Back to Top

Examples

The following example shows how to get an Essbase calculation or MDX script.

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.

Get Calculation Script

call properties.bat
curl -X GET https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/copydata -H "accept: application/json" -u %User%:%Password%

Example of Response Body

{
  "name" : "copydata",
  "modifiedTime" : 1704734260799,
  "sizeInBytes" : 194,
  "links" : [ {
    "rel" : "get",
    "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/copydata",
    "method" : "GET"
  }, {
    "rel" : "delete",
    "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/copydata",
    "method" : "DELETE"
  }, {
    "rel" : "edit",
    "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/copydata",
    "method" : "PUT"
  }, {
    "rel" : "content",
    "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/copydata/content",
    "method" : "GET"
  } ]
}

Get MDX Script

call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/mdx001?file=mdx&links=none" -H "accept: application/json" -u %User%:%Password%

Example of Response Body

{
  "name" : "mdx001",
  "modifiedTime" : 1717699870473,
  "sizeInBytes" : 185
}
Back to Top