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",
      "enabled": true,
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "cron": "* * 1 * *",
      "lastRun": "<string>",
      "nextRun": "<string>",
      "owner": "<string>",
      "input": {
        "mapping": {
          "format": "mappingkit/v1",
          "actions": [
            {
              "enabled": true,
              "trigger": "<string>",
              "fieldDirectives": [
                {
                  "fieldKey": "<string>",
                  "value": {}
                }
              ],
              "id": "<string>"
            }
          ]
        }
      },
      "failureThreshold": 50,
      "action": "replace",
      "subscriptionAction": "replace",
      "cursor": "<string>",
      "notifications": {
        "email": {
          "enabled": true
        }
      },
      "policies": {
        "criticalThreshold": 5
      }
    }
  ],
  "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. Page of the API response to retrieve.

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

Actions for filtering the list of tasks. Actions to perform on the Algolia index.

Action to perform on the Algolia index.

Available options:
replace,
save,
partial,
partialNoCreate,
append
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.

Available options:
bigcommerce,
bigquery,
commercetools,
csv,
docker,
ga4BigqueryExport,
json,
shopify,
push
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.

Task trigger, describing when a task should run.

  • onDemand. Manually trigger the task with the /run endpoint.

  • schedule. Regularly trigger the task on a cron schedule.

  • subscription. Trigger the task after an event is received, such as, a webhook.

  • streaming. Run the task continuously.

Available options:
onDemand,
schedule,
subscription,
streaming
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. Ascending or descending sort order.

Available options:
asc,
desc

Response

OK

Configured tasks and pagination information.

tasks
object[]
required
pagination
object
required

Paginated API response.