younifyd
Menu

Get task

Get task

GET/tasks/{task_id}

Use it in a workflow

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

Request

Path parameters

task_idinteger (u-int32)required

The task identifier.

Response

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

uidinteger (u-int32)

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.

statusstring

The status of a task.

One ofenqueuedprocessingsucceededfailedcanceled

typestring

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.

enqueuedAtstring

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.

json
{
  "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"
}

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

Get task — Meilisearch — Documentation