> ## Documentation Index
> Fetch the complete documentation index at: https://cubed3-pavel-claude-elegant-dirac-88avqw.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List custom roles

**🔒 Admin only.** Requires administrator privileges — the authenticated principal (API key, embed JWT, or any bearer token) must belong to a user with the admin role.

Lists the tenant's custom roles, newest first, cursor-paginated via `first`/`after`. Cube's built-in roles are not included — they are not tenant data.


## OpenAPI

````yaml /api-reference/api.yaml get /api/v1/roles
openapi: 3.1.0
info:
  title: Cube Platform API
  version: 1.0.0
  description: >-
    Programmatically manage Cube: deployments and everything scoped to them

    (environments, folders, reports, workbooks, notifications, workspace, and
    agents),

    plus account-level users, groups, policies, embedding, and AI settings.
    Data-model

    authoring, dev mode, branches, and uploads live under /build/api/v1 — same
    host and

    token, routed to the build pods.
servers:
  - url: https://{tenant}.cubecloud.dev
    description: Your tenant host. Replace the whole host if you use a custom domain.
    variables:
      tenant:
        default: your-tenant
        description: Your Cube tenant subdomain
security:
  - bearerAuth: []
tags:
  - name: Deployments
  - name: Deployment Creation
  - name: Environments
  - name: Env Variables
  - name: Regions
  - name: Data Model
  - name: Data Model Uploads
  - name: GitHub
  - name: GitHub Connection
  - name: dbt Sync
  - name: Databricks Metric View Publication
  - name: Databricks Metric View Integration
  - name: Folders
  - name: Reports
  - name: Workbooks
  - name: Dashboard Exports
  - name: Notifications
  - name: Workspace
  - name: Users
  - name: Users Admin
  - name: Roles
  - name: User Attributes
  - name: User Attribute Values
  - name: Tenant Settings
  - name: OAuth Integrations
  - name: User OAuth Tokens
  - name: OIDC Token Configs
  - name: App Theme
  - name: Embed
  - name: Embed Tenants
  - name: Dashboard Embed Access
  - name: Usage Analytics
  - name: OpenAPI Spec
paths:
  /api/v1/roles:
    get:
      tags:
        - Roles
      summary: List custom roles
      operationId: getRoles
      parameters:
        - in: query
          name: after
          schema:
            oneOf:
              - type: string
              - type: 'null'
        - in: query
          name: first
          schema:
            oneOf:
              - minimum: 1
                type: integer
              - type: 'null'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RolesListResponse'
          description: ''
components:
  schemas:
    RolesListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Role'
          type: array
        pageInfo:
          $ref: '#/components/schemas/PageInfo'
      required:
        - items
        - pageInfo
      type: object
    Role:
      properties:
        description:
          oneOf:
            - type: string
            - type: 'null'
        id:
          type: integer
        name:
          type: string
        policies:
          items:
            $ref: '#/components/schemas/Policy'
          type: array
      required:
        - id
        - name
        - policies
      type: object
    PageInfo:
      properties:
        endCursor:
          oneOf:
            - type: string
            - type: 'null'
        hasNextPage:
          type: boolean
        hasPreviousPage:
          type: boolean
        startCursor:
          oneOf:
            - type: string
            - type: 'null'
      required:
        - hasNextPage
        - hasPreviousPage
      type: object
    Policy:
      properties:
        actions:
          items:
            enum:
              - All
              - DeploymentsManage
              - DeploymentCreate
              - DeploymentRead
              - DeploymentUpdate
              - DeploymentDelete
              - SecretsManage
              - DownloadData
              - PlaygroundRead
              - SchemaRead
              - SchemaUpdate
              - SchemaUpdateDevBranches
              - APMRead
              - ChatHistoryRead
              - PreAggregationBuild
              - AlertsCreate
              - AlertsRead
              - AlertsUpdate
              - AlertsDelete
              - AuditLogManage
              - BillingRead
              - SqlRunnerRead
              - DataAssetsRead
              - DataAssetsManage
              - CubeNetworkConnect
              - ReportRead
              - ReportEdit
              - ReportManage
              - WorkbookManage
              - WorkbookRead
              - WorkbookEdit
              - ChatThreadRead
              - AgentManage
              - AgentRead
              - AgentSpaceManage
              - AgentAdmin
              - DeploymentAgentRead
              - OAuthIntegrationsManage
              - OAuthIntegrationsIssueTokens
              - McpToolsManage
              - AIBIDevelop
              - AIBIExplore
              - AIBIView
              - ChartPalettesManage
              - DashboardThemesManage
              - AIBIDeveloper
              - AIBIUser
              - AIBIViewer
              - EmbedDeploymentRead
              - EmbedDashboardRead
              - FolderRead
              - FolderEdit
              - FolderManage
            type: string
          type: array
        resourceType:
          $ref: '#/components/schemas/PolicyResourceType'
        resources:
          items:
            type: string
          type: array
      required:
        - resourceType
        - actions
        - resources
      type: object
    PolicyResourceType:
      enum:
        - Global
        - Deployment
        - Report
        - ReportFolder
        - Agent
        - AgentSpace
        - Workbook
        - Dashboard
        - Folder
        - ChatThread
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````