The /tasks route returns information about asynchronous operations (indexing, document updates, settings changes, and so on).
Tasks are returned in descending order of uid by default, so the most recently created or updated tasks appear first. Results are paginated and can be filtered using query parameters such as indexUids, statuses, types, and date ranges.
An API key is a token that you provide when making API calls. Read more about how to secure your project.
Include the API key to the Authorization header, for instance:
-H 'Authorization: Bearer 6436fc5237b0d6e0d64253fbaac21d135012ecf1'If you use a SDK, ensure you instantiate the client with the API key, for instance with JS SDK:
const client = new MeiliSearch({
host: 'MEILISEARCH_URL',
apiKey: '6436fc5237b0d6e0d64253fbaac21d135012ecf1'
});Maximum number of batches to return.
x >= 0uid of the first batch returned.
x >= 0If true, returns results in the reverse order, from oldest to most recent.
Permits to filter tasks by their batch uid. By default, when the
batchUids query parameter is not set, all task uids are returned.
It's possible to specify several batch uids by separating them with
the , character.
x >= 0Permits to filter tasks by their uid. By default, when the uids query
parameter is not set, all task uids are returned. It's possible to
specify several uids by separating them with the , character.
x >= 0Permits to filter tasks using the uid of the task that canceled them.
It's possible to specify several task uids by separating them with
the , character.
x >= 0Permits to filter tasks by their related type. By default, when types
query parameter is not set, all task types are returned. It's possible
to specify several types by separating them with the , character.
Permits to filter tasks by their status. By default, when statuses
query parameter is not set, all task statuses are returned. It's
possible to specify several statuses by separating them with the ,
character.
The status of a task.
enqueued, processing, succeeded, failed, canceled Permits to filter tasks by their related index. By default, when
indexUids query parameter is not set, the tasks of all the indexes
are returned. It is possible to specify several indexes by separating
them with the , character.
Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.
Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.
Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.
Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.
Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.
Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.
The list of tasks is returned.
Response containing a paginated list of tasks
Array of task objects matching the query
Total number of tasks matching the query
x >= 0Maximum number of tasks returned
x >= 0The first task uid returned
x >= 0Value to send in from to fetch the next slice of results. Null when all data has been browsed
x >= 0