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

# Get resources scoped role permissions

> Returns all the scoped role permissions that apply to the given resource. Only OPAL_SCOPED_ROLE resource type supports this field.



## OpenAPI

````yaml https://app.opal.dev/openapi.yaml get /resources/{resource_id}/scoped-role-permissions
openapi: 3.1.0
info:
  contact:
    email: hello@opal.dev
    name: Opal Team
    url: https://www.opal.dev/
  description: >-
    The Opal API is a RESTful API that allows you to interact with the Opal
    Security platform programmatically.
  title: Opal API
  version: '1.0'
servers:
  - description: Production
    url: https://api.opal.dev/v1
security: []
tags:
  - name: access-rules
    description: Operations related to access rules
  - name: apps
    description: Operations related to apps
  - name: bundles
    description: Operations related to bundles
  - name: configuration-templates
    description: Operations related to configuration templates
  - name: delegations
    description: Operations related to request reviewer delegations
  - name: events
    description: Operations related to events
  - name: groups
    description: Operations related to groups
  - name: group-bindings
    description: Operations related to group bindings
  - name: idp-group-mappings
    description: Operations related to IDP group mappings
  - name: message-channels
    description: Operations related to message channels
  - name: non-human-identities
    description: Operations related to non-human identities
  - name: on-call-schedules
    description: Operations related to on-call schedules
  - name: owners
    description: Operations related to owners
  - name: requests
    description: Operations related to requests
  - name: resources
    description: Operations related to resources
  - name: sessions
    description: Operations related to sessions
  - name: tags
    description: Operations related to tags
  - name: tokens
    description: Operations related to API tokens
  - name: uars
    description: Operations related to UARs
  - name: users
    description: Operations related to users
paths:
  /resources/{resource_id}/scoped-role-permissions:
    get:
      tags:
        - resources
      description: >-
        Returns all the scoped role permissions that apply to the given
        resource. Only OPAL_SCOPED_ROLE resource type supports this field.
      operationId: get_resource_scoped_role_permissions
      parameters:
        - description: The ID of the resource whose scoped role permissions belong to.
          name: resource_id
          example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
          explode: false
          in: path
          required: true
          schema:
            type: string
            format: uuid
          style: simple
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScopedRolePermissionList'
          description: The role permissions that this Opal Scoped Role has.
      security:
        - BearerAuth: []
components:
  schemas:
    ScopedRolePermissionList:
      example:
        permissions:
          - target_ids:
              - a381e7a3-e5e0-4c48-b1d6-4ccb4c191bc1
              - 8294e9c9-deb6-48e9-9c99-da2a1e04a87f
            target_type: RESOURCE
            permission_name: READ
      properties:
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/ScopedRolePermission'
      type: object
      required:
        - permissions
    ScopedRolePermission:
      type: object
      properties:
        target_ids:
          description: >-
            The IDs of the entities that this permission applies to. If empty of
            missing, the permission will have untargeted scope.
          example:
            - a381e7a3-e5e0-4c48-b1d6-4ccb4c191bc1
            - 8294e9c9-deb6-48e9-9c99-da2a1e04a87f
          items:
            type: string
            format: uuid
          type: array
        target_type:
          $ref: '#/components/schemas/RolePermissionTargetTypeEnum'
        permission_name:
          $ref: '#/components/schemas/RolePermissionNameEnum'
        allow_all:
          type: boolean
      required:
        - target_type
        - permission_name
        - allow_all
    RolePermissionTargetTypeEnum:
      description: The type of the target for the role permission.
      enum:
        - RESOURCE
        - CONNECTION
        - GROUP
        - BUNDLE
        - USER
        - ACCESS_REVIEW
        - OWNER
      example: RESOURCE
      type: string
    RolePermissionNameEnum:
      description: The name of the role permission.
      enum:
        - READ
        - READ_ASSIGNMENTS
        - CREATE
        - IMPORT
        - EXPORT
        - SYNC
        - DELETE
        - READ_SETTINGS
        - EDIT_TAGS
        - EDIT_SETTINGS
        - EDIT_SYNC_SETTINGS
        - EDIT_ASSIGNMENTS
        - EDIT_REQUEST_CONFIGURATIONS
        - EDIT_EVENT_STREAM
        - ASSIGN_UAR_REVIEWERS
        - SEND_REMINDERS
        - STOP
        - REQUEST_ON_BEHALF
        - RESET_MFA
      example: READ
      type: string
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````