Dash0 acquires Polar Signals

Query SQL

Execute a SQL query and return results as JSON

post/api/sql
bash
Sample request
12345678910
curl --request POST 'https://api.eu-west-1.aws.dash0.com/api/sql' \
--header "Authorization: Bearer ${DASH0_AUTH_TOKEN}" \
--header 'Content-Type: application/json' \
--data-raw '{
"timeRange": {
"from": "now-10m",
"to": "now"
},
"query": "SELECT * FROM spans LIMIT 10"
}'

Request body required

TimeReferenceRangerequired

A range of time between two time references.

Dataset

Optional dataset to query across. Defaults to whatever is configured to be the default dataset for the organization.

stringrequired

Responses

Returns the SQL query results.

FixedTimerequired

A fixed point in time represented as an RFC 3339 date-time string.

Format: YYYY-MM-DDTHH:MM:SSZ (UTC) or YYYY-MM-DDTHH:MM:SS±HH:MM (with timezone offset)

Examples:

  • 2024-01-15T14:30:00Z
  • 2024-01-15T14:30:00+08:00
TimeRangerequired
string
QueryError

Structured error information for query errors. Present alongside the error string when the error is related to the user's query (syntax, semantic, or execution errors). Not present for system-level errors (unauthorized access, unexpected failures).

Progress
ResultRows
D0QLWarningsrequired