curl \
-X GET 'MEILISEARCH_URL/tasks' \
-H 'Authorization: Bearer API_KEY'{
"results": [
{
"uid": 144,
"indexUid": "mieli",
"status": "succeeded",
"type": "indexCreation",
"canceledBy": null,
"details": null,
"error": null,
"duration": "PT0.009330S",
"enqueuedAt": "2024-08-08T09:01:13.348471Z",
"startedAt": "2024-08-08T09:01:13.349442Z",
"finishedAt": "2024-08-08T09:01:13.358772Z"
}
],
"total": 1,
"limit": 1,
"from": 144,
"next": null
}{
"message": "The Authorization header is missing. It must use the bearer authorization method.",
"code": "missing_authorization_header",
"type": "auth",
"link": "https://docs.meilisearch.com/errors#missing_authorization_header"
}List tasks
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.
curl \
-X GET 'MEILISEARCH_URL/tasks' \
-H 'Authorization: Bearer API_KEY'{
"results": [
{
"uid": 144,
"indexUid": "mieli",
"status": "succeeded",
"type": "indexCreation",
"canceledBy": null,
"details": null,
"error": null,
"duration": "PT0.009330S",
"enqueuedAt": "2024-08-08T09:01:13.348471Z",
"startedAt": "2024-08-08T09:01:13.349442Z",
"finishedAt": "2024-08-08T09:01:13.358772Z"
}
],
"total": 1,
"limit": 1,
"from": 144,
"next": null
}{
"message": "The Authorization header is missing. It must use the bearer authorization method.",
"code": "missing_authorization_header",
"type": "auth",
"link": "https://docs.meilisearch.com/errors#missing_authorization_header"
}Authorizations
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'
});
Query Parameters
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 Response
The list of tasks is returned.
Response containing a paginated list of tasks