Cancel a batch
Stops what has not started. Keeps what has landed.
POST
https://api.easydata.win/v1/batches/{id}/cancelStops items that have not started yet. Anything already delivered stays delivered and stays readable, and anything in flight finishes rather than being thrown away half-scraped - you were going to be charged for that fetch either way, so you may as well have the record.
Request #
| Field | Type | Notes |
|---|---|---|
idrequired | path | The batch id. |
Call it #
curl -X POST "https://api.easydata.win/v1/batches/{id}/cancel" \
-H "X-API-Key: $API_KEY"Response #
{
"data": { "batch_id": "afec9131-080b-4b96-b3bb-726249e4bbf8", "status": "cancelled", "...": "Batch" },
"meta": { "requestId": "req_8f2ka91x" }
}Errors #
| Status | Type | When |
|---|---|---|
| 401 | invalid_api_key | Missing, malformed, revoked or expired key. Never metered. |
| 404 | not_found | No such batch. |
| 409 | conflict | The batch has already finished. |
Every failure uses the same envelope, and none of them is metered - see Errors.