Vigilfield Docs
API referenceQueries

`POST /queries` — submit a new query for execution. Returns the unified `QueryResponse` shape every other query endpoint emits.

POST/queries

The body is the same [QueryText] POST /queries/compile takes (ADR-0058 §5), so text that compiled is text that submits.

⚠️ A refused compile is a 400 here, where compile answers 200. Compile was asked whether the text is valid and said; this was asked to run the query and did not. The body carries the same diagnostics array, and an unknown vfql_version is a 400 with no diagnostics key at all (R6).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Submit a new query for execution.

POST /queries body.

Response Body

application/json

curl -X POST "https://example.com/queries" \  -H "Content-Type: application/json" \  -d '{    "query": {      "text": "string",      "vfql_version": "string"    }  }'
{  "artifact_id": "string",  "created_at": "string",  "data_scanned_bytes": 0,  "engine_execution_time_ms": 0,  "error_message": "string",  "finished_at": "string",  "id": "string",  "org_id": "string",  "output_location": "string",  "principal_id": "string",  "principal_kind": null,  "query": null,  "result_expired": true,  "row_count": 0,  "rule_id": "string",  "source": null,  "started_at": "string",  "state": null,  "submitted_at": "string",  "team_id": "string",  "updated_at": "string"}