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

# get_events

> Get completed events for the patient with optional time, type, and trace filters.

Get completed events for the patient (persisted as `StateTransition` documents). When `trace_type`, `trace_id`, or `log_type` are supplied the server first resolves matching `EventLog` IDs and returns the rows driven by those logs.

## Parameters

| Parameter    | Required | Type                    | Description                                                                                                                                                        |
| ------------ | -------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `patient_id` | Yes      | `string`                | Patient user ID                                                                                                                                                    |
| `date_from`  | No       | `string` (ISO 8601)     | Inclusive lower bound on `StateTransition.triggered_at` (and `EventLog.timestamp` when resolving via `log_type` / trace filters). Date-only values use `timezone`. |
| `date_to`    | No       | `string` (ISO 8601)     | Inclusive upper bound on `StateTransition.triggered_at`. Date-only values use `timezone`.                                                                          |
| `since`      | No       | `string` (ISO 8601)     | **Deprecated** alias for `date_from`.                                                                                                                              |
| `timezone`   | No       | `string` (IANA)         | Timezone for resolving date-only `date_from` / `date_to` (default: `"America/New_York"`).                                                                          |
| `log_type`   | No       | `string`                | When used with trace filters, resolves matching `EventLog` rows by `type`                                                                                          |
| `trace_type` | No       | `string`                | Resolve EventLog IDs by `trace.object_type` (e.g. `"check_in_response"`)                                                                                           |
| `trace_id`   | No       | `string`                | Resolve EventLog IDs by `trace.object_id` (opaque id string)                                                                                                       |
| `status`     | No       | `string`                | Status filter: `complete`, `pending`, `failed` (default: `complete`)                                                                                               |
| `limit`      | No       | `integer`               | Maximum number of transitions to return (max 200, default: `50`)                                                                                                   |
| `format`     | No       | `"raw"` or `"markdown"` | Output format (default: `raw`). `"pretty"` is accepted as a deprecated alias for `"markdown"`.                                                                     |

## Example output

Illustrative: each item may include `log_payload` for the originating clinical payload.

```json theme={null}
{
  "events": [
    {
      "log_type": "symptom_report",
      "triggered_at": "2026-03-18T10:15:00Z",
      "status": "complete"
    }
  ]
}
```
