Skip to main content
Provenance endpoint

Explain Provenance SQL

POST/provenance/sql/explain/

Example request

application/json
{
  "sql": "SELECT id, status FROM execution_runs WHERE status = :status",
  "parameters": {
    "status": "completed"
  }
}

Handler-checked behavior​

Send the same sql and optional named parameters as the read-only SQL route. This runs EXPLAIN QUERY PLAN for a permitted SELECT or WITH statement and returns plan rows, not the query's data rows. It uses the same read-only table/column restrictions and 10-second timeout; invalid SQL returns 400 and an unavailable explorer returns 503.

Response shape​

The response has columns, items, page, pageSize, truncated, and elapsedMilliseconds. items contains SQLite EXPLAIN QUERY PLAN rows; their columns and contents depend on the query and database, so no fixed plan is shown here.

See the Provenance guide for related tasks and context.