Run a SQL query
Every drill_down_sql that /v1/investigate returns can be pasted here
verbatim.
Readable tables, optionally qualified lake.* or main.*:
sigiro_spanssigiro_logssigiro_log_templatessigiro_metrics_gaugesigiro_metrics_sumsigiro_metrics_histogramsigiro_metrics_exp_histogramsigiro_profilessigiro_anomalies
POST
/v1/queryRequest body
requiredtext/plainOne SELECT statement. No WITH/CTE clauses — rewrite them as derived-table subqueries. Scalar functions are allowlisted; file and network readers are blocked.
stringResponses
200Query results — one object per row, keyed by your SELECT's column names
Array of
anyanyRequest
curl -X POST "/v1/query" \
-H "Content-Type: text/plain" \
-d '"SELECT service_name, count(*) AS errors FROM sigiro_spans WHERE status_code = '\''STATUS_CODE_ERROR'\'' GROUP BY 1 ORDER BY 2 DESC"'const response = await fetch("/v1/query", {
method: "POST",
headers: {
"Content-Type": "text/plain"
},
body: JSON.stringify("SELECT service_name, count(*) AS errors FROM sigiro_spans WHERE status_code = 'STATUS_CODE_ERROR' GROUP BY 1 ORDER BY 2 DESC")
});import requests
response = requests.post(
"/v1/query",
headers={
"Content-Type": "text/plain"
},
json="SELECT service_name, count(*) AS errors FROM sigiro_spans WHERE status_code = 'STATUS_CODE_ERROR' GROUP BY 1 ORDER BY 2 DESC",
)Response
[
{
"errors": 128,
"service_name": "checkout"
},
{
"errors": 4,
"service_name": "cart"
}
]