Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

Get list of keys

GET/v1/organizations/{organizationId}/keys
API playground

Returns a list of keys in the organization, ordered by creation date, oldest first. Results are capped at limit (default and maximum 250) per page. Every response carries limit, totalCount and nextCursor; pass nextCursor as the cursor query parameter to fetch the next page, repeating until it is null.

Permission

The API key must have the control-plane:organization:view-api-keys permission.

Authorizations

Path parameters

  • organizationIdstringrequired

    ID of the requested organization.

    format: uuid

Query parameters

  • limitoptionalinteger

    Maximum number of results to return.

    maximum: 250, minimum: 1
    Default: 250
  • cursoroptionalstring

    Opaque cursor from a previous response's nextCursor, marking where to resume the list.

Response

JSON

200

Successful response

JSON
  • statusoptionalnumber

    HTTP status code.

    Example: 200
  • requestIdoptionalstring

    Unique id assigned to every request. UUIDv4

    format: uuid
  • resultoptionalarray ofobject
    10 properties
    • idoptionalstring

      Unique API key ID.

      format: uuid
    • nameoptionalstring

      Name of the key

    • stateoptionalenabledordisabled

      State of the key: 'enabled', 'disabled'.

    • rolesdeprecatedarray ofadminordeveloperorquery_endpoints

      DEPRECATED. Use assignedRoles instead. List of roles assigned to the key. For organizations that have migrated to custom roles, this field is frozen at the pre-migration value and does not reflect current role assignments.

    • assignedRolesoptionalarray ofobject

      Custom roles and System roles assigned to this API key

      3 properties
      • roleIdoptionalstring

        Unique identifier of the role

        format: uuid
      • roleNameoptionalstring

        Human-readable name of the role

      • roleTypeoptionalsystemorcustom

        Type of role: system (predefined) or custom (organization-defined)

    • keySuffixoptionalstring

      Last 4 letters of the key.

    • createdAtoptionalstring

      Timestamp the key was created. ISO-8601.

      format: date-time
    • expireAtoptionalstring | null

      Timestamp the key expires. If not present, null or is empty the key never expires. ISO-8601.

      format: date-time
    • usedAtoptionalstring

      Timestamp the key was used last time, with one-minute precision. If not present the key was never used. ISO-8601.

      format: date-time
    • ipAccessListoptionalarray ofobject

      List of IP addresses allowed to access the API using this key

      2 properties
      • sourceoptionalstring

        IP or CIDR

      • descriptionoptionalstring

        Optional description of IPv4 address or IPv4 CIDR to allow access from

  • limitoptionalinteger

    Maximum number of results returned in this page.

  • totalCountoptionalinteger

    Total number of results across all pages.

  • nextCursoroptionalstring | null

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

Navigation