Insights
Update Saved Query
Replaces the name and SQL of an existing saved query.
put/api/v1/insights/queries/{id}
Path parameters
idstring required
Unique identifier of a saved query.
Request body
Example request
{
"name": "Run duration by workflow",
"sql": "SELECT workflow_name, AVG(duration_seconds) FROM runs GROUP BY 1"
}Response
Query updated
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"
}