Skip to main content
GET
/
v1
/
state
/
{patient_id}
/
stable
import olira

olira.init(api_key="YOUR_API_KEY")
stable = olira.get_stable_data(
    patient_id="8a4fde23-0f1b-4c2a-9d7e-b36c1a5f0e82",
    modules=["demographics", "medications"],
)
print(stable.modules.keys())
StableDataResult(
    patient_id="8a4fde23-0f1b-4c2a-9d7e-b36c1a5f0e82",
    modules={
        "demographics": StableModule(
            module_type="demographics",
            payload={"first_name": "Ada", "last_name": "Lovelace"},
            created_at="2026-01-01T00:00:00Z",
            updated_at="2026-01-14T10:00:00Z",
        ),
        "medications": StableModule(
            module_type="medications",
            payload={"medications": []},
            created_at=None,
            updated_at="2026-01-12T09:30:00Z",
        ),
    },
)
olira.get_stable_data(
    patient_id: str,
    modules: list[str] | None = None,
) -> StableDataResult
Requires scope: sdk:state-read Pass modules to fetch a subset.

Parameters

patient_id
str
required
Olira patient id.
modules
list[str] | None
Subset of module slugs; omitted returns all available.

Returns

StableDataResult
patient_id
str
Patient id.
modules
dict[str, StableModule]
Keys are module_type strings.
modules[].module_type
str
Stable module slug.
modules[].payload
dict | None
Module JSON payload.
modules[].created_at
str | None
Created timestamp.
modules[].updated_at
str | None
Updated timestamp.

Raises

ExceptionWhen
AuthErrorHTTP 401 or 403 — invalid API key or insufficient OAuth scope for this endpoint.
ValidationErrorHTTP 400, 404, or 422 — malformed JSON, unknown patient, or validation failure (message includes response excerpt).
ServerErrorHTTP 409 (e.g. conflicting external identifier) or repeated 5xx after retries; includes status_code when applicable.
RateLimitErrorHTTP 429 — rate limited; check retry_after (seconds).
NetworkErrorConnection timeout, DNS failure, or read error after retries.
import olira

olira.init(api_key="YOUR_API_KEY")
stable = olira.get_stable_data(
    patient_id="8a4fde23-0f1b-4c2a-9d7e-b36c1a5f0e82",
    modules=["demographics", "medications"],
)
print(stable.modules.keys())
StableDataResult(
    patient_id="8a4fde23-0f1b-4c2a-9d7e-b36c1a5f0e82",
    modules={
        "demographics": StableModule(
            module_type="demographics",
            payload={"first_name": "Ada", "last_name": "Lovelace"},
            created_at="2026-01-01T00:00:00Z",
            updated_at="2026-01-14T10:00:00Z",
        ),
        "medications": StableModule(
            module_type="medications",
            payload={"medications": []},
            created_at=None,
            updated_at="2026-01-12T09:30:00Z",
        ),
    },
)