Cancel job
Ask a job to stop, free. The answer is 200 with the job as it stands; the work may finish before it stops, and Retry-After comes while it still runs, as on get_job. A job already final is unchanged. With pages already parsed the record is partial, canceled, the pages kept and billed; with none, no record and nothing billed.
What it costs
The key needsjobs:cancel. The call is free. It takes no body; a body sent is refused 400 invalid-request.
Refused before any work
An id of the wrong kind:400 invalid-request, before any lookup. A body sent: 400 invalid-request. An unknown query parameter: 400 invalid-request, unknown_field.
Problem types
- 400
invalid-request, The request is invalid. - 401
unauthorized, The key is missing or rejected. - 403
insufficient-scope, The key lacks a scope this call needs. - 404
not-found, Not found: an unknown or another account’s job. - 410
job-expired, The job has expired: the job ended more than 30 days ago; the answer comes for 30 more days, to the owning account only, then404. - 429
rate-limit-exceeded, The rate limit is exceeded;concurrency-limit-exceeded, Too many calls are in flight. - 500
internal-error, The service failed. - 503
overloaded, The service is overloaded.
Authorizations
An API key from https://app.getclean.ai, or an access token issued by https://auth.getclean.ai/realms/getclean, sent as Authorization: Bearer <key> on every call. The scopes a key carries and what a 401 and a 403 say are on the keys and sign-in page.
Headers
Your own trace id for the call, the W3C Trace Context traceparent header, optional on every operation. getclean logs it with the call, so a request in your traces can be matched to its Request-Id, and never forwards it to a site or a source, a stated departure from W3C Trace Context section 3.4, which asks a vendor to pass it on. A malformed value is ignored, never refused, as the same recommendation asks.
Response
The job in its current state after the ask; Retry-After and retry_after_seconds while it still runs; once canceled, its outcome and contents_id when pages were done.
A parse that outlives its request. completed when its record is delivered or partial, failed otherwise, with problem set when nothing was made; canceled keeps and bills the pages done. Kept 30 days after its end, then 410 job-expired for 30 days, then 404. A job carries no notices and no version.