Get a task

GET /tasks/:taskUid

Get a task

Path parameters

  • taskUid integer Required

    The task identifier

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • uid integer Required

      The unique sequential identifier of the task

    • indexUid string Required

      The unique identifier of the index where this task is operated

    • status string Required

      The status of the task

      Values are enqueued, processing, succeeded, or failed.

    • type string Required

      The type of the task

      Values are documentAdditionOrUpdate, documentDeletion, indexCreation, indexUpdate, indexDeletion, indexSwap, settingsUpdate, dumpCreation, taskCancelation, taskDeletion, or snapshotCreation.

    • canceledBy integer Required

      The uid of the task that performed the taskCancelation if the task has been canceled.

    • details object Required

      Details information of the task payload.

      Hide details attributes Show details attributes
      • Number of documents received for documentAdditionOrUpdate task.

      • Number of documents finally indexed for documentAdditionOrUpdate task or a documentAdditionOrUpdate batch of tasks.

      • Number of provided document ids for the documentDeletion task.

      • Number of documents finally deleted for documentDeletion and indexDeletion tasks.

      • Value for the primaryKey field encountered if any for indexCreation or indexUpdate task.

      • settings object
        Hide settings attributes Show settings attributes
      • dumpUid string

        Identifier generated for the dump for dumpCreation task.

      • Number of tasks that match the request for taskCancelation or taskDeletion tasks.

      • Number of tasks canceled for taskCancelation.

      • Number of tasks deleted for taskDeletion.

      • Original filter query for taskCancelation or taskDeletion tasks.

    • error object Required

      Error object containing error details and context when a task has a failed status.

      Hide error attributes Show error attributes
    • duration string | null

      Total elasped time the engine was in processing state expressed as a ISO-8601 duration format. Default is set to null

    • enqueuedAt string Required

      An RFC 3339 format for date/time/duration.

    • startedAt string Required

      An RFC 3339 format for date/time/duration.

    • finishedAt string Required

      An RFC 3339 format for date/time/duration.

  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
GET /tasks/:taskUid
curl \
 -X GET https://example.meilisearch.com:7700/tasks/:taskUid \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "uid": 1,
  "indexUid": "movies",
  "status": "succeeded",
  "type": "documentAdditionOrUpdate",
  "canceledBy": null,
  "details": {
    "receivedDocuments": 79000,
    "indexedDocuments": 79000
  },
  "error": null,
  "duration": "PT1S",
  "enqueuedAt": "2021-01-01T09:39:00.000000Z",
  "startedAt": "2021-01-01T09:39:01.000000Z",
  "finishedAt": "2021-01-01T09:39:02.000000Z"
}
Response examples (401)
{
  "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"
}
Response examples (404)
{
  "message": "Task :taskUid not found.",
  "code": "task_not_found",
  "type": "invalid_request",
  "link": "https://docs.meilisearch.com/errors/#task_not_found"
}