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
nameis set to be the same as the module name - The
viewIdin this request can also be replaced by any validlineItemId. 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.
Method and endpoint
/models/{modelId}/views/{viewId}
Parameters
| Parameter | Details |
{modelId} |
|
{viewId} |
|
Curl example
curl -X GET 'https://api.anaplan.com/2/0/models/{modelId}/views/{viewId}' \
-H 'Authorization: AnaplanAuthToken {anaplan_auth_token}'\
-H 'Accept: application/json'
Response
Response header
Content-Type: application/json
Response 200 body
{
"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"
}
],
}