> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-detect-table-modification.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get list of all keys

> Returns a list of all keys in the organization.

Returns a list of all keys in the organization.


## OpenAPI

````yaml /_specs/cloud-openapi.json get /v1/organizations/{organizationId}/keys
openapi: 3.1.2
info:
  title: OpenAPI spec for ClickHouse Cloud
  version: '1.0'
  contact:
    name: ClickHouse Support
    url: >-
      https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-910487
    email: support@clickhouse.com
servers:
  - url: https://api.clickhouse.cloud
security:
  - basicAuth: []
tags:
  - name: Organization
  - name: User management
  - name: Billing
  - name: Role Management
  - name: Service
  - name: Backup
  - name: OpenAPI
  - name: Prometheus
  - name: ClickPipes
  - name: ClickStack
  - name: Postgres
paths:
  /v1/organizations/{organizationId}/keys:
    get:
      tags:
        - OpenAPI
      summary: Get list of all keys
      description: Returns a list of all keys in the organization.
      operationId: openapiKeyGetList
      parameters:
        - in: path
          name: organizationId
          description: ID of the requested organization.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    description: HTTP status code.
                    example: 200
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
                  result:
                    type: array
                    items:
                      $ref: '#/components/schemas/ApiKey'
        '400':
          description: >-
            The request cannot be processed due to a client error. Please verify
            your request parameters and try again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    description: HTTP status code.
                    example: 400
                  error:
                    type: string
                    description: Detailed error description.
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
        '500':
          description: >-
            An internal server error has occurred. If this issue persists,
            please contact ClickHouse Cloud support for assistance.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code.
                    example: 500
                  error:
                    type: string
                    description: Detailed error description.
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
components:
  schemas:
    ApiKey:
      properties:
        id:
          description: Unique API key ID.
          type: string
          format: uuid
        name:
          description: Name of the key
          type: string
        state:
          description: 'State of the key: ''enabled'', ''disabled''.'
          type: string
          enum:
            - enabled
            - disabled
        roles:
          type: array
          description: >-
            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.
          items:
            type: string
            enum:
              - admin
              - developer
              - query_endpoints
          deprecated: true
        assignedRoles:
          type: array
          description: Custom roles and System roles assigned to this API key
          items:
            $ref: '#/components/schemas/AssignedRole'
        keySuffix:
          description: Last 4 letters of the key.
          type: string
        createdAt:
          description: Timestamp the key was created. ISO-8601.
          type: string
          format: date-time
        expireAt:
          description: >-
            Timestamp the key expires. If not present, `null` or is empty the
            key never expires. ISO-8601.
          type:
            - string
            - 'null'
          format: date-time
        usedAt:
          description: >-
            Timestamp the key was used last time, with one-minute precision. If
            not present the key was never used. ISO-8601.
          type: string
          format: date-time
        ipAccessList:
          type: array
          description: List of IP addresses allowed to access the API using this key
          items:
            $ref: '#/components/schemas/IpAccessListEntry'
    AssignedRole:
      properties:
        roleId:
          description: Unique identifier of the role
          type: string
          format: uuid
        roleName:
          description: Human-readable name of the role
          type: string
        roleType:
          description: 'Type of role: system (predefined) or custom (organization-defined)'
          type: string
          enum:
            - system
            - custom
    IpAccessListEntry:
      properties:
        source:
          description: IP or CIDR
          type: string
        description:
          description: >-
            Optional description of IPv4 address or IPv4 CIDR to allow access
            from
          type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Use key ID and key secret obtained in ClickHouse Cloud console:
        https://clickhouse.com/docs/cloud/manage/openapi

````