# GET /api/v2/automation-runs/{automation_run}/steps

List what each step of a run did

- MCP id: automation-runs.steps.index
- Scope: api:read:automations
- Scope: api:read:project_automations
- Scope: api:read:customer_automations
- Permission: automations::read
- Needs the automations feature on your organisation
- Rate cost: 1 unit, read bucket. `view=detail` makes it 3. Adds: `with_total=1` +2.
- Cache-Control: private, no-store

Returns the steps of one run in the order they ran.

A step inside a loop, or one several lines lead to, has one row per time it ran. Pass `view=detail` for what each step worked with and handed on, as the run page shows it; both are empty unless the run reveals data to you. The collection pages by cursor, and `total` is omitted unless you pass `with_total=1`. The declared permission is `automations::read`; for a project or customer automation, the `project_automations` or `customer_automations` permission of the same action applies instead.

## Parameters
- automation_run (integer or string, path): The AutomationRun's numeric id. Or its uuid, matching `[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`.
- view (string, optional): Which field set to render.
- per_page (integer 1 to 100, optional): Rows per page. At most 25 when `include` names a to-many relation; a larger value is 400 invalid-query-parameter.
- cursor (string, optional): Opaque keyset cursor from a previous page's links.next. Never construct one by hand.
- with_total (boolean, optional): Whether meta.page.total is counted for this request.
- filter[created_at] (timestamp (YYYY-MM-DDThh:mm:ssZ), optional): Creation timestamp. Pair with `sort=id` for a stable full export. Operators: = gte lt.
- filter[finished_at] (timestamp (YYYY-MM-DDThh:mm:ssZ), optional): When the steps ended. Operators: = gte lte null.
- filter[started_at] (timestamp (YYYY-MM-DDThh:mm:ssZ), optional): When the steps began. Operators: = gte lte null.
- filter[status] (string, optional): How the steps went. Operators: = ne in.
- filter[updated_at] (timestamp (YYYY-MM-DDThh:mm:ssZ), optional): Last-write timestamp. Use for incremental sync. Operators: = gte lt.
- sort (string, optional): Up to three keys, comma-separated, each optionally prefixed with `-` for descending.
- X-Request-Id (header, optional): A correlation id of your own. It is recorded in our logs next to the server's request id but never returned: the response header always carries the server's id. A value that does not match the pattern is discarded silently, never rejected.
- If-None-Match (header, optional): The ETag a read is conditional on. A match is answered 304 with no body.

## Response 200
- 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.
- 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.
- 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.
- 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.

## Errors
- 403 forbidden-by-policy | insufficient-permission | insufficient-token-scope: Forbidden.
- 304 : Not modified.
- 400 idempotency-key-required | invalid-cursor | invalid-query-parameter | malformed-request | unsupported-parameter: Bad request.
- 401 token-expired | unauthenticated: Unauthenticated.
- 404 endpoint-not-found | resource-not-found: Not found.
- 406 not-acceptable: Not acceptable.
- 429 rate-limit-exceeded: Too many requests.
- 500 internal-error: Server error.
- 503 tenant-unavailable: Service unavailable.

## Example
```bash
curl -G \
  'https://<your-url>/api/v2/automation-runs/1/steps' \
  --data-urlencode 'view=detail' \
  -H 'Authorization: Bearer <token>' \
  -H 'Accept: application/json'
```
