Query

Cancel a background export

Changed on

Cancel an in-progress background export. The run is marked cancelled synchronously, the export stream is aborted mid-flight (the partial upload is discarded), and the reserved credits are refunded. A run that has already completed or failed is returned unchanged.

post/query/{id}/cancel

Request

  • Base URL
    https://api.cloudglue.dev/v1
  • Auth
    HTTP bearer

Path parameters

idstring uuid required

The ID of the query export to cancel

Response

The query result, with status 'cancelled' when the cancel took effect (or the run's real status if it had already finished)

idstring uuid

Query result ID

object'query_result'

Object type identifier

status'completed' | 'failed' | 'in_progress' | 'cancelled'

Current status of the query. Synchronous queries return 'completed' or 'failed'.

created_atnumber

Unix timestamp of when the query was created

collectionsstring[]

Collection IDs the query ran over

sqlstring nullable

The effective SQL that was executed (echoes the request's sql)

rowsobject[] nullable

Result rows as objects keyed by column name

row_countinteger

Number of rows returned

truncatedboolean

Whether the result was truncated by max_rows or the stored-result size cap

dry_runboolean

True when the query was only validated/compiled (dry_run request): columns holds the output schema and rows is null.

format'json' | 'csv' | 'jsonl' nullable

The result format ('csv'/'jsonl' for background exports)

download_urlstring nullable

Signed URL to download a completed background export. Valid for 24 hours and not refreshed on read (re-run the export if it expires); null for synchronous runs and until a background export completes

download_expires_atnumber nullable

Unix timestamp (ms) when download_url expires

output_bytesinteger nullable

Compressed size of a completed background export, in bytes

Changes