Cwr Export
Generate a CWR export job for a publisher
POST /cwr/export
POST
This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
POST /cwr/export Description: Loads the publisher (withPublisherTerritory rows), the tenant’s
CWRWork rows (optionally filtered to workIds) with their writer
links, and generates a CWR file at the requested version. Works
with no writer links, NULL relative shares, or bootstrap-seeded
skeletons are excluded from the file and reported back in
excludedWorks — never silently dropped.
On success the rendered CWR text is persisted through the File +
Cloud Storage pipeline and a CWRExportJob row is created with
status: completed and resultFileId set. Poll
GET /cwr/status/{publisherId} for the job list and download the
bytes via GET /cwr/jobs/{jobId}/download.
The legacy synchronous streaming path (?stream=true) has been
removed; it never produced valid work registrations or trailer
counts. A request with ?stream=true returns 400.
Authorization:
- Required role:
adminor higher
Code Examples
Authorizations
Body
application/json
Response
Export job created and completed synchronously (the async job flow renders and persists the file before responding)