Skip to content
sigiro
Esc
navigateopen⌘Jpreview

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_spans
  • sigiro_logs
  • sigiro_log_templates
  • sigiro_metrics_gauge
  • sigiro_metrics_sum
  • sigiro_metrics_histogram
  • sigiro_metrics_exp_histogram
  • sigiro_profiles
  • sigiro_anomalies
POST/v1/query
Request body
requiredtext/plain
One SELECT statement. No WITH/CTE clauses — rewrite them as derived-table subqueries. Scalar functions are allowlisted; file and network readers are blocked.
string
Responses
200Query results — one object per row, keyed by your SELECT's column names
Array of any
any
Request
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"'
Response
[
  {
    "errors": 128,
    "service_name": "checkout"
  },
  {
    "errors": 4,
    "service_name": "cart"
  }
]