Query parameters

  • limit number

    Maximum number of results to return.

    Default value is 20.

  • from number

    Fetch the next set of results from the given uid.

  • uids number

    Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the , character.

  • Permits to filter tasks by their related index. By default, when indexUids query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the , character.

  • statuses string

    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.

  • types string

    Permits to filter tasks by their related type. By default, when types query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the , character.

  • Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the , character.

  • Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format.

  • Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format.

  • Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format.

  • Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format.

  • Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format.

  • Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • results array[object] Required

      Meilisearch is an asynchronous API. It means that the API does not behave as you would typically expect when handling the request's responses.

      Some operations are put in a queue and will be executed in turn (asynchronously). In this case, the server response contains the identifier to track the execution of the operation.

      Learn More.

      Hide results attributes Show results 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.

    • total integer Required

      Total number of browsable results using offset/limit parameters for the given resource.

    • limit integer Required

      Limit given for the query. If limit is not provided as a query parameter, this parameter displays the default limit value.

    • from integer Required

      The first task uid returned.

    • next integer Required

      Represents the value to send in from to fetch the next slice of the results. The first item for the next slice starts at this exact number. When the returned value is null, it means that all the data have been browsed in the given order.

GET /tasks
curl \
 -X GET https://example.meilisearch.com:7700/tasks \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "results": [
    {
      "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"
    },
    {
      "uid": 0,
      "indexUid": "movies_Review",
      "status": "failed",
      "type": "documentAdditionOrUpdate",
      "canceledBy": null,
      "details": {
        "receivedDocuments": 67493,
        "indexedDocuments": 0
      },
      "error": {
        "message": "Document does not have a `:primaryKey` attribute: `:documentRepresentation`.",
        "code": "missing_document_id",
        "type": "invalid_request",
        "link": "https://docs.meilisearch.com/errors#missing_document_id"
      },
      "duration": "PT5S",
      "enqueuedAt": "2021-01-01T09:38:00.000000Z",
      "startedAt": "2021-01-01T09:38:02.000000Z",
      "finishedAt": "2021-01-01T09:38:07.000000Z"
    }
  ],
  "limit": 2,
  "from": 1,
  "next": null
}