---
title: "List run events"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List run events

Path: cloudraker.run API

`GET /_run/{id}/events`

Page through run events (after_seq, limit 200, max 1000).

## Authentication

- `bearer`, http, header `Authorization`

## Path parameters

- `id` (`getRunByIdEvents.path.id`; string, required)

## Query parameters

- `after_seq` (`getRunByIdEvents.query.after_seq`; integer, optional)
  - default `0`
- `limit` (`getRunByIdEvents.query.limit`; integer, optional)
  - max 1000; default `200`

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://your-org.cloudraker.run/_run/<id>/events' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://your-org.cloudraker.run/_run/<id>/events';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://your-org.cloudraker.run/_run/<id>/events"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

One page of events.

#### Example

```json
{
  "events": [
    {
      "id": "string",
      "seq": 0,
      "type": "message",
      "ts": "2019-08-24T14:15:22Z",
      "run_id": "string",
      "agent": "string",
      "turn": 0,
      "deployment": "string",
      "metadata": {
        "property1": "string",
        "property2": "string"
      },
      "data": {}
    }
  ]
}
```

- `events` (`getRunByIdEvents.response.200.events`; array<object>, optional)
  - `id` (`getRunByIdEvents.response.200.events.id`; string, required) — Stable across stream replay and webhook retries. De-duplicate on it.
  - `seq` (`getRunByIdEvents.response.200.events.seq`; integer, required) — From 1, strictly increasing per run, no gaps.
  - `type` (`getRunByIdEvents.response.200.events.type`; string, required)
    - example `"message"`
  - `ts` (`getRunByIdEvents.response.200.events.ts`; string, required)
    - format `date-time`
  - `run_id` (`getRunByIdEvents.response.200.events.run_id`; string, required)
  - `agent` (`getRunByIdEvents.response.200.events.agent`; string, required)
  - `turn` (`getRunByIdEvents.response.200.events.turn`; integer, required)
  - `deployment` (`getRunByIdEvents.response.200.events.deployment`; string, required) — Deployment commit SHA.
  - `metadata` (`getRunByIdEvents.response.200.events.metadata`; map<string>, required) — Max 20 keys, string values, 1 KB in total. Echoed on every event and webhook. `end_user` scopes data store records.
  - `data` (`getRunByIdEvents.response.200.events.data`; object, required) — The tool payload. The shape depends on `type`.

### 4XX

Error. See the `code` table in the guides.

#### Example

```json
{
  "error": {
    "code": "run_busy",
    "message": "string",
    "run_id": "string",
    "details": null
  }
}
```

- `error` (`getRunByIdEvents.response.4XX.error`; object, required)
  - `code` (`getRunByIdEvents.response.4XX.error.code`; string, required)
    - example `"run_busy"`
  - `message` (`getRunByIdEvents.response.4XX.error.message`; string, required)
  - `run_id` (`getRunByIdEvents.response.4XX.error.run_id`; string, optional)
  - `details` (`getRunByIdEvents.response.4XX.error.details`; unknown, optional)


Source: https://docs.cloudraker.com/run/api/get-run-by-id-events/index.md
