Use this call to retrieve the ID and name of all views for a model.
This helps an integration discover available saved views that can be used as data sources for reads or exports.
The results include default and saved views. If you add the query parameter includesubsidiaryviews=true, this includes unsaved subsidiary views in the results. This call also retrieves the ID of the module that the views belong to.
Notes:
- To use this call, you must be a Workspace Administrator
- Single quotes enclose the module and view names that have special characters
Default views
For default views:
- The value of the {viewId} is identical to the value of the {moduleId}
- The value of the name is identical to the value of the module
Saved views
For saved views:
- The
nameconsists of the module name, a period, and the saved view name. For example,REP01 Profit & Loss Report.P & L by Country
For unsaved subsidiary views:
- The name consists of the module name and the line item name that the subsidiary view is created from
- These are separated by a period(.)
Method and endpoint
/models/{modelId}/views
Parameters
| Parameter | Details |
{modelId} |
|
Curl example
curl -X GET
'https://api.anaplan.com/2/0/models/{modelId}/views' \
-H 'Authorization: AnaplanAuthToken {anaplan_auth_token}' \
-H 'Accept: application/json'
Response
Response header
Content-Type: application/json
Response 200 body
{
"meta": {
"paging": {
"currentPageSize": 1,
"offset": 0,
"totalSize": 1
},
"schema": "https://api.anaplan.com/2/0/objects/view"
},
"status": {
"code": 200,
"message": "Success"
},
"views": [
{
"code": "",
"id": "102000000000",
"name": "StrategicPlanning",
"moduleId": "102000000000"
},
{
"code": "",
"id": "207000000000",
"name": "StrategicPlanning.UK Financial forecast",
"moduleId": "102000000000"
},
{
"code": "",
"id": "207000000001",
"name": "StrategicPlanning.EMEAforecastreport",
"moduleId": "102000000000"
},
{
"code": "",
"id": "207000000002",
"name": "StrategicPlanning.'accountSummary&overview/US$'",
"moduleId": "102000000000"
},
{
"code": "",
"id": "237000000001",
"name": "'StrategicPlanning/2020'.'accountSummary&overview/US$'",
"moduleId": "102000000001"
}
]
}