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

# Get a role binding by ID

> Get a single role binding by its system-generated unique identifier.



## OpenAPI

````yaml /openapi.json get /api/svc/v1/role-bindings/{id}
openapi: 3.1.0
info:
  title: TrueFoundry API
  description: API for TrueFoundry
  version: 0.1.0
  contact: {}
servers:
  - url: https://{controlPlaneURL}
    variables:
      controlPlaneURL:
        default: app.truefoundry.com
        description: Control Plane URL
security: []
tags:
  - name: Agent
  - name: Agent Skills
  - name: Applications
  - name: Metrics
  - name: Apply
  - name: Artifacts
  - name: Audit Logs
  - name: Clusters
  - name: Jobs
  - name: LLM Gateway Budgets
  - name: Logs
  - name: MCP Registry
  - name: MCP Servers V2
  - name: MLRepos
  - name: Model Deployments
  - name: Models
  - name: Personal Access Tokens
  - name: Prompts
  - name: Provider Integrations
  - name: SCIM v2
  - name: Secret Groups
  - name: Secrets
  - name: Teams
  - name: Traces
  - name: Users
  - name: Virtual Accounts
  - name: Role Bindings
  - name: Workspaces
  - name: Provider Accounts
paths:
  /api/svc/v1/role-bindings/{id}:
    get:
      tags:
        - Role Bindings
        - public
      summary: Get a role binding by ID
      description: Get a single role binding by its system-generated unique identifier.
      operationId: RoleBinding.getById
      parameters:
        - name: id
          required: true
          in: path
          description: System-generated role binding ID.
          schema:
            example: jqfwg345gi25n5ju2yz5iz6m
            type: string
      responses:
        '200':
          description: The role binding with the given ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRoleBindingResponse'
        '404':
          description: Role binding with the provided ID was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
      security:
        - jwt: []
components:
  schemas:
    GetRoleBindingResponse:
      type: object
      properties:
        data:
          description: The role binding object.
          allOf:
            - $ref: '#/components/schemas/RoleBinding'
      required:
        - data
      title: GetRoleBindingResponse
      x-fern-type-name: GetRoleBindingResponse
    HttpError:
      type: object
      properties:
        statusCode:
          type: integer
          description: HTTP Status Code
        message:
          type: string
          description: Error Message
        code:
          oneOf:
            - type: integer
            - type: string
          description: Error code
          nullable: true
        details:
          type: array
          description: Error details
          items:
            type: object
          nullable: true
      required:
        - statusCode
        - message
      title: HttpError
      x-fern-type-name: HttpError
    RoleBinding:
      type: object
      properties:
        id:
          type: string
          nullable: true
        name:
          type: string
        accountId:
          type: string
        manifest:
          oneOf:
            - $ref: '#/components/schemas/RoleBindingManifest'
          description: Stored role binding manifest
        metadata:
          type: object
          additionalProperties: true
          nullable: true
        createdBySubject:
          $ref: '#/components/schemas/Subject'
        createdAt:
          format: date-time
          type: string
          nullable: true
        updatedAt:
          format: date-time
          type: string
          nullable: true
      required:
        - name
        - accountId
        - manifest
        - createdBySubject
      title: RoleBinding
      x-fern-type-name: RoleBinding
    RoleBindingManifest:
      type: object
      required:
        - type
        - name
        - subjects
        - permissions
      properties:
        type:
          description: +value=role-binding
          type: string
          enum:
            - role-binding
          default: role-binding
        name:
          description: Unique name for this role binding.
          type: string
          pattern: ^[a-z][a-z0-9-]{1,64}[a-z0-9]$
        subjects:
          description: >-
            One row per principal; set type and name (email, team name, virtual
            account name, agent name, or external identity name).
          type: array
          items:
            $ref: '#/components/schemas/RoleBindingSubject'
        permissions:
          description: Resource-scoped role grants (resource type, FQN, and role name).
          type: array
          items:
            $ref: '#/components/schemas/RoleBindingPermission'
      title: RoleBindingManifest
      x-fern-type-name: RoleBindingManifest
    Subject:
      type: object
      properties:
        subjectId:
          type: string
          description: Subject ID
        subjectType:
          type: string
          description: Subject type
          enum:
            - user
            - team
            - serviceaccount
            - virtualaccount
            - agent-identity
            - agent
            - agent-channel-identity
            - role
        subjectSlug:
          type: string
          description: Subject slug
          nullable: true
        subjectDisplayName:
          type: string
          description: Subject display name
          nullable: true
        subjectPatName:
          type: string
          description: Subject PAT name
          nullable: true
        subjectControllerName:
          type: string
          nullable: true
        subjectExternalIdentitySlug:
          type: string
          description: External identity slug (external_identity_id:sub:email)
          nullable: true
      required:
        - subjectId
        - subjectType
      title: Subject
      x-fern-type-name: Subject
    RoleBindingSubject:
      description: >-
        Single row per principal: type selects how to interpret name (email vs
        names).

        Field names mirror the manifest root (type + name) for consistency in
        the UI and YAML.
      type: object
      required:
        - type
        - name
      properties:
        type:
          description: >-
            Whether this row identifies a user (email), a team (name), a virtual
            account (name), or an agent (name).
          type: string
          enum:
            - user
            - team
            - virtualaccount
            - agent
        name:
          description: >-
            User email when type is user; team, virtual account, or agent name
            otherwise.
          type: string
          minLength: 1
          maxLength: 1024
      title: RoleBindingSubject
      x-fern-type-name: RoleBindingSubject
    RoleBindingPermission:
      description: Grants a named account role on a specific resource identified by FQN.
      type: object
      required:
        - resourceType
        - resourceFqn
        - role
      properties:
        resourceType:
          description: Target resource kind (e.g. workspace, cluster, ml-repo).
          type: string
          minLength: 1
          maxLength: 128
        resourceFqn:
          description: Fully qualified name of the resource.
          type: string
          minLength: 1
          maxLength: 1024
        role:
          description: Name of the role to bind (e.g. workspace-editor, model-user).
          type: string
          minLength: 1
          maxLength: 255
      title: RoleBindingPermission
      x-fern-type-name: RoleBindingPermission
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.