Skip to main content
GET
/
tasks
cURL
curl \
  -X GET 'MEILISEARCH_URL/tasks'
{
  "results": [
    {
      "uid": 144,
      "indexUid": "mieli",
      "status": "succeeded",
      "type": "indexCreation",
      "canceledBy": null,
      "details": null,
      "error": null,
      "duration": "PT0.009330S",
      "enqueuedAt": "2024-08-08T09:01:13.348471Z",
      "startedAt": "2024-08-08T09:01:13.349442Z",
      "finishedAt": "2024-08-08T09:01:13.358772Z"
    }
  ],
  "total": 1,
  "limit": 1,
  "from": 144,
  "next": null
}

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

Query Parameters

limit
integer<u-int32>
default:20

Maximum number of batches to return.

Required range: x >= 0
from
integer<u-int32>

uid of the first batch returned.

Required range: x >= 0
reverse
boolean

If true, returns results in the reverse order, from oldest to most recent.

batchUids
integer<u-int32>

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

Required range: x >= 0
uids
integer<u-int32>[]

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.

Required range: x >= 0
canceledBy
integer<u-int32>[]

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.

Required range: x >= 0
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.

statuses
enum<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.

The status of a task.

Available options:
enqueued,
processing,
succeeded,
failed,
canceled
indexUids
string[]

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.

afterEnqueuedAt
string

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

beforeEnqueuedAt
string

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

afterStartedAt
string

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

beforeStartedAt
string

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

afterFinishedAt
string

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

beforeFinishedAt
string

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

Response

The list of tasks is returned.

Response containing a paginated list of tasks

results
object[]
required

Array of task objects matching the query

total
integer<u-int64>
required

Total number of tasks matching the query

Required range: x >= 0
limit
integer<u-int32>
required

Maximum number of tasks returned

Required range: x >= 0
from
integer<u-int32> | null

The first task uid returned

Required range: x >= 0
next
integer<u-int32> | null

Value to send in from to fetch the next slice of results. Null when all data has been browsed

Required range: x >= 0