Use this endpoint to get the status of a specific export task.

Notes:

  • As ‌best practice, we recommend you check the status of an ongoing export action no more than once every five seconds. For long-running exports, it is suggested to check at even longer intervals.
  • You can cancel an ongoing monitoring task if you make the same call using the DELETE verb instead of the GET one.

In the response:

  • currentStep is the task associated with the specified taskID.
  • taskState is the status of that export task.
  • progress is a double that is typically 1.0.
  • result is a JSON object that indicates the object ID, and whether the task succeeded.
  • taskId is the ID that you specified in the request.


Here is a list of each possible taskState:

StatusDescription
NOT_STARTEDThe task is scheduled to run, but has not started yet.
IN_PROGRESSThe task is currently running.
COMPLETEThe task has finished running whether successful or not.
CANCELLINGThe task is currently being canceled. Cancellation is not yet complete.
CANCELLEDThe task has been canceled and the changes have been rolled back.
If failures occur during the export task details contains a JSON array that contains debug information
GET

/workspaces/{workspaceId}/models/{modelId}/exports/{exportId}/tasks/{taskId}

ParameterDescription
workspaceId
  • Required
  • Type: string
  • Description: The workspace ID
  • Example: 8a8b8c8d8e8f8g8i
modelId
  • Required
  • Type: string
  • Description: The model ID
  • Example: 75A40874E6B64FA3AE0743278996850F
exportId
  • Required
  • Type: number
  • Description: The export definition ID
  • Example: 116000000001
taskId
  • Required
  • Type: string
  • Description: The task ID
  • Example: 81374848BFED4C52A9927048FA77AA05

curl -X GET \
https://api.anaplan.com/2/0/workspaces/{workspaceId}/models/{modelId}/exports/{exportId}/tasks/{taskId} \
-H 'authorization: AnaplanAuthToken {anaplan_auth_token}' \
-H 'Content-Type:application/json'

{
   "meta":{
      "schema":"https://api.anaplan.com//2/0/models/736367E9DB484E3AB3A50C3704FD33ED/objects/task"
   },
   "status":{
      "code":200,
      "message":"Success"
   },
   "task":{
      "type":"taskInformation",
      "taskId":"BFEC582EBD4146068FE4061831C8F0F0",
      "currentStep":"Complete.",
      "progress":1,
      "result":{
         "failureDumpAvailable":false,
         "objectId":"116000000002",
         "successful":true
      },
      "taskState":"COMPLETE"
   }
}