Use this call to retrieve the name, IDs, and lists of names for the dimensions (columns, pages, rows) on a specified view.

This helps an integration understand the structure of a view before reading its data, including which dimensions define the rows, columns, and pages.

Notes:

  • To use this call, you must be a Workspace Administrator
  • If a view has no dimensions on an axis, the call omits the axis field (for example, no "rows" field at all instead of "rows": [])
  • If a view is the default view, its name is set to be the same as the module name
  • The viewId in this request can also be replaced by any valid lineItemId. If the Line Item has a changed dimensionality (has a Subsidiary View), the response returns the metadata applicable to that line item. Otherwise, the response returns the default metadata

You can use this API call to map dimensions to cell data export headers or transform grid CSV format to tabular single column format.

GET

/models/{modelId}/views/{viewId}

ParameterDetails
{modelId}
  • Required
  • Type: String
  • Description: the ID for the model
  • Example: 75A40874E6B64FA3AE074327899685
{viewId}
  • Required
  • Type: Number
  • Description: the ID for the view
  • Example: 102000000000

curl -X GET 'https://api.anaplan.com/2/0/models/{modelId}/views/{viewId}' \
-H 'Authorization: AnaplanAuthToken {anaplan_auth_token}'\
-H 'Accept: application/json'

Content-Type: application/json

{
  "meta": {
    "schema": "https://api.anaplan.com/2/0/objects/view"
  },
  "status": {
    "code": 200,
    "message": "Success"
  },
  "viewName": "REV01 Price Book",
  "viewId" : "102000000000"
  "rows": [
    {
      "id": "101000000000",
      "name": "Products"
    },
    {
      "id": "101000000003",
      "name": "Regions"
    }
  ],
  "columns": [
    {
      "id": "101999999999",
      "name": "Line items"
    }
  ],
  "pages": [
    {
      "id": "101000000001",
      "name": "Versions"
    }
  ],
}