Jobs
Long-running work: routes that may take minutes answer 202 with a job; poll it, or cancel it. Finished jobs are kept for 10 minutes.
On this page
A job: state, and its result once finished
/jobs/{jobId}Path parameters
| Name | Type | Description |
|---|---|---|
jobIdrequired | string | Job id |
Responses
| Status | Description | Body | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | The job | Job | |||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
Errors 401 · 403 · 404
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin | |
| 404 | Unknown agent (or the named resource: loop, task, file, …) |
Error bodies use the error format.
Example
curl "http://127.0.0.1:7385/jobs/JOB_ID" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN"Cancel a running job
/jobs/{jobId}/cancelAborts the work at its next step and marks the job cancelled at once. Work that cannot stop mid-way (a download) finishes in the background; the job still reads cancelled.
Path parameters
| Name | Type | Description |
|---|---|---|
jobIdrequired | string | Job id |
Responses
| Status | Description | Body | ||||||
|---|---|---|---|---|---|---|---|---|
| 200 | Cancelled, or already finished | JobCancelResponse | ||||||
| ||||||||
Errors 401 · 403 · 404
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin | |
| 404 | Unknown agent (or the named resource: loop, task, file, …) |
Error bodies use the error format.
Example
curl -X POST "http://127.0.0.1:7385/jobs/JOB_ID/cancel" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN"