Get Default Grid
/applications/{applicationName}/databases/{databaseName}/grid
Returns the default grid for the specified cube. The default grid is the first grid you would see in an ad hoc analysis of the database, before performing any grid operations.
Request
-
applicationName(required):
Application name for default grid.
-
databaseName(required):
Database/Cube name for default grid.
-
reset:
Reset flag to avoid saved grid layout.
Response
200 Response
OK
Grid returned successfully.
400 Response
Bad Request
Validation failed. The application or database name may be missing or incorrect.
500 Response
Internal Server Error.
Examples
The following example shows how to get the default grid for the specified Essbase database.
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 cURL command requests the default grid for the Sample Basic cube to be returned in JSON format.
call properties.bat
curl -X GET https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/grid -H "Accept:application/json" -H "Content-Type:application/json" -u %User%:%Password%Response Grid
The response JSON describes the grid that is represented by the sample table.
| - | Product | Market | Scenario |
|---|---|---|---|
| - | Measures | - | - |
| Year | 105522 | - | - |
The alias table used in the grid is named Default. Each dimension of the cube is listed in the dimensions object. The slice object describes the number of columns and rows, and the position, values, and types of data cells. Data cell types are 0 for text, 2 for doubles, and 7 for empty.
{
"alias" : "Default",
"dimensions" : [ {
"name" : "Year",
"row" : -1,
"column" : 0,
"pov" : "",
"hidden" : false,
"expanded" : false
}, {
"name" : "Measures",
"row" : 1,
"column" : -1,
"pov" : "",
"hidden" : false,
"expanded" : false
}, {
"name" : "Product",
"row" : -1,
"column" : -1,
"pov" : "Product",
"hidden" : false,
"expanded" : false
}, {
"name" : "Market",
"row" : -1,
"column" : -1,
"pov" : "Market",
"hidden" : false,
"expanded" : false
}, {
"name" : "Scenario",
"row" : -1,
"column" : -1,
"pov" : "Scenario",
"hidden" : false,
"expanded" : false
} ],
"slice" : {
"columns" : 4,
"rows" : 3,
"data" : {
"ranges" : [ {
"start" : 0,
"end" : 11,
"values" : [ "", "Product", "Market", "Scenario", "", "Measures", "", "", "Year", "105522.0", "", "" ],
"types" : [ "7", "0", "0", "0", "7", "0", "7", "7", "0", "2", "7", "7" ],
"texts" : [ null, null, null, null, null, null, null, null, null, null, null, null ],
"dataFormats" : [ ],
"statuses" : [ "0", "268435475", "402653203", "536870923", "0", "134217739", "0", "0", "135", "1", "0", "0" ],
"filters" : [ ],
"enumIds" : [ "", "", "", "", "", "", "", "", "", "", "", "" ]
} ]
}
}
}