Skip to content

Worker Execution


Endpoints

GET       /workflows/:id/worker_executions

A worker execution is a record of an individual worker's run within a workflow execution, capturing its status, result, and timing details.

The worker execution object

What a worker execution object looks like?

{
  "id": "wkex_3bNhXpQrLo7TmK2sJfGvWe1cA",
  "status": "COMPLETED",
  "worker_id": "wrkr_aVFPQTerHF2JaO0hILbp959v7",
  "worker_name": "Starter",
  "worker_type": "STARTER",
  "workflow_execution_id": "wfex_T1eYymTSIptJ4Hyt1Z6p4uGOe",
  "workflow_id": "wrkf_P95OLO61oGM5NwFn3W4iMl7rs",
  "workflow_name": "File Generator Workflow",
  "trigger": "API",
  "created": 1632835285,
  "updated": 1632835287,
  "started": 1632835286,
  "duration": 1.54,
  "cpu_time": 1.17,
  "result": {},
  "input_params": {}
}
Property Description
id string Unique identifier (UID) for the worker execution.
status string The current status of the worker execution. It can be RUNNING, COMPLETED or ERROR.
worker_id string The unique identifier of the worker that was executed.
worker_name string The name of the worker that was executed.
worker_type string The type of worker. It can be STARTER, BASIC or ENDER.
workflow_execution_id string The unique identifier of the parent workflow execution.
workflow_id string The unique identifier of the workflow.
workflow_name string The name of the workflow.
trigger string The type of trigger that initiated the workflow execution.
created timestamp Time at which the worker execution was created. Measured in seconds since the Unix epoch.
updated timestamp Time at which the worker execution was last updated. Measured in seconds since the Unix epoch.
started timestamp Time at which the worker execution was started. Measured in seconds since the Unix epoch.
duration number Total wall-clock time in seconds for the worker execution.
cpu_time number Total CPU time in seconds consumed by the worker execution.
result object The output data produced by the worker after execution.
input_params object The input parameters passed to the worker.
version string Indicates the worker execution's current version.

List worker executions

Returns all worker executions grouped by a workflow execution.

To list worker executions for a workflow, run the following:

curl "https://api.everysk.com/v2/workflows/wrkf_P95OLO61oGM5NwFn3W4iMl7rs/worker_executions?workflow_execution_id=wfex_T1eYymTSIptJ4Hyt1Z6p4uGOe" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -G

The above call returns the following JSON object:

{
  "worker_executions": [
    {
      "worker_id": "wrkr_aVFPQTerHF2JaO0hILbp959v7",
      "worker_name": "Starter",
      "is_parallel_execution": false,
      "execution": {
        "id": "wkex_3bNhXpQrLo7TmK2sJfGvWe1cA",
        "worker_id": "wrkr_aVFPQTerHF2JaO0hILbp959v7",
        "worker_name": "Starter",
        "worker_type": "STARTER",
        "status": "COMPLETED",
        "created": 1632835285,
        "started": 1632835286,
        "ended": 1632835287,
        "duration": 1.54,
        "parallel_index": -1
      }
    },
    ...
  ],
  "parallel_index_max": -1
}

HTTP Request

GET /workflows/:id/worker_executions

HTTP Parameters

Parameter Description
id string REQUIRED A unique identifier (UID) for the workflow.
workflow_execution_id string optional, default is null Filter worker executions by a specific workflow execution id.
with_result boolean optional, default is False When True, the result data of each worker execution will be included.

Retrieve a worker execution

Retrieves the details of a specific worker execution by supplying the worker execution's id.

To retrieve a worker execution, run the following:

curl "https://api.everysk.com/v2/workflows/wrkf_P95OLO61oGM5NwFn3W4iMl7rs/worker_executions?worker_execution_id=wkex_3bNhXpQrLo7TmK2sJfGvWe1cA" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -G

The above call returns the following JSON object:

{
  "worker_execution": {
    "id": "wkex_3bNhXpQrLo7TmK2sJfGvWe1cA",
    "status": "COMPLETED",
    "worker_id": "wrkr_aVFPQTerHF2JaO0hILbp959v7",
    "worker_name": "Starter",
    "worker_type": "STARTER",
    "workflow_execution_id": "wfex_T1eYymTSIptJ4Hyt1Z6p4uGOe",
    "workflow_id": "wrkf_P95OLO61oGM5NwFn3W4iMl7rs",
    "workflow_name": "File Generator Workflow",
    "trigger": "API",
    "created": 1632835285,
    "updated": 1632835287,
    "started": 1632835286,
    "duration": 1.54,
    "cpu_time": 1.17,
    "result": {},
    "input_params": {}
  }
}

HTTP Request

GET /workflows/:id/worker_executions

HTTP Parameters

Parameter Description
id string REQUIRED A unique identifier (UID) for the workflow.
worker_execution_id string REQUIRED A unique identifier (UID) for the worker execution.
with_result boolean optional, default is True When True, the result data of the worker execution is included.