Execute MDX Report

post

/essbase/rest/v1/applications/{applicationName}/databases/{databaseName}/grid/mdx

Returns an output grid from the specified MDX report.

Request

Path Parameters
Body ()

MDX report for grid.

Root Schema : MDXOperation
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK

Grid returned successfully.

Body ()
Root Schema : Grid
Type: object
Show Source
Nested Schema : dimensions
Type: array

The part of the grid that describes the included Essbase dimensions and their locations.

Show Source
  • GridDimension

    Dimension object array describing the position of a dimension. Includes name, column, row, and pov. If column = 0, the dimension is located at 0th column in grid. If row = 1, it is located at first row in the grid. If the dimension contains a POV, then that dimension is marked with the pov filter. In the following example, Product (100-10), Market (New York), and Scenario (Actual) are in the POV, Measures (Sales) is on columns, and Year (Jan) is on rows.

     100-10New YorkActual
     Sales  
    Jan1052  

Nested Schema : Slice
Type: object

The part of the grid that contains columns, rows and data.

Show Source
Nested Schema : GridDimension
Type: object

Dimension object array describing the position of a dimension. Includes name, column, row, and pov. If column = 0, the dimension is located at 0th column in grid. If row = 1, it is located at first row in the grid. If the dimension contains a POV, then that dimension is marked with the pov filter. In the following example, Product (100-10), Market (New York), and Scenario (Actual) are in the POV, Measures (Sales) is on columns, and Year (Jan) is on rows.

 100-10New YorkActual
 Sales  
Jan1052  

Show Source
Nested Schema : Data
Type: object
Show Source
Nested Schema : dirtyCells
Type: array

Array of indexes marking which values are are changed. Required for submit action.

Show Source
Nested Schema : dirtyTexts
Type: array

Array of indexes marking which cell comments are changed.

Show Source
Nested Schema : ranges
Type: array
Show Source
  • GridRange

    Range describing grid data. Includes values, types, texts, statuses, enumIds, data, dataFormats, and start and end points.

Nested Schema : GridRange
Type: object

Range describing grid data. Includes values, types, texts, statuses, enumIds, data, dataFormats, and start and end points.

Show Source
Nested Schema : dataFormats
Type: array

Data formats, if format strings are applied.

Show Source
Nested Schema : enumIds
Type: array

(Internal use)

Show Source
Nested Schema : filters
Type: array
Show Source
Nested Schema : statuses
Type: array

Cell statuses. Cell status is additional information that may be returned for a cell value. DC: Dynamic Calc. RO: Read Only. CM: Calculated Member. LO: Linked Object.

Show Source
Nested Schema : texts
Type: array

Cell comments.

Show Source
Nested Schema : types
Type: array

Data types of the cells.

  • 0: text
  • 2: double
  • 7: empty

Show Source
Nested Schema : values
Type: array

Cell values, in single-dimension format.

Show Source

400 Response

Bad Request

Validation failed. The application, database, or MDX report name may be missing or incorrect.

500 Response

Internal Server Error.

Back to Top

Examples

The following example shows how to output an Essbase grid from an MDX query.

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 POST "https://myserver.example.com:9001/essbase/rest/v1/applications/SampleG/databases/Basic/grid/mdx" -H Accept:application/json -H Content-Type:application/json --data "@./gridexecutemdx.json" -o out_gridexecutemdx.json -u %User%:%Password%

Input JSON with MDX Query

The execute MDX report operation requires a query object with a valid MDX query as its string value. The input MDX query object is in gridexecutemdx.json, which looks like:

{
	"query": "select { Product } on rows, { Market } on columns from Sample.Basic"
}

Response Grid

The resulting response grid is:

- Market
Product 105522
{
  "alias" : "Default",
  "dimensions" : [ {
    "name" : "Market",
    "row" : 0,
    "column" : -1,
    "pov" : "",
    "hidden" : false,
    "expanded" : false
  }, {
    "name" : "Product",
    "row" : -1,
    "column" : 0,
    "pov" : "",
    "hidden" : false,
    "expanded" : false
  }, {
    "name" : "Year",
    "row" : -1,
    "column" : -1,
    "pov" : "Year",
    "hidden" : false,
    "expanded" : false
  }, {
    "name" : "Measures",
    "row" : -1,
    "column" : -1,
    "pov" : "Measures",
    "hidden" : false,
    "expanded" : false
  }, {
    "name" : "Scenario",
    "row" : -1,
    "column" : -1,
    "pov" : "Scenario",
    "hidden" : false,
    "expanded" : false
  } ],
  "slice" : {
    "columns" : 2,
    "rows" : 2,
    "data" : {
      "ranges" : [ {
        "start" : 0,
        "end" : 3,
        "values" : [ "", "Market", "Product", "105522.0" ],
        "types" : [ "7", "0", "0", "2" ],
        "texts" : [ null, null, null, null ],
        "dataFormats" : [ ],
        "statuses" : [ "0", "0", "0", "1" ],
        "filters" : [ "", "", "", "" ],
        "enumIds" : [ "", "", "", "" ]
      } ]
    }
  }
}

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.

Back to Top