---
title: "Stop a queued or running export (owner/admin)"
method: POST
path: "/v1/projects/{project_id}/exports/{job_id}/cancel"
tags: ["exports"]
---

# Stop a queued or running export (owner/admin)

`POST /v1/projects/{project_id}/exports/{job_id}/cancel`

## Request

- Base URL: `https://api.wavehouse.cloud`
- URL: `https://api.wavehouse.cloud/v1/projects/{project_id}/exports/{job_id}/cancel`
- Auth: one of:
  - API key in cookie `whc_session`
  - HTTP bearer
  - API key in header `X-API-Key`

Stops the transfer for real: the in-flight `INSERT INTO FUNCTION s3(…)` is KILLed on the engine, not merely marked cancelled, so it stops consuming resources immediately — `killed_statements` reports how many were actually stopped (0 is normal if the job was between statements). IDEMPOTENT: cancelling a job that has already finished returns 200 with `cancelled: false` rather than an error. An export only READS your data, so cancelling one cannot have changed your project; any partial objects already written are never downloadable (only a succeeded export produces links) and expire on the bucket's own lifecycle.

## Path parameters

- `project_id` string, required
- `job_id` string, required

## Response `200`

OK

- CancelProjectExportOutput
  - `cancelled` boolean, required: false means the job had already finished and nothing was stopped — not an error
  - `export` ExportView, required
    - `attempt` integer, required
    - `bytes_done` integer, required
    - `cancel_requested` boolean
    - `created_at` string, date-time, required
    - `finished_at` string, date-time
    - `format` string, required: native | parquet
    - `job_id` string, required
    - `last_error` string
    - `query_id` string: the engine query_id of the statement most recently issued for this job
    - `rows_done` integer, required
    - `started_at` string, date-time
    - `status` string, required: queued | running | succeeded | failed | dead | cancelled
    - `steps` ExportStepView[], required
      - `detail` string
      - `done_at` string, date-time: absent while pending
      - `name` string, required: plan | credential | schema:<table> | data:<table> | cancelled
      - `status` string, required: pending | done | failed
    - `tables` string[]: the requested tables; empty means the whole project database
  - `kill_error` string: set when the engine could not be asked to stop the statement; the job is still cancelled and the worker will stop it, just less promptly
  - `killed_statements` integer, required: in-flight ClickHouse statements stopped by this call; 0 is normal (the job may have been between statements)

## Other responses

- `429`: Rate limited, per client IP, API key or org; a client IP is also refused on every route for a while after repeated authentication failures. A limited operation carries RateLimit-Policy and RateLimit on every response; wait Retry-After seconds before retrying.
- `default`: Error

---

[API](https://skmtc.dev/wavehouse/apis/wavehouse-cloud-api.md) · [All operations](https://skmtc.dev/wavehouse/apis/wavehouse-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/wavehouse/apis/wavehouse-cloud-api/revisions/adea029bf505?raw)
