> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ClickStack: Get Role

> **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> ClickStack: Retrieves a specific role by ID.

<span data-endpoint-badge="Beta"><Badge color="blue">Beta</Badge></span>

**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> ClickStack: Retrieves a specific role by ID.


## OpenAPI

````yaml _specs/cloud-openapi.json GET /v1/organizations/{organizationId}/services/{serviceId}/clickstack/roles/{clickStackRoleId}
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-1047418
    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}/services/{serviceId}/clickstack/roles/{clickStackRoleId}:
    get:
      tags:
        - ClickStack
      summary: 'ClickStack: Get Role'
      description: >-
        **This endpoint is in beta.** API contract is stable, and no breaking
        changes are expected in the future. <br /><br /> ClickStack: Retrieves a
        specific role by ID.
      operationId: clickStackGetRole
      parameters:
        - in: path
          name: organizationId
          description: ID of the organization that owns the service.
          required: true
          schema:
            type: string
            format: uuid
        - in: path
          name: serviceId
          description: ID of the ClickStack service.
          required: true
          schema:
            type: string
            format: uuid
        - in: path
          name: clickStackRoleId
          description: id parameter
          required: true
          schema:
            type: string
      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:
                    $ref: '#/components/schemas/ClickStackRole'
        '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:
    ClickStackRole:
      properties:
        id:
          description: Role ID.
          type: string
          example: 507f1f77bcf86cd799439011
        name:
          description: Role name.
          type: string
          example: Read Only
        description:
          description: Human-readable role description.
          type: string
          example: Read-only access to all resources
        permissions:
          type: array
          description: The CASL permissions granted by this role.
          items:
            $ref: '#/components/schemas/ClickStackCASLPermission'
        isPredefined:
          description: Whether this is an immutable predefined/system role.
          type: boolean
          example: false
        createdAt:
          description: Creation timestamp.
          type: string
          format: date-time
          example: '2025-01-01T00:00:00.000Z'
        updatedAt:
          description: Last update timestamp.
          type: string
          format: date-time
          example: '2025-06-15T10:30:00.000Z'
      required:
        - id
        - name
        - permissions
        - isPredefined
    ClickStackCASLPermission:
      properties:
        action:
          description: The action this permission grants or denies.
          type: string
          example: read
        subject:
          description: The resource the action applies to.
          type: string
          example: dashboard
        inverted:
          description: When true, the rule denies rather than grants the action.
          type: boolean
          example: false
        integration:
          description: The integration the permission is scoped to.
          type: string
          example: mongodb
        conditions:
          $ref: '#/components/schemas/ClickStackCASLPermissionConditions'
      required:
        - action
        - subject
    ClickStackCASLPermissionConditions:
      type: object
      additionalProperties: true
  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

````