Query logs
Returns a LogQuery builder scoped to one patient.
POST
sdk:state-read
Chain filter, projection, ordering, and aggregation methods, then call a terminal to run: .execute() → LogQueryResult, .count() → int, .single() / .maybe_single() → dict. Filter paths must be rooted at type, timestamp, trace, or payload — other roots return 422. Add .with_count() to include total_count and has_more in the response (one extra server-side COUNT op, opt-in). Server cap: limit ≤ 1000 per request — paginate with .limit(1000).offset(n) for larger result sets.
Parameters
Olira patient id.
Returns
LogQueryResult — Iterable, indexable result. Call .as_logs() to parse rows into typed LogEntry when no .select() was used.
Rows returned in this page.
Projected or raw log dicts.
Total matching rows across all pages. Only set when .with_count() was used.
True when more rows exist beyond this page. Only set when .with_count() was used.
Echo of the queried patient id.
Set on population queries.
Raises
| Exception | When |
|---|---|
ValidationError | Unknown operator (client-side check), or HTTP 422 from the server (invalid field root, unsupported op, limit > 1000). |
AuthError | HTTP 401 or 403 — invalid API key or insufficient OAuth scope for this endpoint. |
ServerError | HTTP 409 (e.g. conflicting external identifier) or repeated 5xx after retries; includes status_code when applicable. |
RateLimitError | HTTP 429 — rate limited; check retry_after (seconds). |
NetworkError | Connection timeout, DNS failure, or read error after retries. |
Previous
population_logsReturns a LogQuery builder scoped to the whole organization or an explicit patient cohort.
Next

