Skip to content

REST API ​

Every operation of /api/v1, from the OpenAPI document the server serves at GET /api/v1/openapi.json (this page lists the Pro routes too; a server without a Pro key leaves them out of its document). The SDK gateway has its own document at GET /api/v1/sdk/openapi.json.

  • Authentication. Authorization: Bearer <token>, or the console's session cookie plus X-Requested-With: joobqui on state-changing calls. The /api/v1/sdk/* routes take Authorization: Bearer $JOOBQUI_SDK_TOKEN instead.
  • Role. The least role of each operation (viewer < operator < admin); too low a role answers 403 forbidden_role. See Roles and permissions.
  • Errors. Always {"error": {code, message, details, request_id}}; see Error codes.
  • Pro. Pro marks an operation that answers 402 pro_required without a JoobQ Pro key, or that the server registers only with one; see the Pro features index.

/accounts ​

POST /api/v1/accounts ​

Sign up for an account, where sign-up is open or by invite

  • Role: none (public)
  • Success: 201
  • Body:
FieldTypeRequired
emailany
inviteany
passwordany
usernameany

/alerts ​

GET /api/v1/alerts Pro ​

Alert overview: active alerts, rules and recent history

  • Role: viewer
  • Success: 200

GET /api/v1/alerts/active Pro ​

List the alerts firing now

  • Role: viewer
  • Success: 200

GET /api/v1/alerts/history Pro ​

Page through past alerts

  • Role: viewer
  • Success: 200

GET /api/v1/alerts/options Pro ​

What alert rules can watch and notify

  • Role: viewer
  • Success: 200

GET /api/v1/alerts/rules Pro ​

List the alert rules

  • Role: viewer
  • Success: 200

POST /api/v1/alerts/rules Pro ​

Create an alert rule

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
descriptionany
duration_secondsany
metricany
nameany
operatorany
queueany
severityany
thresholdany

DELETE /api/v1/alerts/rules/:id Pro ​

Delete an alert rule

  • Role: operator
  • Success: 200

PUT /api/v1/alerts/rules/:id Pro ​

Enable or disable an alert rule

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
enabledany

POST /api/v1/alerts/:id/acknowledge Pro ​

Acknowledge an alert

  • Role: operator
  • Success: 200

/audit ​

GET /api/v1/audit ​

Search the audit log, or download the selection

  • Role: admin
  • Success: 200

/capabilities ​

GET /api/v1/capabilities ​

What this server can do and its limits

  • Role: none (public)
  • Success: 200

/dlq ​

GET /api/v1/dlq ​

Page through the dead letters, newest first

  • Role: viewer
  • Success: 200

POST /api/v1/dlq/purge ​

Delete dead letters by jid, or all of them (optionally one queue's)

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
allany
jidsany
queueany

POST /api/v1/dlq/redrive ​

Re-drive dead letters back onto their queues

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
jidsany

/email ​

POST /api/v1/email/resend ​

Send the verification email again

  • Role: none (public)
  • Success: 200
  • Body:
FieldTypeRequired
emailany

POST /api/v1/email/verify ​

Confirm an email address with its token

  • Role: none (public)
  • Success: 200
  • Body:
FieldTypeRequired
tokenany

/export ​

GET /api/v1/export/dlq ​

Download the dead letters as CSV or JSON

  • Role: viewer
  • Success: 200

GET /api/v1/export/queues ​

Download the queue list as CSV or JSON

  • Role: viewer
  • Success: 200

/jobs ​

GET /api/v1/jobs ​

Page through jobs in one state, optionally of one queue

  • Role: viewer
  • Success: 200

POST /api/v1/jobs/delete ​

Delete jobs in bulk

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
jidsany
queueany
stateany

POST /api/v1/jobs/retry ​

Retry jobs in bulk (a dead job is re-driven, a delayed one runs now)

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
jidsany
queueany
stateany

DELETE /api/v1/jobs/:jid ​

Delete one job

  • Role: operator
  • Success: 200

GET /api/v1/jobs/:jid ​

Find a job by its jid

  • Role: viewer
  • Success: 200

POST /api/v1/jobs/:jid/retry ​

Retry one job

  • Role: operator
  • Success: 200

/notification-channels ​

GET /api/v1/notification-channels ​

List the notification channels

  • Role: admin
  • Success: 200

POST /api/v1/notification-channels ​

Create a notification channel

  • Role: admin
  • Success: 200
  • Body:
FieldTypeRequired
emailany
enabledany
kindany
min_severityany
nameany
secretany
urlany

DELETE /api/v1/notification-channels/:id ​

Delete a notification channel

  • Role: admin
  • Success: 200

GET /api/v1/notification-channels/:id ​

Show one notification channel

  • Role: admin
  • Success: 200

PUT /api/v1/notification-channels/:id ​

Change a notification channel

  • Role: admin
  • Success: 200
  • Body:
FieldTypeRequired
emailany
enabledany
kindany
min_severityany
nameany
secretany
urlany

POST /api/v1/notification-channels/:id/test ​

Send a test notification through a channel

  • Role: admin
  • Success: 200

/openapi.json ​

GET /api/v1/openapi.json ​

The OpenAPI 3.1 description of this API

  • Role: none (public)
  • Success: 200

/password ​

POST /api/v1/password/forgot ​

Ask for a password reset link by email

  • Role: none (public)
  • Success: 200
  • Body:
FieldTypeRequired
emailany

POST /api/v1/password/reset ​

Set a new password with a reset token

  • Role: none (public)
  • Success: 200
  • Body:
FieldTypeRequired
passwordany
tokenany

/queues ​

GET /api/v1/queues ​

List the queues with their sizes and workers

  • Role: viewer
  • Success: 200

POST /api/v1/queues/:name/clear ​

Delete every waiting job of a queue

  • Role: operator
  • Success: 204

PUT /api/v1/queues/:name/concurrency ​

Ask the workers for a different concurrency on a queue

  • Role: operator
  • Success: 204
  • Body:
FieldTypeRequired
concurrencyintegeryes

GET /api/v1/queues/:name/jobs ​

Page through a queue's waiting jobs

  • Role: viewer
  • Success: 200

POST /api/v1/queues/:name/pause ​

Pause a queue: workers stop taking its jobs

  • Role: operator
  • Success: 204

POST /api/v1/queues/:name/resume ​

Resume a paused queue

  • Role: operator
  • Success: 204

DELETE /api/v1/queues/:name/throttle ​

Remove the throttle set on a queue from the console or the API

  • Role: operator
  • Success: 204

PUT /api/v1/queues/:name/throttle ​

Throttle a queue that only SDK workers serve: at most limit claims per period_ms

  • Role: operator
  • Success: 204
  • Body:
FieldTypeRequired
limitintegeryes
period_msintegeryes

/schedules ​

GET /api/v1/schedules ​

List the configured schedules

  • Role: viewer
  • Success: 200

GET /api/v1/schedules/:id ​

Show one schedule

  • Role: viewer
  • Success: 200

POST /api/v1/schedules/:id/pause ​

Pause a schedule

  • Role: operator
  • Success: 200

POST /api/v1/schedules/:id/resume ​

Resume a paused schedule

  • Role: operator
  • Success: 200

POST /api/v1/schedules/:id/run ​

Enqueue one run of a schedule now

  • Role: operator
  • Success: 200

/session ​

DELETE /api/v1/session ​

Sign out

  • Role: viewer (allowed before a required second factor is enrolled)
  • Success: 204

GET /api/v1/session ​

Who the caller is and their role

  • Role: viewer (allowed before a required second factor is enrolled)
  • Success: 200

POST /api/v1/session ​

Sign in with a username or email and a password

  • Role: none (public)
  • Success: 200
  • Body:
FieldTypeRequired
passwordany
userany

POST /api/v1/session/mfa ​

Finish a sign-in with a one-time code or a recovery code

  • Role: none (public)
  • Success: 200
  • Body:
FieldTypeRequired
challengeany
codeany

/telemetry ​

GET /api/v1/telemetry/summary ​

Headline numbers, throughput and latency percentiles

  • Role: viewer
  • Success: 200

/tokens ​

GET /api/v1/tokens ​

List the API tokens (never the secrets)

  • Role: admin
  • Success: 200

POST /api/v1/tokens ​

Create an API token; the secret is shown once, in this answer

  • Role: admin
  • Success: 201
  • Body:
FieldTypeRequired
expires_in_daysany
namestringyes
roleany

DELETE /api/v1/tokens/:id ​

Revoke an API token

  • Role: admin
  • Success: 200

/users ​

GET /api/v1/users ​

List the accounts

  • Role: admin
  • Success: 200

PUT /api/v1/users/:id ​

Change an account's role or switch it on or off (one per call)

  • Role: admin
  • Success: 200
  • Body:
FieldTypeRequired
activeany
roleany

/workers ​

GET /api/v1/workers ​

List the registered worker processes

  • Role: viewer
  • Success: 200

/workflow-archive ​

GET /api/v1/workflow-archive Pro ​

Runs exported to the archive before retention deleted them, newest first

  • Role: viewer
  • Success: 200

GET /api/v1/workflow-archive/:id Pro ​

An archived run: its final state and a page of its events

  • Role: viewer
  • Success: 200

POST /api/v1/workflow-archive/:id/replay Pro ​

Replay an archived run's history against the definition registered now

  • Role: operator
  • Success: 200

/workflow-attributes ​

GET /api/v1/workflow-attributes Pro ​

The registered search attributes and their types

  • Role: viewer
  • Success: 200

POST /api/v1/workflow-attributes Pro ​

Register a search attribute name with its type

  • Role: admin
  • Success: 201
  • Body:
FieldTypeRequired
nameany
typeany

/workflow-builds ​

GET /api/v1/workflow-builds Pro ​

The worker build sets, what is pinned to each and whether workers are alive

  • Role: viewer
  • Success: 200

GET /api/v1/workflow-builds/pinned Pro ​

How many open runs are pinned to each build set

  • Role: viewer
  • Success: 200

POST /api/v1/workflow-builds/:build/promote Pro ​

Start new runs of a workflow on a build

  • Role: admin
  • Success: 200
  • Body:
FieldTypeRequired
workflowstringyes

POST /api/v1/workflow-builds/:build/repin Pro ​

Move the open runs pinned to a build set onto another build

  • Role: admin
  • Success: 200

POST /api/v1/workflow-builds/:build/retire Pro ​

Retire a build for good

  • Role: admin
  • Success: 204
  • Body:
FieldTypeRequired
forceboolean

/workflow-definitions ​

GET /api/v1/workflow-definitions Pro ​

Search the workflow names that can be started

  • Role: viewer
  • Success: 200

/workflow-retention ​

GET /api/v1/workflow-retention Pro ​

Whether finished workflows are pruned, and what the last pass removed

  • Role: viewer
  • Success: 200

/workflow-scheduler ​

GET /api/v1/workflow-scheduler Pro ​

Whether anything is firing workflow schedules

  • Role: viewer
  • Success: 200

/workflow-schedules ​

GET /api/v1/workflow-schedules Pro ​

List the workflow schedules

  • Role: viewer
  • Success: 200

POST /api/v1/workflow-schedules Pro ​

Create a workflow schedule

  • Role: admin
  • Success: 201

DELETE /api/v1/workflow-schedules/:id Pro ​

Delete a workflow schedule (runs it started are left alone)

  • Role: admin
  • Success: 204

GET /api/v1/workflow-schedules/:id Pro ​

Show one workflow schedule with its next runs

  • Role: viewer
  • Success: 200

PUT /api/v1/workflow-schedules/:id Pro ​

Change a workflow schedule (fields left out keep their value)

  • Role: admin
  • Success: 200

POST /api/v1/workflow-schedules/:id/backfill Pro ​

Start the runs of the fire times in a past range

  • Role: operator
  • Success: 200

POST /api/v1/workflow-schedules/:id/pause Pro ​

Pause a workflow schedule

  • Role: operator
  • Success: 200

POST /api/v1/workflow-schedules/:id/resume Pro ​

Resume a paused workflow schedule from now

  • Role: operator
  • Success: 200

POST /api/v1/workflow-schedules/:id/trigger Pro ​

Start a run of the schedule now

  • Role: operator
  • Success: 201

/workflows ​

GET /api/v1/workflows Pro ​

Page through workflow runs, newest first

  • Role: viewer
  • Success: 200

POST /api/v1/workflows Pro ​

Start a workflow run (a known id is a no-op)

  • Role: operator
  • Success: 201
  • Body:
FieldTypeRequired
namestringyes

POST /api/v1/workflows/bulk Pro ​

Terminate, cancel, signal or re-drive many workflows at once

  • Role: operator
  • Success: 200

GET /api/v1/workflows/:id Pro ​

Show one run with its steps

  • Role: viewer
  • Success: 200

POST /api/v1/workflows/:id/attributes Pro ​

Set and remove search attributes of an open run

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
removeany
setany

POST /api/v1/workflows/:id/cancel Pro ​

Cancel a running workflow, undoing completed steps that can be undone

  • Role: operator
  • Success: 204

POST /api/v1/workflows/:id/continue-as-new Pro ​

Close the open run and start its successor now

  • Role: operator
  • Success: 201

GET /api/v1/workflows/:id/history Pro ​

The events of a run

  • Role: viewer
  • Success: 200

POST /api/v1/workflows/:id/migrate Pro ​

Move an open run onto the latest definition after a clean replay

  • Role: operator
  • Success: 200

POST /api/v1/workflows/:id/query Pro ​

Ask a run a read-only question

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
namestringyes

POST /api/v1/workflows/:id/redrive Pro ​

Start a new run from a failed, terminated, cancelled or timed-out one

  • Role: operator
  • Success: 201

POST /api/v1/workflows/:id/repin Pro ​

Pin an open run to another build

  • Role: admin
  • Success: 200

POST /api/v1/workflows/:id/replay Pro ​

Replay a run's history against the definition registered now

  • Role: operator
  • Success: 200

GET /api/v1/workflows/:id/runs Pro ​

The runs of the continue-as-new chain a run belongs to

  • Role: viewer
  • Success: 200

POST /api/v1/workflows/:id/scopes/:scope/cancel Pro ​

Cancel one cancellation scope of a running workflow

  • Role: operator
  • Success: 204

POST /api/v1/workflows/:id/signal Pro ​

Send a signal to a running workflow

  • Role: operator
  • Success: 204
  • Body:
FieldTypeRequired
namestringyes

POST /api/v1/workflows/:id/steps/:step/retry Pro ​

Retry a failed activity of a running workflow

  • Role: operator
  • Success: 204

POST /api/v1/workflows/:id/terminate Pro ​

Terminate a running workflow at once

  • Role: operator
  • Success: 204

GET /api/v1/workflows/:id/updates/:name Pro ​

The recorded outcome of an update

  • Role: viewer
  • Success: 200

POST /api/v1/workflows/:id/updates/:name Pro ​

Send a validated update to a running workflow and wait for its answer

  • Role: operator
  • Success: 200

SDK gateway (/api/v1/sdk) ​

POST /api/v1/sdk/blueprints Pro ​

Register a workflow blueprint, versioned by its content hash

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
blueprintany
namestringyes
sdk_languagestringyes
worker_idstring

POST /api/v1/sdk/jobs Pro ​

Enqueue a background job onto a queue

  • Role: operator
  • Success: 201
  • Body:
FieldTypeRequired
contextobject
delay_msinteger
encrypt_fieldsarray of string
expires_msinteger
jidstring
job_typestringyes
max_retriesinteger
payloadany
queuestringyes
run_at_msinteger
timeout_msinteger
unique_keystring
unique_modestring
unique_ttl_msinteger

POST /api/v1/sdk/jobs/batch Pro ​

Enqueue up to 500 background jobs in one call

  • Role: operator
  • Success: 201
  • Body:
FieldTypeRequired
jobsarray of object

GET /api/v1/sdk/openapi.json ​

Describe the Polyglot SDK Gateway API as an OpenAPI 3.1 document

  • Role: none (public)
  • Success: 200

POST /api/v1/sdk/rate-limit Pro ​

Reserve one slot of a sliding-window rate limit (Pro)

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
keystringyes
limitintegeryes
period_msintegeryes

POST /api/v1/sdk/schedules Pro ​

Register a code-declared cron/recurring job or workflow schedule, idempotent by name

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
cronstring
encrypt_fieldsarray of string
everystring
inputany
job_typestring
kindstringyes
max_retriesinteger
namestringyes
payloadany
queuestring
timezonestring
unique_keystring
workflowstring

POST /api/v1/sdk/tasks/ack ​

Settle up to 100 task leases in one call, each completed or failed

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
itemsarray of object
worker_idstringyes

POST /api/v1/sdk/tasks/heartbeat ​

Extend every lease a worker holds in one call and check each for cancellation

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
lease_ttl_msinteger
leasesarray of object
worker_idstringyes

POST /api/v1/sdk/tasks/poll ​

Claim due jobs and workflow steps from unpaused queues

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
lease_ttl_msinteger
max_tasksinteger
task_queuesarray of stringyes
timeout_msinteger
worker_idstringyes

POST /api/v1/sdk/tasks/:token/complete ​

Commit task completion and output

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
outputany
worker_idstringyes

POST /api/v1/sdk/tasks/:token/fail ​

Record structured polyglot task failure and stack frames

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
error_classstringyes
error_messagestringyes
raw_stacktracestring
retryableboolean
sdk_languagestring
stack_framesarray of object
worker_idstringyes

POST /api/v1/sdk/tasks/:token/heartbeat ​

Extend an active task lease and check for cancellation

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
lease_ttl_msinteger
worker_idstringyes

POST /api/v1/sdk/workers/register ​

Register or heartbeat a polyglot SDK worker

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
active_leasesinteger
callback_urlstring
concurrencyinteger
cpu_pctnumber
delivery_modestring
hoststring
pidinteger
poll_latency_msnumber
rss_kbinteger
sdk_languagestringyes
sdk_versionstring
service_namestring
task_queuesarray of stringyes
teamstring
worker_idstringyes

POST /api/v1/sdk/workers/:id/deregister ​

Deregister a polyglot SDK worker on shutdown

  • Role: operator
  • Success: 200

POST /api/v1/sdk/workflows Pro ​

Start a durable workflow execution

  • Role: operator
  • Success: 201
  • Body:
FieldTypeRequired
buildstring
contextobject
idstring
inputany
namestringyes
search_attributesobject

GET /api/v1/sdk/workflows/:id Pro ​

Describe one workflow run: status, output, failure and search attributes

  • Role: viewer
  • Success: 200

GET /api/v1/sdk/workflows/:id/history Pro ​

The events of a workflow run, after after_seq, at most limit

  • Role: viewer
  • Success: 200

POST /api/v1/sdk/workflows/:id/query Pro ​

Ask a workflow run a read-only question

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
namestringyes

GET /api/v1/sdk/workflows/:id/result Pro ​

The outcome of a workflow, following continue-as-new; waits up to wait_ms for it to close

  • Role: viewer
  • Success: 200

POST /api/v1/sdk/workflows/:id/search-attributes Pro ​

Set and remove search attributes of a workflow's open run

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
removeany
setany

POST /api/v1/sdk/workflows/:id/signal Pro ​

Deliver an asynchronous signal to a running workflow

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
namestringyes
payloadany

POST /api/v1/sdk/workflows/:id/updates Pro ​

Send an update to a running workflow and wait for its outcome

  • Role: operator
  • Success: 200
  • Body:
FieldTypeRequired
inputany
namestringyes
update_idstring
wait_msinteger

JoobQ Core is MIT licensed. JoobQ Pro needs a licence key.