v106

OpenAPI 3.1.0raw.githubusercontent.com2026-08-02160524464.6 KB
Insights

Retrieve Saved Query

Returns a single saved query by ID.

get/api/v1/insights/queries/{id}

Path parameters

idstring required

Unique identifier of a saved query.

Response

Saved query

idstring required

Unique query identifier.

namestring required

Human-readable query name.

sqlstring required

SQL query text.

created_atstring date-time required

Timestamp when the query was saved.

updated_atstring date-time required

Timestamp when the query was last modified.

Example response

{
  "id": "1",
  "name": "Run duration by workflow",
  "sql": "SELECT workflow_name, AVG(duration_seconds) FROM runs GROUP BY 1",
  "created_at": "2026-03-01T10:00:00Z",
  "updated_at": "2026-03-05T14:30:00Z"
}