Register a purge contacts API task
You can use the xConnect Web API to remove unwanted data from your contacts. To do this, you must register a purge task.
To register a task:
-
Use the following API:
RequestResponse<instance>/sitecore/api/datatools/purge/tasks/contactsThe successful task registration request returns the task ID used for status monitoring, for example:
RequestResponse{ "TaskId": "049cd8b3-b120-4949-a42f-cdc2fe4f3086" }
Parameters
The following describes the POST parameters that you can send to the Web API to register a purge task:
|
Parameter |
Optional |
Default |
Type |
Description |
|---|---|---|---|---|
|
|
Yes |
100 |
Integer |
The data extraction batch size of contacts. The Important Use a small batch size for the purging process to not overload the system too much, and so it can cancel tasks with less impact. Task cancellation is not an immediate process and does not cancel an ongoing batch. |
|
|
Yes |
100 |
Integer |
Contact data extraction cursor split count. The |
|
|
Yes |
24 |
Integer |
The expiration of the task in the final state. The final task status is either successful or failed and removed from the system after the expiration period. |
|
|
No |
- |
Nullable Integer |
The last contact activity must be greater or equal to the specified amount of days. The range restriction is 0 to the The The data extraction process uses this parameter to filter contacts based on the |
|
|
Yes |
Null |
Nullable Double |
The start sampling range value. The range restriction is 0 to 1. The percentile range specifies the subset of data to extract. Use this parameter to perform the purging in small batches to avoid stressing the system too much. The data extraction process filters contacts based on the percentile range and the |
|
|
Yes |
Null |
Nullable Double |
The end sampling range value. The range restriction is 0 to 1. The percentile range specifies the subset of data to extract. Use this parameter to perform the purging in small batches to avoid stressing the system too much. The data extraction process filters contacts based on the percentile range and the |
|
|
Yes |
"" |
String |
List of condition names. Multiple conditions run with the AND logical operator. The You delimit The total length of the parameter must be less than 2019 characters. The filtering with conditions is performed in-memory, not at the database level. If the contact passes all the conditions, then the purging tool can purge the contact. |