> ## 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.

# Check requestability of many resources

> Checks whether a user can request each of up to 100 resources, with the same evaluation and
permission rule as `GET /resources/{resource_id}/requestable/users/{user_id}`. Duplicate IDs
are dropped and results keep the order of first appearance. A resource that does not exist
in your organization (or, on a self-check without CHECK_REQUESTABILITY, that you cannot
read) is returned with `requestable: false` and reason `NOT_FOUND`. This is a read-only
evaluation: read-only API tokens may call it even though the method is POST.




## OpenAPI

````yaml https://app.opal.dev/openapi.yaml post /resources/requestable/check
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: agent-activity
    description: Operations related to agent activity telemetry
  - name: apps
    description: Operations related to apps
  - name: bundles
    description: Operations related to bundles
  - name: campaigns
    description: Operations related to access review campaigns
  - name: configuration-templates
    description: Operations related to configuration templates
  - name: delegations
    description: Operations related to request reviewer delegations
  - name: event-streams
    description: Operations related to event streaming connections
  - 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: opal-queries
    description: Operations related to OpalQuery
  - name: opal-scripts
    description: Operations related to OpalScripts
  - name: owners
    description: Operations related to owners
  - name: requests
    description: Operations related to requests
  - name: resources
    description: Operations related to resources
  - name: role-assignments
    description: >-
      Operations related to role assignments (general grants between an entity
      and a principal)
  - name: paladin
    description: Operations related to Paladin
  - name: service-users
    description: Operations related to service users (non-human identities owned by a team)
  - 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. Deprecated in favor of the `campaigns` API.
  - name: users
    description: Operations related to users
paths:
  /resources/requestable/check:
    post:
      tags:
        - resources
      summary: Check requestability of many resources
      description: >
        Checks whether a user can request each of up to 100 resources, with the
        same evaluation and

        permission rule as `GET
        /resources/{resource_id}/requestable/users/{user_id}`. Duplicate IDs

        are dropped and results keep the order of first appearance. A resource
        that does not exist

        in your organization (or, on a self-check without CHECK_REQUESTABILITY,
        that you cannot

        read) is returned with `requestable: false` and reason `NOT_FOUND`. This
        is a read-only

        evaluation: read-only API tokens may call it even though the method is
        POST.
      operationId: check_resources_requestable
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchRequestabilityCheckRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchRequestabilityCheckResponse'
          description: Requestability of each resource, in request order.
        '400':
          description: Malformed body, empty ids, or more than 100 ids.
        '403':
          description: >-
            The caller is checking another user (or requester) and is not an
            Opal admin or holder of the CHECK_REQUESTABILITY permission.
        '404':
          description: The user_id or requester_id was not found.
      security:
        - BearerAuth: []
components:
  schemas:
    BatchRequestabilityCheckRequest:
      description: The user and assets to check.
      example:
        user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
        ids:
          - 4baf8423-db0a-4037-a4cf-f79c60cb67a5
          - 1b978423-db0a-4037-a4cf-f79c60cb67b3
      properties:
        user_id:
          description: The ID of the user the access would be for.
          format: uuid
          type: string
        requester_id:
          description: >
            Optional ID of the person filling in the form when different from
            user_id. Adds the

            on-behalf check evaluated as that requester, following
            EnforceRequestOnBehalfOfUser.
          format: uuid
          type: string
        ids:
          description: The asset IDs to check. Duplicates are dropped.
          type: array
          minItems: 1
          maxItems: 100
          items:
            type: string
            format: uuid
      type: object
      required:
        - user_id
        - ids
    BatchRequestabilityCheckResponse:
      description: Requestability of each asset, in request order.
      example:
        user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
        results:
          - id: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
            requestable: true
            reason: REQUESTABLE
            access_levels:
              - access_level_remote_id: read
                access_level_name: Read
                requestable: true
          - id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
            requestable: false
            reason: NOT_FOUND
      properties:
        user_id:
          description: The ID of the user that was checked.
          format: uuid
          type: string
        results:
          type: array
          items:
            $ref: '#/components/schemas/BatchRequestabilityCheckResult'
      type: object
      required:
        - user_id
        - results
    BatchRequestabilityCheckResult:
      description: Whether one asset is requestable for the user, and why.
      properties:
        id:
          description: The ID of the asset that was checked.
          format: uuid
          type: string
        requestable:
          type: boolean
        reason:
          $ref: '#/components/schemas/RequestabilityReasonEnum'
        access_levels:
          description: Per-access-level requestability. Omitted when reason is NOT_FOUND.
          type: array
          items:
            $ref: '#/components/schemas/RequestableAccessLevel'
      type: object
      required:
        - id
        - requestable
        - reason
    RequestabilityReasonEnum:
      description: >-
        Why an asset is or is not requestable for a user. Reasons are evaluated
        in order; the first

        that applies is returned. REQUESTABLE means at least one access level
        can be requested.
      enum:
        - ASSET_DELETED
        - REQUESTER_CANNOT_REQUEST_FOR_USER
        - UNSUPPORTED_ASSET_TYPE
        - LINKED_GROUP_NOT_REQUESTABLE
        - CONDITION_SCRIPT_FAILED
        - REQUESTS_DISABLED
        - NO_REQUESTABLE_ACCESS_LEVEL
        - NO_REQUESTABLE_ITEMS
        - NOT_FOUND
        - REQUESTABLE
      example: REQUESTABLE
      type: string
    RequestableAccessLevel:
      description: Requestability of a single access level.
      properties:
        access_level_remote_id:
          description: >-
            The remote ID of the access level. Empty for assets without access
            levels.
          type: string
        access_level_name:
          description: The human-readable name of the access level.
          type: string
        requestable:
          type: boolean
        reason:
          $ref: '#/components/schemas/RequestabilityReasonEnum'
          description: Present when the access level is not requestable.
      type: object
      required:
        - access_level_remote_id
        - requestable
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````

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