> ## 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.

# list_views_and_blocks

> List available views for the patient, optionally with blocks for a specific view type.

List available views for the patient. Optionally provide `view_type` to list blocks within that view.

## Parameters

| Parameter    | Required | Type                | Description                                                                                                      |
| ------------ | -------- | ------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `patient_id` | Yes      | `string`            | Patient user ID                                                                                                  |
| `view_type`  | No       | `string`            | Optional view type to list blocks for (e.g., `symptom_snapshot`)                                                 |
| `date_from`  | No       | `string` (ISO 8601) | Inclusive lower bound on snapshot `created_at`. Per-view `view_id` resolves to the latest version in the window. |
| `date_to`    | No       | `string` (ISO 8601) | Inclusive upper bound on snapshot `created_at`.                                                                  |

## Example output

Illustrative:

```json theme={null}
{
  "views": [
    {
      "view_type": "symptom_snapshot",
      "segment_availability": ["temp", "blocks"]
    }
  ]
}
```
