OpenFolia

Background work

GET
/jobs/status

Whether the background jobs (release planning and files, imports, webhook deliveries, …) are taken: the processes consuming them (CCMS_ROLE worker or all) heard from in the last minute, when one last consumed, the jobs due and running, and how long the longest-waiting one waited. meta.level is warning when jobs have waited five minutes while nothing consumed: no worker takes them. Counts only, never a job's content. Needs the admin.roles permission.

Authorization

bearer
headerAuthorizationBearer <JWT>

A service account's token (ccms_sat_…, issued by POST /service-accounts/{id}/tokens), or, for local use and demo mode, the server's shared CCMS_API_TOKEN.

Header Parameters

X-Ccms-User?string

Demo mode only (CCMS_AUTH_MODE=demo): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400).

Response Body

application/vnd.api+json
  1. response
data*

id is always jobs.

Example Request
curl -X GET 'http://localhost:3000/jobs/status'
Example Response
{  "data": {    "type": "JobsStatus",    "id": "string",    "attributes": {      "consumers": 0,      "lastConsumedAt": "2019-08-24T14:15:22Z",      "ready": 0,      "running": 0,      "oldestReadyAt": "2019-08-24T14:15:22Z"    },    "meta": {      "checkedAt": "2019-08-24T14:15:22Z",      "lagSeconds": 0,      "level": "ok",      "stallSeconds": 0    }  }}