Skip to content

Saved queries

The Query tab on each database has a Saved dropdown and a Save button. Click Save, give the current SQL a name, and it becomes a reusable bookmark visible to anyone with read access to the database.

  • Anyone with read access to the database can list and load saved queries.
  • Write access is required to create, update, or delete.
  • Saved queries are scoped to one database — they don’t follow you to a different database, even within the same namespace.
MethodPath
GET/api/namespaces/:ns/databases/:db/saved-queries
POST/api/namespaces/:ns/databases/:db/saved-queries
PATCH/api/namespaces/:ns/databases/:db/saved-queries/:id
DELETE/api/namespaces/:ns/databases/:db/saved-queries/:id

POST/PATCH body:

{ "name": "customers-by-month", "sql": "SELECT … FROM …" }

name is 1–80 chars; sql is up to 10 000.