block_id. view_type is optional; if omitted, or if the block isn’t found in the named view, all other views are searched automatically and the response includes a warning naming the view it came from.
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
patient_id | Yes | string | Patient user ID |
block_id | Yes | string | Block ID to retrieve |
view_type | No | string | View type to search first (e.g. symptom_snapshot). Optional; if omitted or the block is not in this view, all other views are searched automatically. |
view_id | No | string | SummarySnapshotDocument _id (preferred when known) |
date_from | No | string (ISO 8601) | Inclusive lower bound on block created_at. Resolves to the latest block version in the window. |
date_to | No | string (ISO 8601) | Inclusive upper bound on block created_at. |
describe | No | boolean | When true, returns the block content’s shape (top-level keys, array element fields, array lengths) instead of the content itself. Use to learn structure before issuing a targeted query (default: false). |
query | No | string (JMESPath) | Apply a JMESPath expression to the block’s raw content server-side. Use to filter, project, or aggregate large cumulative blocks without pulling them whole (e.g. entries[?date >= '2000-01-01'], length(entries)). For name/text substring filters use the case-insensitive, null-safe icontains(field, 'value') rather than the case-sensitive built-in contains() (also available: lower, upper). |
diff | No | boolean | When true AND date_from is set (view_type path only), returns a line-level diff between the block snapshot just before date_from and the snapshot at/before date_to (content_before, content_after, added, removed). |
format | No | "raw" or "markdown" | Output format (default: raw). "pretty" is accepted as a deprecated alias for "markdown". |

