Query population logs
Returns a LogQuery builder scoped to the whole organization or an explicit patient cohort.
POST
sdk:state-read
Omit patient_ids (or pass None) for org-wide queries; pass a list to restrict to a cohort. All chainable builder methods are identical to logs — see that entry.
Parameters
Cohort of patient ids. None = whole org. Omitting queries all patients org-wide — use filters and limits when running at scale.
Returns
LogQueryResult — Same shape as logs — call .execute() or another terminal to run.
Total rows matched.
Log dicts or aggregated dicts.
Echo of the org id.
Null for population queries.
Raises
| Exception | When |
|---|---|
ValidationError | Unknown operator (client-side) or HTTP 422 from server. |
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. |

