Certain actions such as imports, exports, or writeback actions require exclusive access to a model during their execution. These actions lock the model. Any attempt to read information via the API is blocked as they require an exclusive transaction to run. This endpoint provides a status for the model.
This helps integrations avoid conflicts by checking whether the model is busy before attempting operations that require model availability.
Method and endpoint
/workspaces/{workspaceId}/models/{modelId}/status
Curl example
curl -X POST 'https://api.anaplan.com/2/0/workspaces/{workspaceId}/models/{modelId}/status' \
-H 'Authorization: AnaplanAuthToken {anaplan_auth_token}'
-H 'Content-Type: application/json'
Response
Response 200 when there's an ongoing export task
{
"meta": {
"schema": "https://api.anaplan.com/2/0/objects/dimension"
},
"status": {
"code": 200,
"message": "Success"
},
"requestStatus":{
"exportTaskType":null,
"taskId":"6EB7F52C07CA4E86909A213C608765A1-11",
"currentStep":"Processing ...",
"tooltip":"The system is currently processing an Export:\n\nExport started by user Jesse Smith (jesse.smith@yourcompany.com)\n\nExport started at 11:23 (UTC)\nTasks can be cancelled in Model Management.",
"progress":0.44110000000000005,
"creationTime":1578569563167
}
}
Response 200 when there's an ongoing import task
{
"meta": {
"schema": "https://api.anaplan.com/2/0/objects/dimension"
},
"status": {
"code": 200,
"message": "Success"
},
{
"requestStatus": {
"peakMemoryUsageEstimate": null,
"peakMemoryUsageTime": null,
"progress": 0.0,
"currentStep": "Processing ...",
"tooltip": "The system is currently processing an Import:\n\nImport started by user Jesse Smith (jesse.smith@yourcompany.com)\n\nImport started at 00:51 (UTC)\nTasks can be cancelled in Model Management.",
"exportTaskType": null,
"creationTime": 1645577520129,
"taskId": "E9CB709BD63D4003ACFB60CADFC2FC0B"
}
}
Response 200 when there's an ongoing writeback task
{
"meta": {
"schema": "https://api.anaplan.com/2/0/objects/dimension"
},
"status": {
"code": 200,
"message": "Success"
},
{
"requestStatus": {
"creationTime": 1646264082002,
"progress": -1.0,
"taskId": null,
"currentStep": "Updating",
"tooltip": null,
"exportTaskType": null,
"peakMemoryUsageEstimate": null,
"peakMemoryUsageTime": null
}
}
Response 200 when there's no ongoing task
{
"meta": {
"schema": "https://api.anaplan.com/2/0/objects/dimension"
},
"status": {
"code": 200,
"message": "Success"
},
"requestStatus": {
"peakMemoryUsageEstimate": null,
"peakMemoryUsageTime": null,
"progress": -1.0,
"currentStep": "Open",
"tooltip": null,
"exportTaskType": null,
"creationTime": 1645577591822,
"taskId": null
}
}
From the above responses, the currentStep property returns the status of the model under different scenarios -
Open- When no process is running on the model.Processing- When import/export task is being processed on the model.Updating- When any update is being performed on the model, for example: cell write.Closed- When model is in maintenance state.
The tooltip returns details about the transaction being performed on the model. It also provides the user information who initiated the transaction along-with the progress information.