The task methods are used to get information on asynchronous data tasks such as imports or deletions. Request a list of tasks associated with your project. Tasks may be filtered to return lists of a certain type of task such as imports or deletes if specific criteria are provided.

For more details about identifiers and status identifiers please see our general task methods reference guide.

Examples

Use a condition to return a list of data retention cleanup tasks performed after a specific time (tasks which remove outdated profiles). Order the list descending by ID and with pagination. For best results, we recommend setting a limit on your query. Send several requests to obtain the full list:

curl --request POST \
  --url https://external-api.xtremepush.com/api/external/list/task \
  --header 'content-type: application/json' \
  --data '{
    "apptoken": "YOUR_APPTOKEN",
    "condition": [
      ["identifier", "=" , "cleanup_users"],
      ["finish_time", ">" , 1580226128]
    ],
    "order": ["id DESC"],
    "limit": 50,
    "offset": 0
}'

Use a condition to return the list of profile imports after a specific time, and order the list descending by ID:

curl --request POST \
  --url https://external-api.xtremepush.com/api/external/list/task \
  --header 'content-type: application/json' \
  --data '{
    "apptoken": "YOUR_APPTOKEN",
    "condition": [
      ["identifier", "=" , "profile_import"],
      ["finish_time", ">" , 1580226128]
    ],
    "order": ["id DESC"],
    "limit": 50,
    "offset": 0
}'
Language
Click Try It! to start a request and see the response here!