Skip to content

Exporters ​

Export plugins for generating PDFs and other outputs. An exporter has an external API endpoint that processes data and returns generated files.

Routes ​

MethodPathAuthDescription
GET/api/exportersBearerList exporters
GET/api/exporter/:idBearerGet single exporter
PUT/api/exporterJWT (admin/root)Create an exporter
POST/api/exporter/:idJWT (admin/root)Update an exporter
PATCH/api/exporter/:idJWT (admin/root)Partially update an exporter
DELETE/api/exporter/:idJWT (admin/root)Delete an exporter
DELETE/api/exporter/clear/:idJWT (admin/root)Clear generated PDFs for an exporter
DELETE/api/exportersJWT (admin/root)Bulk delete exporters
PUT/api/exporter/trigger/:idBearerTrigger an export job
POST/api/exporter/callback/:idNone (JWT in body)Callback from external exporter

Trigger Export ​

PUT /api/exporter/trigger/:id

Triggers a new export job. The exporter's API endpoint is called with the relevant data.

Body ​

FieldTypeRequiredDescription
datanumberNo
issuenumberNoParent issue (id or name)

Response ​

json
{
  "status": "ok",
  "id": 123,
  "apiResult": "processing",
  "otc": "one-time-code"
}

Processing States ​

StateCodeDescription
Error0Export failed
Processing1Export in progress
Complete2Export finished, files available

Create Exporter (PUT) ​

PUT /api/exporter

Body ​

FieldTypeRequiredDescription
idnumberNoEntity ID
namestringYesDisplay name
apistringYesExporter API endpoint URL
booksarrayNo
chaptersarrayNo
issuesarrayNo
templatesarrayNo

Update Exporter (POST) ​

POST /api/exporter/:id

Body ​

FieldTypeRequiredDescription
idnumberYesEntity ID
namestringYesDisplay name
apistringYesExporter API endpoint URL
booksarrayNo
chaptersarrayNo
issuesarrayNo
templatesarrayNo

Partial Update (PATCH) ​

PATCH /api/exporter/:id

Body ​

FieldTypeRequiredDescription
idnumberYesEntity ID
namestringNoDisplay name
apistringNoExporter API endpoint URL
booksarrayNo
chaptersarrayNo
issuesarrayNo
templatesarrayNo

Clear PDFs ​

DELETE /api/exporter/clear/:id

Removes all generated PDF records for the exporter without deleting the exporter itself.

Exporter Callback ​

POST /api/exporter/callback/:id

Called by the external exporter service when processing is complete. Authenticated via a JWT token signed with the one-time code. Updates the PDF record and broadcasts a WebSocket event.