Get an entity workflow run

GET/projects/{projectId}/entities/{entityId}/workflows/{workflowId}/runs/{runId}

Base URL: https://api.tinkermode.com

Return the workflow run with the specified ID, including the step execution records accumulated so far.

Authentication

Send an Authorization header of the form ModeCloud <AUTH_CODE>.

Must contain a user API key of a user with read permission on entity workflows (resource type: entityWorkflowRun, action: read), a service account token with the same permission, or a project API key.

Path parameters

NameTypeRequiredConstraintsDescription
projectIdintegerYesThe unique ID for a specified project.
entityIdstringYesEntity ID (unique within project)
workflowIdstringYesThe unique ID of the workflow (MongoDB ObjectID hex string).
runIdstringYesThe unique ID of the workflow run.

Responses

200 Successfully retrieved the workflow run.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
createdAtstringNoThe time the run was created (ISO 8601).
entityIdstringNoThe unique identifier for the entity the workflow belongs to.
errorobjectNoError information set when the run fails. Absent on non-failed runs.
Properties of error
PropertyTypeRequiredConstraintsDescription
codestringNoone of: user, internal, expiredMachine-readable error code. 'user': a failure the user can fix (see 'message'). 'internal': an unexpected failure the user cannot fix. 'expired': the run was not picked up before the timeout.
messagestringNoHuman-readable, user-facing description of the failure and how to address it. Present for 'user' errors. Safe to display; contains no internal implementation detail.
finishedAtstringNoThe time the run completed (ISO 8601). Absent while the run is queued or running.
idstringNoThe unique identifier for the workflow run.
projectIdintegerNoThe unique identifier for the project the run belongs to.
statestringNoone of: queued, running, succeeded, failedThe current lifecycle state of the run.
stepsarray<object>NoThe step execution records for this run, in the order the steps were started. Empty on runs that have not executed any step yet.
Properties of steps
PropertyTypeRequiredConstraintsDescription
branchIdstringNoThe ID of the parent step's branch this step belongs to. Absent for top-level steps.
finishedAtstringNoThe time the step completed (ISO 8601). Absent while the step is running.
idstringNoThe identifier of the workflow step that was executed.
inputsobjectNoThe resolved input values the step ran with.
nodestringNoThe node type the step executed.
outputsobjectNoThe output values the step produced. Absent unless the step succeeded with output.
parentIdstringNoThe ID of the step this step branched from. Absent for top-level steps.
startedAtstringNoThe time the step started (ISO 8601).
statestringNoone of: running, succeeded, failed, cancelledThe state of the step execution.
triggerobjectNoContextual information about what triggered this run (e.g. cron schedule, manual).
updatedAtstringNoThe time the run was last updated (ISO 8601).
workflowIdstringNoThe unique identifier for the workflow that was executed.

Response example

{
  "createdAt": "2026-07-28T10:15:00.000Z",
  "entityId": "entity123456",
  "finishedAt": "2026-07-28T10:15:01.688Z",
  "id": "6871f2c6a4b39d0f1a2c3d4e::daily-check::1785233700000000000",
  "projectId": 123,
  "state": "succeeded",
  "steps": [
    {
      "finishedAt": "2026-07-28T10:15:01.402Z",
      "id": "read-temperature",
      "inputs": {
        "entityId": "entity123456",
        "metricsDefinitionId": "environment",
        "projectId": 123,
        "query": {
          "aggregation": "avg",
          "begin": "2026-07-28T09:15:00.000Z",
          "end": "2026-07-28T10:15:00.000Z",
          "selectValues": [
            "temperature"
          ]
        }
      },
      "node": "mode.entity.metrics",
      "outputs": {
        "aggregation": "avg",
        "begin": "2026-07-28T09:15:00.000Z",
        "data": {
          "temperature": {
            "displayName": "Temperature",
            "timestamp": "2026-07-28T10:14:32.000Z",
            "unit": "C",
            "value": 31.4
          }
        },
        "end": "2026-07-28T10:15:00.000Z",
        "entityId": "entity123456"
      },
      "startedAt": "2026-07-28T10:15:01.114Z",
      "state": "succeeded"
    },
    {
      "finishedAt": "2026-07-28T10:15:01.688Z",
      "id": "notify-ops",
      "inputs": {
        "message": "Temperature is 31.4 C, above the 28 C threshold.",
        "platform": "slack",
        "target": {
          "channelId": "C024BE91L",
          "workspaceId": "T012AB3CD"
        }
      },
      "node": "mode.assistant.notify",
      "outputs": {
        "message": "Temperature is 31.4 C, above the 28 C threshold.",
        "platform": "slack",
        "target": {
          "channel": "C024BE91L",
          "workspace": "T012AB3CD"
        }
      },
      "startedAt": "2026-07-28T10:15:01.403Z",
      "state": "succeeded"
    }
  ],
  "updatedAt": "2026-07-28T10:15:01.690Z",
  "workflowId": "6871f2c6a4b39d0f1a2c3d4e"
}

401 Authorization is required to access this resource.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

403 Request failed because of denied permission.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

404 Workflow run not found.

429 Request failed because of rate limit.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

500 An unexpected error has occurred.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

503 The service is temporarily unavailable.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.