Skip to main content
GET
/
batches
/
{batchUid}
cURL
curl \
  -X GET 'http://MEILISEARCH_URL/batches/BATCH_UID'
{
  "uid": 0,
  "details": {
    "receivedDocuments": 1,
    "indexedDocuments": 1
  },
  "progress": null,
  "stats": {
    "totalNbTasks": 1,
    "status": {
      "succeeded": 1
    },
    "types": {
      "documentAdditionOrUpdate": 1
    },
    "indexUids": {
      "INDEX_NAME": 1
    }
  },
  "duration": "PT0.364788S",
  "startedAt": "2024-12-10T15:48:49.672141Z",
  "finishedAt": "2024-12-10T15:48:50.036929Z",
  "batchStrategy": "batched all enqueued tasks"
}

Authorizations

Authorization
string
header
required

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'
});

Path Parameters

batchUid
string
required

The unique batch identifier.

Response

Returns the batch.

Represents a batch of tasks that were processed together.

uid
integer<u-int32>
required

The unique sequential identifier assigned to this batch. Batch UIDs are assigned in order of creation and can be used to retrieve specific batch information or correlate tasks that were processed together.

Required range: x >= 0
details
object
required

Aggregated details from all tasks in this batch. For example, if the batch contains multiple document addition tasks, this will show the total number of documents received and indexed across all tasks.

stats
object
required

Statistical information about the batch, including the number of tasks by status, the types of tasks included, and the indexes affected. Useful for understanding the composition and outcome of the batch.

progress
object

Real-time progress information for the batch if it's currently being processed. Contains details about which step is executing and the percentage of completion. This is null for completed batches.

duration
string | null

The total time spent processing this batch, formatted as an ISO-8601 duration (e.g., PT2.5S for 2.5 seconds). This is null for batches that haven't finished processing yet.

startedAt
string<date-time>

The timestamp when Meilisearch began processing this batch, formatted as an RFC 3339 date-time string. All batches have a start time as it's set when processing begins.

finishedAt
string<date-time> | null

The timestamp when this batch finished processing, formatted as an RFC 3339 date-time string. This is null for batches that are still being processed.

batchStrategy
string

Explains why the batch was finalized and stopped accepting more tasks. Common reasons include reaching the maximum batch size, encountering incompatible tasks, or processing being explicitly triggered.