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 Request error.
  • To use this call, you must be a Workspace Administrator.
POST

/models/{modelId}/lists/{listId}/resetIndex

ParameterDetails
{modelId}
  • Required
  • Type: String
  • Description: the model ID
  • Example: 75A40874E6B64FA3AE0743278996850F
{listId}
  • Required
  • Type: String
  • Description: the list ID
  • Example: 3010000001

curl -X POST 'https://api.anaplan.com/2/0/models/{modelId}/lists/{listId}/resetIndex' \`  
-H 'Authorization: AnaplanAuthToken {anaplan_auth_token}' \`  
-H 'Accept: application/json'

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.

A successful response does not return a message body.

application/json

{
   "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"
}