Monitor the progress of a task

Version:

You can use the xConnect Web API to monitor a task.

To track the task progress:

  • Use the following GET request and substitute the {{TaskId}} parameter with the ID of the ongoing registered task:

    <instance>/sitecore/api/datatools//tasks/{{TaskId}}/progress

GET response

The GET response contains the following data:

{
    "Id": "049cd8b3-b120-4949-a42f-cdc2fe4f3086",
    "Created": "2020-08-18T10:`59:39`.7216673Z",
    "Updated": "2020-08-18T10:`59:52`.0965327Z",
    "TaskType": 1,
    "Status": 2,
    "Progress": 0,
    "Total": null,
    "Description": "",
    "PrerequisiteTaskIds": []
}

The data in the GET response is as follows:

FieldDescription
IdThe task ID.
CreatedDate and time of task creation.
UpdatedDate and time of the last status change.
TaskTypeDeferredAction = 0

DistributedProcessing = 1
StatusPending = 0

Processing = 1

Completed = 2

Failed = 3

Expired = 4

Canceled = 5
ProgressThe number of items processed by the task.
TotalThe total approximate number of items to process.
DescriptionGets the human-readable description of the task. If applied.
PrerequisiteTaskIdsThe list of task IDs that are prerequisites for this task.
If you have suggestions for improving this article, let us know!