# AutomationRunStep

What one step did in a run. A step inside a loop, or one that several lines lead to, has one row per time it ran. What it worked with and handed on is shown only when its run reveals data to you.

## Used by
- GET /api/v2/automation-runs/{automation_run}/steps: List what each step of a run did (AutomationRunStepList)

## AutomationRunStep fields
- id (integer, required): Unique identifier.
- automation_run_id (integer, required): The run it belongs to.
- node_key (string ≤ 36, required): The key of the step in the flow the run started with.
- node_type (string ≤ 255, required): The step type, such as `action.notify`.
- node_label (string ≤ 255, required): The step type's name.
- scope (string ≤ 120, required): Inside a loop, which loop and item it ran for; empty outside loops.
- iteration (integer or null, required): Inside a loop, the number of the item, counting from 0.
- execution (integer, required): Which time the step ran in its scope, counting from 1, for a step several lines lead to.
- came_from (array of object, required): The lines the run reached the step over.
  - node (string ≤ 36, required): Key of the step the line came from.
  - execution (integer, required): Which time that step ran.
  - late (boolean, required): Whether the line arrived after the step had already run.
  - lane (string or null ≤ 40, optional): The lane the line left by.
- status (string, required): `completed`, `failed`, or `waiting` at a step that waits.
- attempts (integer, required): How often the step was tried, retries included.
- started_at (timestamp (YYYY-MM-DDThh:mm:ssZ) or null, required): When the step began.
- finished_at (timestamp (YYYY-MM-DDThh:mm:ssZ) or null, required): When it ended.
- duration_ms (integer or null, required): How long it took, in milliseconds.
- message (string or null, required): What the step reported, such as why it failed. Record data appears in it only when the run reveals data to you.
- input (array of object, required, detail only): What the step worked with, as the run page shows it. Empty unless the run reveals data to you.
  - label (string, required): What the value is.
  - value (string, required): The value, as the run page shows it.
- output (array of object, required, detail only): What the step handed on. A step that wrote a record shows that record and the fields it set, only when you may see it. Empty unless the run reveals data to you.
  - label (string, required): What the value is.
  - value (string, required): The value, as the run page shows it.
- created_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): When the step was recorded.
- updated_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): Last-write timestamp.

Only on `?view=detail`: input, output

## Variants

### AutomationRunStepList

What a collection returns, and what `?view=summary` returns on a single record.

17 fields.
Omits: input, output

## Example
```json
{
  "id": 1,
  "automation_run_id": 1,
  "node_key": "…",
  "node_type": "…",
  "node_label": "…",
  "scope": "…",
  "iteration": 1,
  "execution": 1,
  "came_from": [
    {
      "node": "…",
      "execution": 1,
      "late": false,
      "…": "1 optional field left out"
    }
  ],
  "status": "completed",
  "attempts": 1,
  "started_at": "2026-03-04T09:15:00Z",
  "finished_at": "2026-03-04T09:15:00Z",
  "duration_ms": 1,
  "message": "…",
  "input": [
    {
      "label": "…",
      "value": "…"
    }
  ],
  "output": [
    {
      "label": "…",
      "value": "…"
    }
  ],
  "created_at": "2026-03-04T09:15:00Z",
  "updated_at": "2026-03-04T09:15:00Z"
}
```
