---
title: "Monitor a purge API task"
slug: "monitor-a-purge-api-task"
abstract: "How to monitor purge tasks with the xConnect purge Web API."
---
# Monitor a purge API task

You can use the [xConnect Web API](https://doc.sitecore.com/xp/en/developers/102/sitecore-experience-platform/web-api-for-xconnect-data-tools.html "Web API for xConnect Data Tools") to monitor a [purge](https://doc.sitecore.com/xp/en/developers/102/sitecore-experience-platform/xconnect-purging-tool.html "xConnect purging tool") task.

To track the task progress:

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

    ```text
    <instance>/sitecore/api/datatools/purge/tasks/{{TaskId}}
    ```

## GET response

The GET response contains the following data:

```csharp
{
    "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:

| Field | Description |
| --- | --- |
| `Id` | The task ID. |
| `Created` | Date and time of task creation. |
| `Updated` | Date and time of the last status change. |
| `TaskType` | DeferredAction = 0<br><br>DistributedProcessing = 1 |
| `Status` | Pending = 0<br><br>Processing = 1<br><br>Completed = 2<br><br>Failed = 3<br><br>Expired = 4<br><br>Canceled = 5 |
| `Progress` | The number of items processed by the task. |
| `Total` | The total approximate number of items to process. |
| `Description` | Gets the human-readable description of the task. If applied. |
| `PrerequisiteTaskIds` | The list of task IDs that are prerequisites for this task. |