oslew docs
Console
Menu

BatchaddressoperationId delete_batch

DELETE/v1/batch/{id}

Cancel a batch job and throw its payloads away.

The input and every output part are deleted, so a cancelled job's results cannot be collected afterwards. The job record stays, which is why it is still listed.

Send Authorization: Bearer sk_live_…. The key's plan must include theaddress product; which plans do.

Explained in Batch jobs.

Example

Cancelling a job.

curl
curl -X DELETE "https://api.oslew.com/v1/batch/OnClPC2UT5EwVGsAwNp06sMK" \
  -H "Authorization: Bearer $GEO_API_KEY"

The clients leave DELETE out on purpose; send it with curl when you mean it.

Response
HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 20
ratelimit-remaining: 99
ratelimit-reset: 1

{
  "id": "OnClPC2UT5EwVGsAwNp06sMK",
  "state": "cancelled"
}

A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.

Path

NameTypeDescription
id
pathrequired
string

Responses

200 — Cancelled.

  • idstringrequired
  • statestringrequired
    cancelled

With RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset(and their X-RateLimit-* aliases); see rate limits.

Refusals

Every refusal is a JSON object with an error string, except where noted.

401No key, or one that is unknown, revoked or suspended.
403The key's plan does not include this route's product, or the request is larger than the plan allows. The body names the plan that does.
404No job with that id.
429This product's bucket is empty: the key is going faster than its plan's sustained rate. Wait Retry-After seconds; nothing is used up. Carries Retry-After.
503The pod cannot reach the control plane and its entitlements are too old to trust. Retry.

A malformed query string or JSON body is refused by the framework before this route runs, in plain text rather than JSON; see errors.

Rendered from the OpenAPI document at commit b8f4bde-dirty; the same document is served at/v1/openapi.json and generates both clients.