Save Layout

post

/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

Supported Media Types
Path Parameters
Body ()

Grid to be saved as a layout.

Root Schema : Layout
Type: object
Show Source
Nested Schema : LayoutHeader
Type: object
Show Source
Nested Schema : LayoutSpec
Type: object
Show Source
Nested Schema : LayoutGrid
Type: object
Show Source
Nested Schema : LayoutPreferences
Type: object
Show Source
Nested Schema : LayoutData
Type: object
Show Source
Nested Schema : dimensions
Type: array
Show Source
Nested Schema : dataFormats
Type: array
Show Source
Nested Schema : enumIds
Type: array
Show Source
Nested Schema : filters
Type: array
Show Source
Nested Schema : statuses
Type: array
Show Source
Nested Schema : texts
Type: array
Show Source
Nested Schema : types
Type: array
Show Source
Nested Schema : values
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : LayoutDimension
Type: object
Show Source
Nested Schema : Suppression
Type: object
Show Source
Nested Schema : FormulaRetention
Type: object
Show Source
Nested Schema : ZoomIn
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK

Layout saved successfully.

Body ()
Root Schema : Layout
Type: object
Show Source
Nested Schema : LayoutHeader
Type: object
Show Source
Nested Schema : LayoutSpec
Type: object
Show Source
Nested Schema : LayoutGrid
Type: object
Show Source
Nested Schema : LayoutPreferences
Type: object
Show Source
Nested Schema : LayoutData
Type: object
Show Source
Nested Schema : dimensions
Type: array
Show Source
Nested Schema : dataFormats
Type: array
Show Source
Nested Schema : enumIds
Type: array
Show Source
Nested Schema : filters
Type: array
Show Source
Nested Schema : statuses
Type: array
Show Source
Nested Schema : texts
Type: array
Show Source
Nested Schema : types
Type: array
Show Source
Nested Schema : values
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : LayoutDimension
Type: object
Show Source
Nested Schema : Suppression
Type: object
Show Source
Nested Schema : FormulaRetention
Type: object
Show Source
Nested Schema : ZoomIn
Type: object
Show Source

400 Response

Bad Request

Failed to save layout.

Back to Top

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.

Back to Top