1. Data integration
  2. Anaplan API Guide and Reference
  3. Use the bulk APIs
  4. Perform an import action
  5. Initiate an import action
  6. Check the status of the import action

This call returns the status of your import action.

The possible states of a task are:

StateDescription
NOT_STARTEDScheduled but not started.
IN_PROGRESSCurrently running.
COMPLETEDone, either successfully or not.
CANCELLINGCancellation has begun but not yet complete.
CANCELLEDCancellation complete and any changes are rolled back.

Continue polling with this API call until the status returns either COMPLETE or CANCELLED.

Method and endpoint

https://api.anaplan.com/2/0/workspaces/{workspaceID}/models/{modelID}/imports/{importID}/tasks/{taskID

GET

Parameters

ParameterDescription
AnaplanAuthToken:{token}Your Anaplan authentication token value.
workspaceIDThe workspace ID
modelIDThe model ID
importIDThe import ID
taskIDThe task ID obtained in the previous step.

Curl example

curl -X GET \ https://api.anaplan.com/2/0/workspaces/0a800b00e0000000f000001eab0d0000/models/F1111111C11111111B11111F1111E11F/imports/112000000007/tasks/1B1D84DDD53847BAA621810B593C3FC1 \
-H 'authorization: AnaplanAuthToken:{token}' \
-H "Content-Type:application/json"

Response

{

   "meta":{

      "schema":"https://api.anaplan.com/2/0/models/F1111111C11111111B11111F1111E11F/objects/task"

   },

   "status":{

      "code":200,

      "message":"Success"

   },

   "task":{

      "taskId":"1B1D84DDD53847BAA621810B593C3FC1",

      "currentStep":"Complete.",

      "progress":1.0,

      "result":{

         "details":[

            {

               "localMessageText":"Employees: 90 (0/90) rows successful, 5 ignored ",

               "occurrences":0,

               "type":"hierarchyRowsProcessed",

               "values":[

                  "hierarchyName",

                  "Employees",

                  "successRowCount",

                  "90",

                  "successCreateCount",

                  "0",

                  "successUpdateCount",

                  "90",

                  "warningsRowCount",

                  "0",

                  "warningsCreateCount",

                  "0",

                  "warningsUpdateCount",

                  "0",

                  "failedCount",

                  "0",

                  "ignoredCount",

                  "5",

                  "totalRowCount",

                  "95",

                  "totalCreateCount",

                  "0",

                  "totalUpdateCount",

                  "90",

                  "invalidCount",

                  "0",

                  "updatedCount",

                  "90",

                  "renamedCount",

                  "90",

                  "createdCount",

                  "0"

               ]

            }

         ],

         "failureDumpAvailable":false,

         "objectId":"112000000009",

         "successful":true

      },

      "taskState":"COMPLETE",

      "creationTime":1571258347545

   }

}