curl \
-X GET 'http://MEILISEARCH_URL/batches' \
-H 'Authorization: Bearer API_KEY'{
"results": [
{
"uid": 2,
"details": {
"stopWords": [
"of",
"the"
]
},
"progress": null,
"stats": {
"totalNbTasks": 1,
"status": {
"succeeded": 1
},
"types": {
"settingsUpdate": 1
},
"indexUids": {
"INDEX_NAME": 1
}
},
"duration": "PT0.110083S",
"startedAt": "2024-12-10T15:49:04.995321Z",
"finishedAt": "2024-12-10T15:49:05.105404Z"
}
],
"total": 1,
"limit": 20,
"from": 1,
"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 batches
Meilisearch groups compatible tasks (asynchronous operations) into batches for efficient processing.
For example, multiple document additions to the same index may be batched together. List batches to monitor their progress and performance.
Batches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first. Batch results are paginated and can be filtered with query parameters.
curl \
-X GET 'http://MEILISEARCH_URL/batches' \
-H 'Authorization: Bearer API_KEY'{
"results": [
{
"uid": 2,
"details": {
"stopWords": [
"of",
"the"
]
},
"progress": null,
"stats": {
"totalNbTasks": 1,
"status": {
"succeeded": 1
},
"types": {
"settingsUpdate": 1
},
"indexUids": {
"INDEX_NAME": 1
}
},
"duration": "PT0.110083S",
"startedAt": "2024-12-10T15:49:04.995321Z",
"finishedAt": "2024-12-10T15:49:05.105404Z"
}
],
"total": 1,
"limit": 20,
"from": 1,
"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
Returns the batches.
Response containing a paginated list of batches