Query API

Create Query

Creates a new SQL query for execution. Returns a query ID that can be used to check its execution status.

SecuritybearerAuth
Request
Request Body schema: application/json
required
query
required
string

SQL query to execute

is_download
boolean

Whether this query is for downloading results

row_limit
integer >= 0

Maximum number of rows to return (ignored for download queries)

latest_data
boolean

Whether to fetch the latest data

Responses
201

Query Created

400

Bad request

401

Unauthorized

500

Internal server error

post/data-tap/v0/queries
Request samples
application/json
{
  • "query": "SELECT * FROM devices WHERE state = 'PROVISIONED'",
  • "is_download": false,
  • "row_limit": 1000,
  • "latest_data": false
}
Response samples
application/json
{
  • "content": {
    }
}

Get Query Status

Returns the current status of a query and its results if available.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Query ID

Responses
200

Query Status

400

Bad request

401

Unauthorized

404

Query not found

500

Internal server error

get/data-tap/v0/queries/{id}
Request samples
Response samples
application/json
{
  • "content": {
    }
}