Save Grid Layout
/essbase/rest/v1/applications/{application}/databases/{database}/layouts
Saves a grid layout for the specified cube. A layout is a saved grid shape associated with a cube. If you create a grid that you would like to use again in the future, you can save it as a Layout. Layouts and reports are included when the cube is copied or moved using migration, export, and Lifecycle Mangement (LCM) tools.
Request
- application/json
- application/xml
-
application(required): string
Application name.
-
database(required): string
Database name.
Grid to be saved as a layout.
object
-
alias:
string
The active alias table for the grid.
-
data:
object LayoutData
-
dimensions:
array dimensions
object
-
cellText:
boolean
-
columnSuppression:
object Suppression
-
formulaRetention:
object FormulaRetention
-
includeDescriptionLabel:
boolean
-
includeSelection:
boolean
-
indentation:
string
Allowed Values:
[ "NONE", "SUBITEMS", "TOTALS" ]
-
maxRows:
integer(int32)
-
missingText:
string
- navigate: boolean
-
noAccessText:
string
The string displayed when you do not have the proper security access to view a data value. Default is #NoAccess.
-
removeUnSelectedGroup:
boolean
-
repeatMemberLabels:
boolean
-
rowSuppression:
object Suppression
-
withinSelectedGroup:
boolean
-
zoomIn:
object ZoomIn
object
-
axis:
string
Allowed Values:
[ "COLUMN", "ROW", "POV" ]
-
displayName:
string
-
expanded:
boolean
- hidden: boolean
-
name:
string
-
page:
integer(int32)
-
position:
integer(int32)
object
-
ancestor:
string
Allowed Values:
[ "TOP", "BOTTOM" ]
-
mode:
string
Allowed Values:
[ "CHILDREN", "DESCENDENTS", "BASE" ]
Response
- application/json
- application/xml
200 Response
OK
Layout saved successfully.
object
-
alias:
string
The active alias table for the grid.
-
data:
object LayoutData
-
dimensions:
array dimensions
object
-
cellText:
boolean
-
columnSuppression:
object Suppression
-
formulaRetention:
object FormulaRetention
-
includeDescriptionLabel:
boolean
-
includeSelection:
boolean
-
indentation:
string
Allowed Values:
[ "NONE", "SUBITEMS", "TOTALS" ]
-
maxRows:
integer(int32)
-
missingText:
string
- navigate: boolean
-
noAccessText:
string
The string displayed when you do not have the proper security access to view a data value. Default is #NoAccess.
-
removeUnSelectedGroup:
boolean
-
repeatMemberLabels:
boolean
-
rowSuppression:
object Suppression
-
withinSelectedGroup:
boolean
-
zoomIn:
object ZoomIn
object
-
axis:
string
Allowed Values:
[ "COLUMN", "ROW", "POV" ]
-
displayName:
string
-
expanded:
boolean
- hidden: boolean
-
name:
string
-
page:
integer(int32)
-
position:
integer(int32)
object
-
ancestor:
string
Allowed Values:
[ "TOP", "BOTTOM" ]
-
mode:
string
Allowed Values:
[ "CHILDREN", "DESCENDENTS", "BASE" ]
400 Response
Bad Request
Failed to save layout.
Examples
The following example shows how to save an Essbase grid view as a named layout associated with the 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
The POST operation uses the specification in postlayout.json
to create a saved layout in Sample Basic, named Q1ColaSalesNY.
call properties.bat
curl -X POST "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/layouts?links=none" -H "Accept:application/json" -H "Content-Type:application/json" --data "@./postlayout.json" -u %User%:%Password%
Input JSON
The following example shows the contents of the payload in postlayout.json
:
{
"header" : {
"name" : "Q1ColaSalesNY",
"user" : "admin",
"databaseDefault" : false,
"userDefault" : false,
"session" : false
},
"spec" : {
"description" : "",
"grid" : {
"alias" : "Default",
"dimensions" : [ {
"name" : "Year",
"page" : 0,
"hidden" : false,
"expanded" : false,
"axis" : "POV",
"position" : 0
}, {
"name" : "Measures",
"page" : 0,
"hidden" : false,
"expanded" : false,
"axis" : "POV",
"position" : 0
}, {
"name" : "Product",
"page" : 0,
"hidden" : false,
"expanded" : false,
"axis" : "POV",
"position" : 0
}, {
"name" : "Market",
"page" : 0,
"hidden" : false,
"expanded" : false,
"axis" : "POV",
"position" : 0
}, {
"name" : "Scenario",
"page" : 0,
"hidden" : false,
"expanded" : false,
"axis" : "POV",
"position" : 0
} ],
"data" : {
"values" : [ [ "", "Actual" ], [ "", "Cola" ], [ "", "New York" ], [ "", "Sales" ], [ "Jan", "1052.0" ], [ "Feb", "645.0" ], [ "Mar", "675.0" ], [ "Qtr1", "2372.0" ] ],
"types" : [ [ "7", "0" ], [ "7", "0" ], [ "7", "0" ], [ "7", "0" ], [ "0", "2" ], [ "0", "2" ], [ "0", "2" ], [ "0", "2" ] ],
"texts" : [ [ null, null ], [ null, null ], [ null, null ], [ null, null ], [ null, null ], [ null, null ], [ null, null ], [ null, null ] ],
"dataFormats" : [ ],
"statuses" : [ [ "0", "536870928" ], [ "0", "268435472" ], [ "0", "402653200" ], [ "0", "134217744" ], [ "16", "2" ], [ "16", "2" ], [ "16", "2" ], [ "134", "1" ] ],
"filters" : [ ],
"enumIds" : [ [ "", "" ], [ "", "" ], [ "", "" ], [ "", "" ], [ "", "" ], [ "", "" ], [ "", "" ], [ "", "" ] ]
}
}
}
}
The header information about the layout includes its name, the user who created it, whether it is the default layout for the cube, and whether it is the default layout for this user. Information about the grid is listed within the spec
object, including a listing of each dimension of the cube, and the data contained in the layout. The data
object includes the values and types of data cells. Data cell types are 0
for text, 2
for doubles, and 7
for empty.