Use this call to retrieve list data for the items in a specified list.
This supports validation, mapping, reconciliation, or downstream use of list members such as products, employees, regions, accounts, or cost centers.
You can filter on optional fields by setting the includeAll query parameter.
Notes:
- To use this call, you must be a Workspace Administrator.
- This call only supports the retrieval of list data up to 1,000,000 records. If the specified list contains more than 1,000,000 records, then the call returns a
400 Bad RequestHTTP status, instead of a subset of the records.
The following list data always displays in the query response.
| Default List Data | Description |
id | The Anaplan ID of the item in the list. |
name | The name of the item in the list. |
code | The code value for an item in the list (if specified) |
parent | The name of the parent item in the list. |
parentId | The Anaplan ID of the parent item in the list. |
listId | The Anaplan ID of the list to which the parent item belongs. This ID displays if the list has a Parent Hierarchy set under the Configure tab in Anaplan. |
listName | The name of list to which the parent item belongs. The name displays if the list has a Parent Hierarchy set under the Configure tab in Anaplan. |
Set the includeAll query parameter to true to display the following optional list data fields in the response.
| Optional List Data | Description |
write | If Selective Access is enabled for the list, you can add individual users to provide write access. Users with write access can view and edit data associated with the list items. |
read | If Selective Access is enabled for the list, you can add individual users to provide read access. Users with read access can view the data associated with the list items but not edit it. |
subsets | If the value of the subset column is true, the associated item belongs to that subset. You can view subsets under Subsets tab in Anaplan. |
properties | The value of each custom list property. |
Method and endpoint
/workspaces/{workspaceId}/models/{modelId}/lists/{listId}/items?includeAll=true
Parameters
| Parameter | Details |
{workspaceId} |
|
{modelId} |
|
{listId} |
|
Query parameters
| Parameter | Details |
includeAll |
|
Curl example
curl -X GET 'https://api.anaplan.com/2/0/workspaces/{workspaceId}/models/{modelId}/lists/{listId}/items?includeAll=true' \
-H 'Accept: application/json' \
-H 'Authorization: AnaplanAuthToken {anaplan_auth_token}'
Response
Response 200 body
Example with application/json and includeAll=false
{
"meta": {
"schema": "https://api.anaplan.com/2/0/objects/list"
},
"status": {
"code": 200,
"message": "Success"
},
"listItems": [
{
"id": "206000000001",
"name": "cake",
"code": "c1"
},
{
"id": "206000000002",
"name": "bread",
"code": "b2"
},
{
"id": "206000000003",
"name": "pastry",
"code": "p3"
}
]
}
Example with text/csv and includeAll=false
id,name,code,parent,parentId,listId,listName
206000000001,cake,c1,,,,
206000000002,bread,b2,,,,
206000000003,pastry,p3,,,,
Example with application/json and includeAll=true
{
"meta": {
"schema": "https://api.anaplan.com/2/0/objects/list"
},
"status": {
"code": 200,
"message": "Success"
},
"listItems": [
{
"id": "206000000001",
"name": "cake",
"code": "c1",
"subsets": {
"favourite": true
},
"properties": {
"count": "1.0"
}
},
{
"id": "206000000002",
"name": "bread",
"code": "b2",
"subsets": {
"favourite": false
},
"properties": {
"count": "4.0"
}
},
{
"id": "206000000003",
"name": "pastry",
"code": "p3",
"subsets": {
"favourite": true
},
"properties": {
"count": "5.0"
}
}
]
}
Example with text/csv and includeAll=true
id,name,code,parent,parentId,listId,listName,favourite,count
206000000001,cake,c1,,,,true,1.0
206000000002,bread,b2,,,,false,4.0
206000000003,pastry,p3,,,,true,5.0