Files
dashback/docs/api/routes/printerjob/cancel-all.md
2026-11-01 00:24:43 +01:00

1.0 KiB

POST /printerjob/cancel-all

Protected. Requires a valid session cookie (credentials: 'include').

Cancel all pending and processing printer jobs

Cancels all queued or in-flight print jobs for the selected company, optionally filtered by agentprinterId. Notifies connected agents in real time.

Body (JSON)

Field Required Type Description
agentprinterId no integer
{
  "agentprinterId": 1
}

Signals

On success, emits SSE signal: printerjob (see GET /events).

Response 200

All matching jobs cancelled

{
  "success": true,
  "cancelledCount": 1,
  "jobs": [
    {
      "id": 1,
      "agentprinterId": 1,
      "printeragentId": 1,
      "type": "zpl",
      "state": "pending",
      "data": "…",
      "createdAt": "2026-08-10T00:00:00.000Z",
      "completedAt": "2026-08-10T00:00:00.000Z"
    }
  ]
}

Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.