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

# List Session Events

List events related to a session (aggregated from all executions), newest or oldest first, with cursor pagination.

## **POST** `/revisions/:id/data/query` (Command: `list_session_events`)

### Request Body

| Parameter        | Type    | Required | Description                                                              |
| :--------------- | :------ | :------- | :----------------------------------------------------------------------- |
| `engine`         | string  | Yes      | Must be `workflow_blobhub`.                                              |
| `command`        | string  | Yes      | Must be `list_session_events`.                                           |
| `session_id`     | string  | Yes      | The ID of the session.                                                   |
| `created_since`  | string  | No       | Return events with `created_at > created_since`.                         |
| `created_before` | string  | No       | Return events with `created_at < created_before`.                        |
| `ascending`      | boolean | No       | Sort direction. Default `false` (newest first).                          |
| `cursor`         | string  | No       | Opaque page cursor from a previous response's `cursor`. Omit for page 1. |
| `limit`          | integer | No       | Max events per page, 1–1000 (out-of-range → 400). Default `10`.          |

### Response

| Parameter        | Type   | Description                                                              |
| :--------------- | :----- | :----------------------------------------------------------------------- |
| `session_events` | array  | Page of event objects.                                                   |
| `cursor`         | string | Opaque cursor for the next page, or `null` when there are no more pages. |

**Pagination.** Pass the response `cursor` back as the request `cursor` to fetch the next page; stop when `cursor`
is `null`. The cursor is opaque — send it back verbatim. An invalid or expired cursor returns `400 invalid_cursor`.
This is the same `cursor` + `limit` contract used by every `list_*` command. The `created_since` / `created_before`
timestamps remain available as independent time filters.

### Example

<CodeGroup>
  ```json Request theme={null}
  {
    "engine": "workflow_blobhub",
    "command": "list_session_events",
    "session_id": "sess_001",
    "limit": 50
  }
  ```

  ```json Response theme={null}
  {
    "status": "success",
    "session_events": [],
    "cursor": null
  }
  ```
</CodeGroup>

### See also

* [BlobHub Worker](/worker/introduction) — the worker polls this command to react to
  `session_object_modified`, `session_object_deleted`, and `session_thread_item_posted` events.
