Use this API to reset the index on lists. This ensures that as you add items, they stay within the maximum amount allowed.
This helps maintain list indexing after item changes, especially where index values matter for model behavior or downstream processing.
Notes:
- To use this API call and reset the index on a list, the list must be empty, otherwise you will receive a
400 Bad Requesterror. - To use this call, you must be a Workspace Administrator.
Method and endpoint
/models/{modelId}/lists/{listId}/resetIndex
Parameters
| Parameter | Details |
{modelId} |
|
{listId} |
|
Curl example
curl -X POST 'https://api.anaplan.com/2/0/models/{modelId}/lists/{listId}/resetIndex' \`
-H 'Authorization: AnaplanAuthToken {anaplan_auth_token}' \`
-H 'Accept: application/json'
Response
Response 200 header
A successful index reset will provide a 200 OK response. The API will return a 400-type error if you attempt to reset the index on a list that is not empty.
Response 200 body
A successful response does not return a message body.
Response 400 header
application/json
Response 400 body
{
"status": {
"code": 400,
"message": "We can't reset the list item index of a list that contains data. Select an empty list that doesn't contain any list items."
},
"path": "/2/0/models/567CF3F6A9B346718F7BE5C749857523/lists/101000000000/resetIndex",
"timestamp": "2023-04-26T13:51:59.102661Z"
}