# List a workflow’s runs

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

`GET /automation/{id}/run`

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

## Path parameters

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

## Query parameters

- **`q`** _(string)_
  Matches run ids and trigger keys. LIKE wildcards are matched literally. Max 200 characters.
- **`status`** _(string)_
- **`session_id`** _(string)_
  Only the runs of this runbook session.
- **`include`** _(string)_
  `progress` fills `progress` (steps done of total) on each running or waiting row. Off by default: it asks every such row’s run for its state.
  Allowed: `progress`

## Response body

- **`result`** _(array<object>)_
  - **`run_id`** _(string)_
  - **`automation_id`** _(string)_
  - **`mode`** _(string)_
  - **`status`** _(string)_
  - **`outcome`** _(string,null)_
  - **`skip_reason`** _(string,null)_
  - **`trigger_key`** _(string,null)_
  - **`trigger_type`** _(string)_
  - **`actor_user_id`** _(string,null)_
  - **`scheduled_at`** _(string,null)_
  - **`version_id`** _(string,null)_
  - **`version_number`** _(integer,null)_
  - **`queued_at`** _(string)_
  - **`started_at`** _(string,null)_
  - **`finished_at`** _(string,null)_
  - **`failing_step`** _(unknown)_
  - **`error`** _(unknown)_
  - **`retry_of_run_id`** _(string,null)_
  - **`from_step_key`** _(string,null)_
  - **`counts`** _(unknown)_
  - **`waiting`** _(unknown)_
  - **`chain`** _(unknown)_
  - **`can_retry`** _(boolean)_
  - **`can_cancel`** _(boolean)_
  - **`progress`** _(object,null)_
    Top-level steps finished out of all of them. Present only on a running or waiting row of a runs list page, null elsewhere.
- **`next_cursor`** _(string,null)_
- **`prev_cursor`** _(string,null)_

## Code examples

### curl

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

### JavaScript

```javascript
const response = await fetch('https://api.elaichi.ai/automation/<id>/run', {
  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"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

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