Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

List all available roles for an organization

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

Returns available roles (system + custom) for an organization, ordered by unique role ID ascending. Results are capped at limit (default and maximum 250) per page. Pass nextCursor as the cursor query parameter to fetch the next page until it is null.

Permission

The API key must have the control-plane:organization:manage permission.

Authorizations

Path parameters

  • organizationIdstringrequired

    ID of the requested organization.

    format: uuid

Query parameters

  • limitoptionalinteger

    Maximum number of results to return.

    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
    9 properties
    • idoptionalstring

      Unique role identifier

    • tenantIdoptionalstring

      Tenant resource ID (e.g., organization/uuid)

    • ownerIdoptionalstring

      Owner resource ID (e.g., organization/uuid)

    • nameoptionalstring

      Name of the role

    • typeoptionalsystemorcustom

      Whether this is a system role or a custom role

    • actorsoptionalarray ofstring

      List of actor resource IDs assigned to this role (e.g., user/uuid, apiKey/uuid)

    • policiesoptionalarray ofobject

      List of policies associated with this role

      7 properties
      • idoptionalstring

        Unique policy identifier

      • roleIdoptionalstring

        ID of the role this policy belongs to

      • tenantIdoptionalstring

        Tenant resource ID (e.g., organization/uuid)

      • allowDenyoptionalALLOWorDENY

        Whether this policy allows or denies access

      • permissionsoptionalarray ofstring

        List of permissions granted or denied by this policy

      • resourcesoptionalarray ofstring

        List of resource IDs this policy applies to (e.g., instance/uuid, instance/*)

      • tagsoptionalobject
        2 properties
        • grantsoptionalarray ofstring

          Optional list of database grants (e.g., database names)

        • roleV2optionalsql-console-readonlyorsql-console-admin

          Optional SQL console role type

    • createdAtoptionalstring

      Timestamp when the role was created. ISO-8601.

      format: date-time
    • updatedAtoptionalstring

      Timestamp when the role was last updated. ISO-8601.

      format: date-time
  • limitoptionalinteger

    Maximum number of results returned in this page.

  • nextCursoroptionalstring | null

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