Vigilfield Docs
API referenceExports

`POST /exports` — create an export of a query's result table.

POST/exports

Routes through preprocessor.submit_export, which:

  • Verifies the source query exists and reached terminal Succeeded.
  • Re-runs the source query's table-level grants — the caller must be able to access every table the query touched.
  • Validates the export-shape fields (format / delivery configuration) + compiles filterExpression for syntax.
  • Dispatches to Scheduler::submit_export, which persists an Export-kind workload (status: "pending").

The exporter ECS service picks up Queued Export workloads from the scheduler tick and drives them through Running → terminal.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Body of POST /exports. The UI offers two delivery modes: direct download (small result sets) and S3 push (large exports the customer wants in their own bucket).

The source is a table (ADR-0027 §2 / M2.2): any table the caller may tables:export — a query-result table (owned via the executing team) or a regular ingestion/storage table. The old query-keyed source is gone.

Response Body

application/json

curl -X POST "https://example.com/exports" \  -H "Content-Type: application/json" \  -d '{    "delivery_method": "string",    "format": "string",    "table_id": "string"  }'
{  "created_at": "string",  "delivery_method": "string",  "destination": null,  "download_url": "string",  "error_message": "string",  "filter_expression": "string",  "format": "string",  "id": "string",  "org_id": "string",  "progress": 0,  "status": "string",  "table_id": "string",  "updated_at": "string"}