Get information on asynchronous data tasks such as imports or deletions.

Tasks are asynchronous processes that get executed when users perform data related actions. Xtremepush keeps a record of all the tasks for a project in the task history.

There are two endpoints that allow users to get more information on tasks:

  • Task list: Get a list of tasks for your project. It's possible to filter based on various criteria.
  • Task info: Get information on a single task.

Task identifiers

The identifier parameter is used to filter on task type. A list of task identifiers which can be used for the task list and task info API endpoints can be found below.

👍

Many of the tasks are manually initiated. API initiated tasks or automated tasks are those more likely to require API based checks.

Task IdentifierDescription
profile_importAsynchronous task to import profiles
profile_export_dataAsynchronous task to export profiles
profile_delete_personal_dataAsynchronous task to delete all PII data from a profile
cleanup_usersAsynchronous task to delete all profiles which should no longer be held according to the configured data retention policy
list_importAsynchronous task to import a target audience from a list of users
list_exportAsynchronous task to export a target audience of a list of users
message_export_campaignAsynchronous task to export campaign data
message_export_sendAsynchronous task to export message send data
campaign_count_recipientsAsynchronous task to count the target audience of a campaign (or eligible recipients)
campaign_preview_recipientsAsynchronous task to preview the target audience of a campaign (or eligible recipients)
segment_count_recipientsAsynchronous task to count the target audience of a segment (or eligible recipients)
segment_export_devicesAsynchronous task to export the target audience of a segment (or eligible recipients) as a list of device IDs
segment_export_profilesAsynchronous task to export the target audience of a segment (or eligible recipients) as a list of user IDs
active_directory_lists_syncExample of an asynchronous task related to an integration—syncing a list from active directory
active_directory_profiles_syncExample of an asynchronous task related to an integration—syncing profiles from active directory
kochava_sync_installsExample of an asynchronous task related to an integration—syncing attributed installs from Kochava

Return the list of profile import tasks after a specific time 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"],
    "select": ["id", "identifier", "errors", "finish_time"]
}'

Sample response:

{
    "success": true,
    "code": 200,
    "data": [
        {
            "id": 5853,
            "identifier": "profile_import",
            "errors": {
                "file[columns]": [
                    "Column 'firstname' is not set to be a profile attribute"
                ],
                "file[rows]": [
                    "Rows must contain identifier (Row 4)"
                ]
            },
            "finish_time": 1596217813
        },
        {
            "id": 5852,
            "identifier": "profile_import",
            "errors": {
                "file[columns]": [
                    "Column 'first.name' is not a recognized user profile field or attribute",
                    "Column 'LTV' is not a recognized user profile field or attribute"
                ]
            },
            "finish_time": 1596216946
        },
        {
            "id": 62,
            "identifier": "profile_import",
            "errors": {
                "file[rows]": [
                    "7 Rows must contain identifier ( Row 6, Row 11, Row 13, Row 18, ...)",
                    "9 Rows are duplicates ( Row 12, Row 14, Row 15, Row 19, ...)"
                ]
            },
            "finish_time": 1580228176
        }
    ]
}

Status identifiers

Task status types are displayed by their identifier:

Status IDStatus name
0New
1Executing
2Done
3Error
4Fatal