List Scripts

get

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

Returns calculation, MDX, MaxL, or Report Writer scripts from the specified Essbase application and cube.

To list data-load or dimension-build rules, use List or Download Files. To list drill-through reports, use Get Drill Through Reports.

Request

Path Parameters
Query Parameters
  • Type of script file to return. Valid values: calc, mdx, maxl, and report. Default value, if unspecified, is calc.

    Default Value: calc
  • Filter the list of scripts using a keyword.

Back to Top

Response

Supported Media Types

200 Response

OK

Scripts retrieved successfully, including script details and links to get, edit, or delete the script and to get its contents.

Body ()
Root Schema : schema
Type: array
Show Source
Nested Schema : ScriptList
Type: object
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : properties
Type: object
Additional Properties Allowed
Show Source
Nested Schema : Script
Type: object
Show Source

400 Response

Bad Request

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

500 Response

Internal Server Error.

Back to Top

Examples

The following examples show how to list calculation, MDX, MaxL, or report scripts for an Essbase cube.

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.

Specify links=none as a query parameter if you don't want links in the response.

Script with cURL Command – List Calc Scripts

The following example gets calculation scripts on the CalcTuple.Tuple cube.

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

Example of Response Body

Five calculation scripts are listed from the CalcTuple.Tuple cube, with useful links.

{
  "items" : [ {
    "name" : "copydata",
    "modifiedTime" : 1724111506602,
    "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"
    } ]
  }, {
    "name" : "svProductMarketPOVs",
    "modifiedTime" : 1724111506602,
    "sizeInBytes" : 634,
    "links" : [ {
      "rel" : "get",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketPOVs",
      "method" : "GET"
    }, {
      "rel" : "delete",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketPOVs",
      "method" : "DELETE"
    }, {
      "rel" : "edit",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketPOVs",
      "method" : "PUT"
    }, {
      "rel" : "content",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketPOVs/content",
      "method" : "GET"
    } ]
  }, {
    "name" : "svProductMarketTuples",
    "modifiedTime" : 1724111506602,
    "sizeInBytes" : 93,
    "links" : [ {
      "rel" : "get",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketTuples",
      "method" : "GET"
    }, {
      "rel" : "delete",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketTuples",
      "method" : "DELETE"
    }, {
      "rel" : "edit",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketTuples",
      "method" : "PUT"
    }, {
      "rel" : "content",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketTuples/content",
      "method" : "GET"
    } ]
  }, {
    "name" : "svTuplesViaRtsv",
    "modifiedTime" : 1724111506602,
    "sizeInBytes" : 411,
    "links" : [ {
      "rel" : "get",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svTuplesViaRtsv",
      "method" : "GET"
    }, {
      "rel" : "delete",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svTuplesViaRtsv",
      "method" : "DELETE"
    }, {
      "rel" : "edit",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svTuplesViaRtsv",
      "method" : "PUT"
    }, {
      "rel" : "content",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svTuplesViaRtsv/content",
      "method" : "GET"
    } ]
  }, {
    "name" : "csSyntax",
    "modifiedTime" : 1724111506602,
    "sizeInBytes" : 1064,
    "links" : [ {
      "rel" : "get",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/csSyntax",
      "method" : "GET"
    }, {
      "rel" : "delete",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/csSyntax",
      "method" : "DELETE"
    }, {
      "rel" : "edit",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/csSyntax",
      "method" : "PUT"
    }, {
      "rel" : "content",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/csSyntax/content",
      "method" : "GET"
    } ]
  } ]
}

Script with cURL Command – List MDX Scripts

The following example gets MDX scripts on the Sample.Basic cube. Links are suppressed, using the query parameter links=none.

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

Example of Response Body

Two MDX scripts are listed from the Sample.Basic cube, without links.

{
  "items" : [ {
    "name" : "mdx001",
    "modifiedTime" : 1717699870561,
    "sizeInBytes" : 185
  }, {
    "name" : "mdx002",
    "modifiedTime" : 1717699895561,
    "sizeInBytes" : 98
  } ]
}

Script with cURL Command – List MaxL Scripts

The following example gets MaxL scripts on the Sample.Basic cube. Links are suppressed, using the query parameter links=none.

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

Example of Response Body


{
  "items" : [ {
    "name" : "grantfilter",
    "modifiedTime" : 1721687178882,
    "sizeInBytes" : 46
  } ]
}

Script with cURL Command – List Report Scripts

The following example gets Report Writer scripts on the Sample.Basic cube. Links are suppressed, using the query parameter links=none.

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

Example of Response Body


{
  "items" : [ {
    "name" : "attr",
    "modifiedTime" : 1721666632271,
    "sizeInBytes" : 295
  }, {
    "name" : "link",
    "modifiedTime" : 1721666632271,
    "sizeInBytes" : 226
  }, {
    "name" : "bottom",
    "modifiedTime" : 1721666632271,
    "sizeInBytes" : 248
  }, {
    "name" : "orderby",
    "modifiedTime" : 1721666632271,
    "sizeInBytes" : 523
  }, {
    "name" : "restrict",
    "modifiedTime" : 1721666632271,
    "sizeInBytes" : 245
  }, {
    "name" : "top",
    "modifiedTime" : 1721666632271,
    "sizeInBytes" : 334
  }, {
    "name" : "withattr",
    "modifiedTime" : 1721666632271,
    "sizeInBytes" : 310
  }, {
    "name" : "middle",
    "modifiedTime" : 1721666645271,
    "sizeInBytes" : 530
  }, {
    "name" : "rowavg",
    "modifiedTime" : 1721666645271,
    "sizeInBytes" : 3804
  }, {
    "name" : "asymm",
    "modifiedTime" : 1721666645271,
    "sizeInBytes" : 431
  }, {
    "name" : "actsales",
    "modifiedTime" : 1721666645271,
    "sizeInBytes" : 261
  }, {
    "name" : "colgroup",
    "modifiedTime" : 1721666645271,
    "sizeInBytes" : 301
  } ]
}

Script with cURL Command – Filter by Keyword

The following example gets Report Writer scripts on the Sample.Basic cube. Results are filtered using the query parameter keyword=attr.

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

Example of Response Body


{
  "items" : [ {
    "name" : "attr",
    "modifiedTime" : 1721666632397,
    "sizeInBytes" : 295,
    "links" : [ {
      "rel" : "get",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/attr",
      "method" : "GET"
    }, {
      "rel" : "delete",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/attr",
      "method" : "DELETE"
    }, {
      "rel" : "edit",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/attr",
      "method" : "PUT"
    }, {
      "rel" : "content",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/attr/content",
      "method" : "GET"
    } ]
  }, {
    "name" : "withattr",
    "modifiedTime" : 1721666632397,
    "sizeInBytes" : 310,
    "links" : [ {
      "rel" : "get",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/withattr",
      "method" : "GET"
    }, {
      "rel" : "delete",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/withattr",
      "method" : "DELETE"
    }, {
      "rel" : "edit",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/withattr",
      "method" : "PUT"
    }, {
      "rel" : "content",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/withattr/content",
      "method" : "GET"
    } ]
  } ]
}
Back to Top