Skip to main content
GET
/
v1
/
cohorts
/
{cohort_id}
/
templates
import olira

olira.init(api_key="YOUR_API_KEY")
result = olira.list_cohort_templates(cohort_id="68582e4a0a0b3c1234567890")
for a in result.data:
    print(a.summary_type, a.assigned_at)
CohortTemplatesResult(
    data=[
        CohortTemplateAssignment(
            id="68582e4a0a0b3c0987654321",
            summary_type="symptom_overview",
            template_id="68582e4a0a0b3c1111111111",
            cohort_id="68582e4a0a0b3c1234567890",
            assigned_at="2026-06-25T10:30:00Z",
        ),
    ],
)
olira.list_cohort_templates(cohort_id: str) -> CohortTemplatesResult
Requires scope: api:manage-patients

Parameters

cohort_id
str
required
Olira-assigned cohort id.

Returns

CohortTemplatesResult
data
list[CohortTemplateAssignment]
Template assignments.
data[].id
str
Assignment id.
data[].summary_type
str
Summary type slug.
data[].template_id
str
Resolved template id.
data[].cohort_id
str
Cohort id.
data[].assigned_at
str | None
ISO 8601 assignment 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")
result = olira.list_cohort_templates(cohort_id="68582e4a0a0b3c1234567890")
for a in result.data:
    print(a.summary_type, a.assigned_at)
CohortTemplatesResult(
    data=[
        CohortTemplateAssignment(
            id="68582e4a0a0b3c0987654321",
            summary_type="symptom_overview",
            template_id="68582e4a0a0b3c1111111111",
            cohort_id="68582e4a0a0b3c1234567890",
            assigned_at="2026-06-25T10:30:00Z",
        ),
    ],
)