# List a run’s steps

> Source: https://elaichi.ai/docs/api-reference/workflows/automation/listautomationrunsteps/

`GET /automation/{id}/run/{runId}/step`

Resource: **Workflow** · API: **Workflows**

## Path parameters

- **`id`** _(string, required)_
  Resource id
- **`runId`** _(string, required)_
  Resource id

## Query parameters

- **`key`** _(string)_
  Only this step’s own executions (for example one loop step’s per-item list). 400 when it is not a valid step key.

## Response body

- **`result`** _(array<object>)_
  - **`seq`** _(integer)_
  - **`path`** _(string)_
  - **`key`** _(string)_
  - **`type`** _(string)_
  - **`label`** _(string)_
  - **`status`** _(string)_
  - **`attempt`** _(integer)_
  - **`tier`** _(string,null)_
  - **`target`** _(string,null)_
  - **`started_at`** _(string)_
  - **`finished_at`** _(string)_
  - **`duration_ms`** _(integer)_
  - **`output_preview`** _(string,null)_
  - **`output_truncated`** _(boolean)_
  - **`has_output`** _(boolean)_
  - **`error`** _(unknown)_
  - **`iteration`** _(unknown)_
- **`next_cursor`** _(string,null)_
- **`prev_cursor`** _(string,null)_

## Code examples

### curl

```bash
curl -X GET 'https://api.elaichi.ai/automation/<id>/run/<runId>/step' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.elaichi.ai/automation/<id>/run/<runId>/step', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/automation/<id>/run/<runId>/step"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())
```
