Piloterr
API referenceRuns

Cancel a run

DELETE
/v1/runs/{id}

No new calls start; calls in flight finish, and the run goes cancelling, then cancelled. A queued or paused run is cancelled at once (run.cancelled is sent). Idempotent: cancelling a run already cancelling or cancelled returns it as it is. Its results so far stay readable.

Authorization

ApiKeyAuth
headerX-Api-Key<token>

Path Parameters

id*string

The run's id (GET /v1/projects/{id}/runs, or the answer of POST /v1/projects/{id}/runs)

Length1 <= length

Response Body

Cancelling or cancelled

application/json
  1. response
id*string
project_id*string
status*string

queued → started → finalizing (its files are written) → completed or failed. paused: out of credits, resumed on its own once credits are back. cancelling: stops after the calls in flight

Value in"queued""started""paused""finalizing""completed""failed""cancelling""cancelled"
reason*|

Why it failed, paused or was cancelled. failed: max_cost (stopped at max_cost_per_run with rows left), error_rate (more than half the rows failed), source_unreachable, mapping_invalid, api_key_invalid (the project's key, or the managed key, cannot be used), input_missing, paused_timeout (paused more than 7 days), endpoint_<why> (the endpoint can no longer run), internal_error (the run could not be processed after several attempts). paused: insufficient_credits. cancelled: killed_by_admin or account_halted_by_admin, null for a cancel of yours

trigger*string
Value in"api""schedule""retry"
parent_run_id*|

For a retry, the run whose failed rows it calls again

total*integer

Rows frozen for the run

done*integer

Rows with a result: ok + ko

ok*integer
ko*integer

Rows that failed or were invalid

credits*integer

Credits used, as api.piloterr.com bills them: per call, the endpoint's credit_cost per row answered 200 or 404 (404 free on some endpoints); per row, credit_cost per result; per GB, at least credit_cost per row (the size is billed apart). Failed rows cost nothing. Includes search_credits. What max_cost_per_run caps

search_credits*integer

What a search input's searches cost at launch (included in credits); 0 otherwise

created_at*string
started_at*string|null
paused_at*string|null
finished_at*string|null
duration_ms*|

Since the run started, until it finished or now

results_expired_at*|

When the results and files were deleted, 30 days after the run finished

eta_seconds*|

Estimated time left while the run is started, from its pace so far; null otherwise

Example Request
curl -X DELETE 'https://dataflow.piloterr.com/v1/runs/string'
Example Response
{
  "id": "cm4j1m8ws0009l208b6yk3pne",
  "project_id": "cm4hz9r2k0003l208f1qd7vtx",
  "status": "cancelling",
  "reason": null,
  "trigger": "schedule",
  "parent_run_id": null,
  "total": 3,
  "done": 2,
  "ok": 2,
  "ko": 0,
  "credits": 2,
  "search_credits": 0,
  "created_at": "2026-11-10T07:00:00.000Z",
  "started_at": "2026-11-10T07:00:02.000Z",
  "paused_at": null,
  "finished_at": null,
  "duration_ms": 4000,
  "results_expired_at": null,
  "eta_seconds": null
}