younifyd
Menu

List tasks

List tasks

GET/tasks

Use it in a workflow

  1. Add a step and choose the Meilisearch connector.
  2. Pick the List tasks action (under Async task management).
  3. Fill in the fields below, then reference the result from later steps as {{listTasks.response.data}}.

Request

Query parameters

limitinteger (u-int32)

Maximum number of batches to return.

Default 20

frominteger (u-int32)

`uid` of the first batch returned.

reverseboolean

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

batchUidsarray<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.

uidsarray<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.

canceledByarray<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.

typesarray<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.

statusesarray<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.

indexUidsarray<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.

afterEnqueuedAtstring

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

beforeEnqueuedAtstring

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

afterStartedAtstring

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

beforeStartedAtstring

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

afterFinishedAtstring

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

beforeFinishedAtstring

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

Response

Returns 200 with an object. Read it in later steps with {{listTasks.response.data.<field>}}.

resultsarray<object>

Array of task objects matching the query

uidinteger (u-int32)required

The unique sequential identifier assigned to this task. Task UIDs are assigned in order of creation and can be used to retrieve specific task information or track task dependencies.

batchUidinteger | null

The unique identifier of the batch that processed this task. Multiple tasks may share the same batch UID if they were processed together for efficiency. This is `null` for tasks that haven't been processed.

indexUidstring | null

The unique identifier of the index this task operates on. This is `null` for global tasks like `dumpCreation` or `taskDeletion` that don't target a specific index.

statusstringrequired

The status of a task.

One ofenqueuedprocessingsucceededfailedcanceled

typestringrequired

The type of the task.

One ofdocumentAdditionOrUpdatedocumentEditiondocumentDeletionsettingsUpdateindexCreationindexDeletionindexUpdateindexSwaptaskCancelationtaskDeletiondumpCreationsnapshotCreationexportupgradeDatabaseindexCompactionnetworkTopologyChangedsrUpdatedsrClear

canceledByinteger | null

If this task was canceled, this field contains the UID of the `taskCancelation` task that canceled it. This is `null` for tasks that were not canceled.

detailsobject | null

Contains type-specific information about the task, such as the number of documents processed, settings that were applied, or filters that were used. The structure varies depending on the task type.

erroroneOf
durationstring | null

The total time spent processing this task, formatted as an ISO-8601 duration (e.g., `PT0.5S` for 0.5 seconds). This is `null` for tasks that haven't finished processing yet.

enqueuedAtstringrequired

The timestamp when this task was added to the queue, formatted as an RFC 3339 date-time string. All tasks have an enqueued timestamp as it's set when the task is created.

startedAtstring

The timestamp when Meilisearch began processing this task, formatted as an RFC 3339 date-time string. This is `null` for tasks that are still in the queue waiting to be processed.

finishedAtstring

The timestamp when this task finished processing (whether successfully or with an error), formatted as an RFC 3339 date-time string. This is `null` for tasks that haven't finished yet.

networkoneOf
customMetadatastring | null

Custom metadata string that was attached to this task when it was created. This can be used to associate tasks with external systems, track task origins, or add any application-specific information.

totalinteger (u-int64)

Total number of tasks matching the query

limitinteger (u-int32)

Maximum number of tasks returned

frominteger | null

The first task uid returned

nextinteger | null

Value to pass as `from` parameter to get the next page. When `null`, there are no more tasks to retrieve.

json
{
  "results": [
    {
      "uid": 4312,
      "status": "processing",
      "type": "documentAdditionOrUpdate",
      "enqueuedAt": "2024-08-08_14:12:09.393Z",
      "batchUid": 12,
      "indexUid": "string",
      "canceledBy": 4326,
      "details": {},
      "error": null,
      "duration": null,
      "startedAt": "2024-08-08_14:12:09.393Z",
      "finishedAt": "2024-08-08_14:12:09.393Z"
    }
  ],
  "total": 0,
  "limit": 0,
  "from": 0,
  "next": 0
}

Need more? See the Meilisearch guide for connection setup and behaviour shared by every action.