List Levels
/essbase/rest/v1/applications/{applicationName}/databases/{databaseName}/dimensions/{dimensionName}/levels
Returns all the levels of a dimension from the specified application and database.
Request
-
applicationName(required): string
Application name.
-
databaseName(required): string
Database name.
-
dimensionName(required): string
Dimension name.
Response
- application/json
- application/xml
200 Response
OK
Levels retrieved successfully, including links to get or edit each level.
400 Response
Bad Request
Failed to get the levels. The application, database, or dimension name may be incorrect.
500 Response
Internal Server Error.
Examples
The following example shows how to get all the levels of a dimension in 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
.
Script with cURL Command
call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/applications/ASOSamp/databases/Basic/dimensions/Products/levels?links=none" -H "Accept:application/json" -H "Content-Type:application/json" -u %User%:%Password%
Example of Response Body
The following example shows the contents of the response body in JSON format.
{
"items" : [ {
"name" : "Lev0",
"number" : 0
}, {
"name" : "Lev1",
"number" : 1
}, {
"name" : "Lev2",
"number" : 2
}, {
"name" : "Lev3",
"number" : 3
}, {
"name" : "Lev4",
"number" : 4
}, {
"name" : "Lev5",
"number" : 5
} ]
}