# Create Query Creates a new SQL query for execution. Returns a query ID that can be used to check its execution status. Endpoint: POST /data-tap/v0/queries Version: 1.0.0 Security: bearerAuth ## Request fields (application/json): - `query` (string, required) SQL query to execute Example: "SELECT * FROM devices WHERE state = 'PROVISIONED'" - `is_download` (boolean) Whether this query is for downloading results - `row_limit` (integer) Maximum number of rows to return (ignored for download queries) Example: 1000 - `latest_data` (boolean) Whether to fetch the latest data ## Response 201 fields (application/json): - `content` (object) - `content.id` (string) Unique identifier for the query - `content.tenant_id` (string) Tenant identifier - `content.user_id` (string) User identifier who created the query - `content.query` (string) The SQL query text - `content.created_at` (string) Timestamp when the query was created - `content.updated_at` (string) Timestamp when the query was last updated - `content.is_download` (boolean) Whether this query is for downloading results - `content.row_limit` (integer,null) Maximum number of rows to return - `content.latest_data` (boolean) Whether to fetch the latest data - `content.status` (string) Current status of the query Enum: "PENDING", "RUNNING", "SUCCEEDED", "FAILED", "CANCELED", "CLOSED" - `content.result` (object,null) Query results (null for newly created queries) ## Response 400 fields (application/json): - `status` (integer) - `error` (string) - `message` (string) ## Response 401 fields (application/json): - `status` (integer) - `error` (string) - `message` (string) ## Response 500 fields (application/json): - `status` (integer) - `error` (string) - `message` (string)