Skip to Content
API ReferenceTestPOST /export

POST /test/export

Export Test

Artifact-level test export.

Dispatches on body.view to per-view exports and returns \{file_id, file_name, row_count\}. Client downloads via /api/test/download/\{file_id\} (BFF) → /test/file/download.

Request Body (ExportTestApiRequest)

FieldTypeRequiredDescription
viewstringNoView discriminator: ‘single'
test_idstringNoUUID of the target test (required for ‘single’ and ‘invocation’)
invocation_idstringNoUUID of the target invocation entry (optional for ‘invocation’)
draft_idstringNoOptional draft id for ‘invocation’ view
modestringNoOptional sub-mode within a view. Currently recognized: view=reports → mode=‘brightspace’ (gradebook CSV only); view=home → mode=‘certificate’ (PDF cert only) or ‘attempts’ (CSV only). Default (None) returns the full per-view bundle.
idempotency_keystringNoIdempotency key — replays the prior export; on the ack, the server-minted soft key to activate/reject a staged export
softbooleanNoStage the export dormant (file chain active=False) — agent proposes; accept activates. Sim-env ‘dormant export’ primitive.
acceptbooleanNoAck: True activates the staged export, False rejects. Only meaningful with idempotency_key

Response (ExportTestApiResponse)

FieldTypeRequiredDescription
file_idstringYesUUID of the files_resource holding the export bytes
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 activate/reject the staged export.
Last updated on