Get a job
Get a job (posts:read)
Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.
GET
header
AuthorizationBearer <token>API key (stk_...), or in the Community Edition the access token (stk_local_...)
id*stringOK
application/json- response
One unit of background work
id*stringkind*stringValue in
"publish_post""publish_target""target_timeout""run_schedule""refresh_channel""repeat_post""publish_reply""repost""notify_people""notify_person"key*stringUnique per subject (publish_post:); queueing the same key again replaces a queued job, and runs a running one again when it ends
status*stringValue in
"queued""running""done""failed""cancelled"run_at*stringFormat
date-timeattempts*integermax_attempts*integerlease_until*|DeprecatedAlways null (the queue no longer uses leases)
Format
date-timeleased_by*stringThe worker that ran the last attempt
last_error*stringpayload*created_at*stringFormat
date-timeupdated_at*stringFormat
date-timedone_at*|Format
date-timecurl -X GET 'https://staqly.example.com/v1/jobs/string'{ "id": "string", "kind": "publish_post", "key": "string", "status": "queued", "run_at": "2019-08-24T14:15:22Z", "attempts": 0, "max_attempts": 0, "lease_until": "2019-08-24T14:15:22Z", "leased_by": "string", "last_error": "string", "payload": { "post_id": "string", "channel_id": "string", "schedule_id": "string", "index": 0, "parent_id": "string", "repost_by": "string", "event_id": "string", "user_id": "string" }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "done_at": "2019-08-24T14:15:22Z"}