Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

List saved queries

GET/v1/organizations/{organizationId}/services/{serviceId}/saved-queries
API playground

Returns saved queries for the service.

Permission

The API key must have the control-plane:service:view permission.

Authorizations

Path parameters

  • organizationIdstringrequired

    ID of the requested organization.

    format: uuid, pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
  • serviceIdstringrequired

    ID of the requested service.

    format: uuid, pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$

Query parameters

  • cursoroptionalstring

    Cursor returned as nextCursor on the previous page.

  • limitoptionalinteger

    Maximum number of records to return per page. Defaults to 100. Maximum is 100.

    maximum: 100
    Default: 100

Response

JSON

200

Successful response.

JSON
  • resultarray ofobjectrequired

    Saved queries for the service.

    3 properties
    • idstringrequired

      Unique ID of the saved query.

      format: uuid, pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
    • namestringrequired

      Name of the saved query.

    • databasestringrequired

      Database used by the saved query.

  • limitintegerrequired

    Maximum number of results returned in this page.

  • totalCountintegerornullrequired

    Total number of results across all pages. It has only informative value, thus is not guaranteed and it is provided on a best-effort basis. Null if the total count is unknown.

    2 variants

    One of the following:

    • integer
    • null
  • nextCursorstringornullrequired

    Cursor for the next page, to be sent as the cursor query parameter. Null on the last page.

    2 variants

    One of the following:

    • string
    • null
  • statusintegerrequired

    HTTP status code.

    Example: 200
  • requestIdstringrequired

    Unique id assigned to every request. UUIDv4

    format: uuid, pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$