The /batches route allows you to monitor how Meilisearch is grouping and processing asynchronous operations.
/batches
route gives information about the progress of batches of asynchronous operations.
uid
0
and increases by one for every new batch.
details
progress
steps
and percentage
. Once Meilisearch has fully processed a batch, its progress
is set to null
.
steps
Name | Description |
---|---|
currentStep | A string describing the operation |
total | The total number of operations in the step |
finished | The number of operations Meilisearch has completed |
steps
array. If the finished
field of the last item in the steps
array does not update, Meilisearch may be stuck.percentage
stats
totalNbTasks
status
types
types
of tasks contained in the batch.
indexUids
progressTrace
writeChannelCongestion
internalDatabaseSizes
duration
processing
state, in ISO 8601 format. Set to null
while the batch is processing tasks
startedAt
processing
, in RFC 3339 format
finishedAt
processing
, whether failed
, succeeded
, or canceled
, in RFC 3339 format
batchStrategy
results
array.
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.
/batches
, such as uids
and statuses
, target tasks instead of batches.For example, ?uids=0
returns a batch containing the task with a taskUid
equal to 0
, instead of a batch with a batchUid
equal to 0
.Query Parameter | Default Value | Description |
---|---|---|
uids | * (all task uids) | Select batches containing the tasks with the specified uid s. Separate multiple task uids with a comma (, ) |
batchUids | * (all batch uids) | Filter batches by their uid . Separate multiple batch uids with a comma (, ) |
indexUids | * (all indexes) | Select batches containing tasks affecting the specified indexes. Separate multiple indexUids with a comma (, ) |
statuses | * (all statuses) | Select batches containing tasks with the specified status . Separate multiple task statuses with a comma (, ) |
types | * (all types) | Select batches containing tasks with the specified type . Separate multiple task types with a comma (, ) |
limit | 20 | Number of batches to return |
from | uid of the last created batch | uid of the first batch returned |
reverse | false | If true , returns results in the reverse order, from oldest to most recent |
beforeEnqueuedAt | * (all tasks) | Select batches containing tasks with the specified enqueuedAt field |
beforeStartedAt | * (all tasks) | Select batches containing tasks with the specified startedAt field |
beforeFinishedAt | * (all tasks) | Select batches containing tasks with the specified finishedAt field |
afterEnqueuedAt | * (all tasks) | Select batches containing tasks with the specified enqueuedAt field |
afterStartedAt | * (all tasks) | Select batches containing tasks with the specified startedAt field |
afterFinishedAt | * (all tasks) | Select batches containing tasks with the specified finishedAt field |
Name | Type | Description |
---|---|---|
results | Array | An array of batch objects |
total | Integer | Total number of batches matching the filter or query |
limit | Integer | Number of batches returned |
from | Integer | uid of the first batch returned |
next | Integer | Value passed to from to view the next “page” of results. When the value of next is null , there are no more tasks to view |
200 Ok
Name | Type | Description |
---|---|---|
batch_uid * | String | uid of the requested batch |
200 Ok