Skip to main content
GET
/
2
/
tasks
curl
curl --request GET \
  --url 'https://data.us.algolia.com/2/tasks?itemsPerPage=10&page=1&action=save%2Creplace%2Cpartial%2Cappend&enabled=true&sourceID=6c02aeb1-775e-418e-870b-1faccd4b2c0f&sourceType=json%2Ccommercetools&destinationID=6c02aeb1-775e-418e-870b-1faccd4b2c0f&triggerType=onDemand%2Cschedule%2Csubscription%2Cstreaming&withEmailNotifications=true&sort=createdAt&order=desc' \
  --header 'accept: application/json' \
  --header 'x-algolia-api-key: ALGOLIA_API_KEY' \
  --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID'
{
  "tasks": [
    {
      "taskID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
      "sourceID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
      "destinationID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
      "cron": "* * 1 * *",
      "lastRun": "<string>",
      "nextRun": "<string>",
      "owner": "<string>",
      "input": {
        "mapping": {
          "format": "mappingkit/v1",
          "actions": [
            {
              "id": "<string>",
              "enabled": true,
              "trigger": "<string>",
              "fieldDirectives": [
                {
                  "fieldKey": "<string>",
                  "value": {}
                }
              ]
            }
          ]
        }
      },
      "enabled": true,
      "failureThreshold": 50,
      "action": "replace",
      "subscriptionAction": "replace",
      "cursor": "<string>",
      "notifications": {
        "email": {
          "enabled": true
        }
      },
      "policies": {
        "criticalThreshold": 5
      },
      "createdAt": "<string>",
      "updatedAt": "<string>"
    }
  ],
  "pagination": {
    "nbPages": 2,
    "page": 2,
    "nbItems": 1,
    "itemsPerPage": 10
  }
}
Required ACL: addObject, deleteIndex, editSettings

Authorizations

x-algolia-application-id
string
header
required

Your Algolia application ID.

x-algolia-api-key
string
header
required

Your Algolia API key with the necessary permissions to make the request. Permissions are controlled through access control lists (ACL) and access restrictions. The required ACL to make a request is listed in each endpoint's reference.

Query Parameters

itemsPerPage
integer
default:10

Number of items per page.

Required range: 1 <= x <= 100
page
integer

Page number of the paginated API response.

Required range: x >= 1
action
enum<string>[]

Actions for filtering the list of tasks.

Example:

"save,replace,partial,append"

enabled
boolean

Whether to filter the list of tasks by the enabled status.

sourceID
string[]

Source IDs for filtering the list of tasks.

Universally uniqud identifier (UUID) of a source.

sourceType
enum<string>[]

Filters the tasks with the specified source type.

Example:

"json,commercetools"

destinationID
string[]

Destination IDs for filtering the list of tasks.

Universally unique identifier (UUID) of a destination resource.

triggerType
enum<string>[]

Type of task trigger for filtering the list of tasks.

Example:

"onDemand,schedule,subscription,streaming"

withEmailNotifications
boolean

If specified, the response only includes tasks with notifications.email.enabled set to this value.

sort
enum<string>
default:createdAt

Property by which to sort the list of tasks.

Available options:
enabled,
triggerType,
action,
updatedAt,
createdAt
order
enum<string>
default:desc

Sort order of the response, ascending or descending.

Available options:
asc,
desc

Response

OK

Configured tasks and pagination information.

tasks
object[]
required
pagination
object
required

Paginated API response.

I