ManagementSql editor
Get a saved SQL query
GET
One of the caller's saved queries, with its SQL text.
Authorization
bearer AuthorizationBearer <token>
In: header
Path Parameters
id*string
Database id
Format
uuidquery_id*string
Saved query id
Format
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/databases/497f6eca-6276-4993-bfeb-53cbbbba6f08/sql-queries/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "created_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "pg_database": "string", "role": "string", "sql": "string", "updated_at": "2019-08-24T14:15:22Z", "version": 0}Save a SQL query POST
Saves a query for the caller. A user keeps at most 500 per database.
Update a saved SQL query PATCH
Changes the given fields of one of the caller's saved queries (an Admin may change any). `version` must be the version last seen; the version goes up by one with each change. `pg_database` and `role` accept `null` to clear them.