Skip to Content

POST /cohort/export

Export Cohorts

Export all cohorts as a clean, denormalized CSV.

Request Body (ExportCohortApiRequest)

FieldTypeRequiredDescription
cohort_idstringNo
idempotency_keystringNoIdempotency key — replays the prior export instead of re-running
softbooleanNoStage the export dormant (active=False); ack with accept activates it
acceptbooleanNoAck: True promotes the staged export, False rejects. Only meaningful with idempotency_key

Response (ExportCohortApiResponse)

FieldTypeRequiredDescription
file_idstringYesUUID of the files_resource holding the export CSV
file_namestringYesSuggested download file name
row_countintegerYesNumber of data rows in the export
idempotency_keystringNoServer-minted soft-call key (audit call_id). On a soft propose, echo this back with accept to promote/reject the staged export.
Last updated on