Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

ClickStack: List Roles

Beta
GET/v1/organizations/{organizationId}/services/{serviceId}/clickstack/roles
API playground

This endpoint is in beta. API contract is stable, and no breaking changes are expected in the future.

ClickStack: Retrieves all roles for the authenticated team, including predefined roles.

Permission

The API key must have the control-plane:service:manage-clickstack-api permission.

Authorizations

Path parameters

  • organizationIdstringrequired

    ID of the organization that owns the service.

    format: uuid
  • serviceIdstringrequired

    ID of the ClickStack service.

    format: uuid

Response

JSON

200

Successful response

JSON
  • statusoptionalnumber

    HTTP status code.

    Example: 200
  • requestIdoptionalstring

    Unique id assigned to every request. UUIDv4

    format: uuid
  • resultoptionalarray ofobject
    7 properties
    • idstringrequired

      Role ID.

      Example: "507f1f77bcf86cd799439011"
    • namestringrequired

      Role name.

      Example: "Read Only"
    • permissionsarray ofClickStackMongoDBCASLPermissionorClickStackClickHouseCASLPermissionrequired

      The CASL permissions granted by this role.

      2 variants

      One of the following:

      • ClickStackMongoDBCASLPermission
        6 properties
        • actioncreateorreadorupdateordeleteormanagerequired

          The action this permission grants or denies.

          Example: "read"
        • subjectAlertorConnectionorDashboardorSavedSearchorSourceorTeam+7 morerequired

          The resource the action applies to.

          Example: "Dashboard"
        • integrationmongodbrequired

          Scopes the permission to the application (MongoDB) data plane.

          Example: "mongodb"
        • fieldsoptionalarray ofstring

          Optional CASL field restriction limiting the rule to specific fields.

        • invertedoptionalboolean

          When true, the rule denies rather than grants the action.

          Example: false
        • conditionsoptionalmap ofone of
      • ClickStackClickHouseCASLPermission
        6 properties
        • actioncreateorreadorupdateordeleteormanagerequired

          The action this permission grants or denies.

          Example: "read"
        • subjectAlertorConnectionorDashboardorSavedSearchorSourceorTeam+7 morerequired

          The resource the action applies to.

          Example: "Dashboard"
        • integrationclickhouserequired

          Scopes the permission to the ClickHouse data plane (row-level access).

          Example: "clickhouse"
        • fieldsoptionalarray ofstring

          Optional CASL field restriction limiting the rule to specific fields.

        • invertedoptionalboolean

          When true, the rule denies rather than grants the action.

          Example: false
        • conditionsoptionalobject
          4 properties
          • connectionstringrequired

            ID of the connection the row policy applies to.

            Example: "507f1f77bcf86cd799439011"
          • fromobjectrequired
            2 properties
            • databaseNamestringrequired
              Example: "default"
            • tableNamestringrequired
              Example: "otel_logs"
          • wherestringrequired

            The row-policy predicate, expressed in whereLanguage.

            Example: "ServiceName = 'checkout'"
          • whereLanguagesqlorlucenerequired
            Example: "sql"
    • isPredefinedbooleanrequired

      Whether this is an immutable predefined/system role.

      Example: false
    • descriptionoptionalstring

      Human-readable role description.

      Example: "Read-only access to all resources"
    • createdAtoptionalstring

      Creation timestamp.

      format: date-time
      Example: "2025-01-01T00:00:00.000Z"
    • updatedAtoptionalstring

      Last update timestamp.

      format: date-time
      Example: "2025-06-15T10:30:00.000Z"