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

> Returns a list of requests for your organization that is visible by the admin.



## OpenAPI

````yaml https://app.opal.dev/openapi.yaml get /requests
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:
  /requests:
    get:
      tags:
        - requests
      summary: Get requests
      description: >-
        Returns a list of requests for your organization that is visible by the
        admin.
      operationId: getRequests
      parameters:
        - description: A start date filter for the events.
          examples:
            withDate:
              summary: Example with date
              value: '2021-11-01T00:00:00.000Z'
            withDatetime:
              summary: Example with date and time in ISO 8601 datetime format.
              value: '2025-01-01T00:00:00.000Z'
          explode: true
          in: query
          name: start_date_filter
          required: false
          schema:
            type: string
          style: form
        - description: An end date filter for the events.
          examples:
            withDate:
              summary: Example with date
              value: '2021-11-12T00:00:00.000Z'
            withDatetime:
              summary: Example with date and time in ISO 8601 datetime format.
              value: '2025-01-01T00:00:00.000Z'
          explode: true
          in: query
          name: end_date_filter
          required: false
          schema:
            type: string
          style: form
        - description: Filter requests by their requester ID.
          example: 37cb7e41-12ba-46da-92ff-030abe0450b1
          in: query
          name: requester_id
          required: false
          schema:
            type: string
            format: uuid
          style: form
        - description: Filter requests by their target user ID.
          example: 37cb7e41-12ba-46da-92ff-030abe0450b1
          in: query
          name: target_user_id
          required: false
          schema:
            type: string
            format: uuid
          style: form
        - description: Filter requests by the resource ID that was requested.
          example: 37cb7e41-12ba-46da-92ff-030abe0450b1
          in: query
          name: resource_id
          required: false
          schema:
            type: string
            format: uuid
          style: form
        - description: Filter requests by the group ID that was requested.
          example: 37cb7e41-12ba-46da-92ff-030abe0450b1
          in: query
          name: group_id
          required: false
          schema:
            type: string
            format: uuid
          style: form
        - description: The pagination cursor value.
          example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
          explode: true
          in: query
          name: cursor
          required: false
          schema:
            type: string
          style: form
        - description: Number of results to return per page. Default is 200.
          example: 200
          explode: true
          in: query
          name: page_size
          required: false
          schema:
            type: integer
            maximum: 1000
          style: form
        - description: Boolean toggle for if it should only show pending requests.
          explode: true
          in: query
          name: show_pending_only
          required: false
          schema:
            type: boolean
          style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestList'
          description: The list of requests.
      security:
        - BearerAuth: []
components:
  schemas:
    RequestList:
      description: |-
        # Request List
        ### Description
        The `RequestList` object is used to represent a list of requests.

        ### Usage Example
        Returned from the `GET Requests` endpoint.
      example:
        requests:
          - id: 7c86c85d-0651-43e2-a748-d69d658418e8
            organization_id: w86c85d-0651-43e2-a748-d69d658418e8
            created_at: '2021-01-06T20:00:00.000Z'
            updated_at: '2021-01-06T20:00:00.000Z'
            requester_id: c86c85d-0651-43e2-a748-d69d658418e8
            target_user_id: r86c85d-0651-43e2-a748-d69d658418e8
            target_group_id: g86c85d-0651-43e2-a748-d69d658418e8
            status: pending
            reason: I need this resource.
            duration_minutes: 1440
            request_comments:
              - id: 4c86c85d-0651-43e2-a748-d69d658418e8
                created_at: '2021-01-06T20:00:00.000Z'
                updated_at: '2021-01-06T20:00:00.000Z'
                request_id: 7c86c85d-0651-43e2-a748-d69d658418e8
                user_id: c86c85d-0651-43e2-a748-d69d658418e8
                comment: This is a comment.
        cursor: >-
          eyJjcmVhdGVkX2F0IjoiMjAyMS0wMS0wNlQyMDo0NzowMFoiLCJ2YWx1ZSI6ImFkbWluIn0=
      properties:
        requests:
          description: The list of requests.
          type: array
          items:
            $ref: '#/components/schemas/Request'
        cursor:
          description: >-
            The cursor to use in the next request to get the next page of
            results.
          type: string
          example: >-
            eyJjcmVhdGVkX2F0IjoiMjAyMS0wMS0wNlQyMDo0NzowMFoiLCJ2YWx1ZSI6ImFkbWluIn0=
    Request:
      description: |-
        # Request Object
        ### Description
        The `Request` object is used to represent a request.

        ### Usage Example
        Returned from the `GET Requests` endpoint.
      example:
        id: 7c86c85d-0651-43e2-a748-d69d658418e8
        created_at: '2021-01-06T20:00:00.000Z'
        updated_at: '2021-01-06T20:00:00.000Z'
        requester_id: c86c85d-0651-43e2-a748-d69d658418e8
        target_user_id: r86c85d-0651-43e2-a748-d69d658418e8
        target_group_id: r86c85d-0651-43e2-a748-d69d658418e8
        status: pending
        reason: I need this resource.
        duration_minutes: 1440
        request_comments:
          - id: 7c86c85d-0651-43e2-a748-d69d658418e8
            created_at: '2021-01-06T20:00:00.000Z'
            updated_at: '2021-01-06T20:00:00.000Z'
            request_id: 4c86c85d-0651-43e2-a748-d69d658418e8
            user_id: c86c85d-0651-43e2-a748-d69d658418e8
            comment: This is a comment.
        reviewer_stages:
          - requestedRoleName: Admin
            requestedItemName: AWS Production Account
            stages:
              - stage: 1
                operator: AND
                reviewers:
                  - id: 7c86c85d-0651-43e2-a748-d69d658418e8
                    status: PENDING
              - stage: 2
                operator: OR
                reviewers:
                  - id: 8d86c85d-0651-43e2-a748-d69d658418e9
                    status: APPROVED
      properties:
        id:
          description: The unique identifier of the request.
          example: 7c86c85d-0651-43e2-a748-d69d658418e8
          format: uuid
          type: string
        created_at:
          description: The date and time the request was created.
          example: '2021-01-06T20:00:00.000Z'
          format: date-time
          type: string
        updated_at:
          description: The date and time the request was last updated.
          example: '2021-01-06T20:00:00.000Z'
          format: date-time
          type: string
        requester_id:
          description: The unique identifier of the user who created the request.
          example: 7c86c85d-0651-43e2-a748-d69d658418e8
          format: uuid
          type: string
        target_user_id:
          description: The unique identifier of the user who is the target of the request.
          example: 7c86c85d-0651-43e2-a748-d69d658418e8
          format: uuid
          type: string
        target_group_id:
          description: The unique identifier of the group who is the target of the request.
          example: 7c86c85d-0651-43e2-a748-d69d658418e8
          format: uuid
          type: string
        status:
          $ref: '#/components/schemas/RequestStatusEnum'
          description: The status of the request.
          example: pending
        reason:
          description: The reason for the request.
          example: I need access to the AWS account.
          type: string
        duration_minutes:
          description: The duration of the request in minutes.
          example: 120
          type: integer
        requested_items_list:
          description: The list of targets for the request.
          type: array
          items:
            $ref: '#/components/schemas/RequestedItem'
        custom_fields_responses:
          description: The responses given to the custom fields associated to the request
          type: array
          items:
            $ref: '#/components/schemas/RequestCustomFieldResponse'
        stages:
          $ref: '#/components/schemas/RequestItemStages'
          deprecated: true
          description: The stages configuration for this request
        reviewer_stages:
          description: >-
            The configured reviewer stages for every item in this request, or an
            error message if reviewers could not be loaded
          oneOf:
            - type: array
              items:
                $ref: '#/components/schemas/RequestReviewerStages'
            - type: string
      required:
        - id
        - created_at
        - updated_at
        - requester_id
        - status
        - reason
    RequestStatusEnum:
      description: |-
        # Request Status
        ### Description
        The `RequestStatus` enum is used to represent the status of a request.

        ### Usage Example
        Returned from the `GET Requests` endpoint.
      enum:
        - PENDING
        - APPROVED
        - DENIED
        - CANCELED
      type: string
    RequestedItem:
      description: |-
        # Requested Item Object
        ### Description
        The `RequestedItem` object is used to represent a request target item.

        ### Usage Example
        Returned from the `GET Requests` endpoint.
      properties:
        resource_id:
          description: The ID of the resource requested.
          example: f454d283-ca87-4a8a-bdbb-df212eca5353
          format: uuid
          type: string
        group_id:
          description: The ID of the group requested.
          example: f454d283-ca87-4a8a-bdbb-df212eca5353
          format: uuid
          type: string
        access_level_name:
          description: The name of the access level requested.
          example: admin
          type: string
        access_level_remote_id:
          description: The ID of the access level requested on the remote system.
          example: arn:aws:iam::490306337630:role/SupportUser
          type: string
        name:
          description: The name of the target.
          example: Engineering Team
          type: string
        remote_id:
          description: The ID of the target on the remote system.
          example: arn:aws:iam::490306337630:role/SupportUser
          type: string
        remote_name:
          description: The name of the target on the remote system.
          example: SupportUser
          type: string
      example:
        resource_id: null
        group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
        access_level_name: admin
        access_level_remote_id: arn:aws:iam::490306337630:role/SupportUser
        name: Engineering Team
    RequestCustomFieldResponse:
      properties:
        field_name:
          type: string
        field_type:
          $ref: '#/components/schemas/RequestTemplateCustomFieldTypeEnum'
          example: SHORT_TEXT
        field_value:
          oneOf:
            - type: string
              example: This is a response to a long text or short text or multi choice
            - type: boolean
              example: true
      required:
        - field_name
        - field_type
        - field_value
    RequestItemStages:
      description: The stages configuration for a request item
      type: object
      deprecated: true
      properties:
        requestedRoleName:
          description: The name of the requested role
          type: string
        requestedItemName:
          description: The name of the requested item
          type: string
        stages:
          description: The stages of review for this request
          type: array
          items:
            $ref: '#/components/schemas/RequestStage'
      required:
        - requestedItemName
        - stages
    RequestReviewerStages:
      description: The stages configuration for a request item
      type: object
      properties:
        access_level_name:
          description: The name of the access level requested.
          example: admin
          type: string
        access_level_remote_id:
          description: The ID of the access level requested on the remote system.
          example: arn:aws:iam::490306337630:role/SupportUser
          type: string
        item_name:
          description: The name of the requested item
          type: string
        item_id:
          description: The ID of the resource requested.
          example: f454d283-ca87-4a8a-bdbb-df212eca5353
          format: uuid
          type: string
        stages:
          description: The stages of review for this request
          type: array
          items:
            $ref: '#/components/schemas/RequestStage'
      required:
        - item_name
        - item_id
        - stages
    RequestTemplateCustomFieldTypeEnum:
      description: The type of the custom request field.
      enum:
        - SHORT_TEXT
        - LONG_TEXT
        - BOOLEAN
        - MULTI_CHOICE
      type: string
    RequestStage:
      description: A stage in the request review process
      type: object
      properties:
        stage:
          description: The stage number
          type: integer
        operator:
          $ref: '#/components/schemas/ReviewStageOperator'
          description: The operator to apply to reviewers in this stage
        reviewers:
          description: The reviewers for this stage
          type: array
          items:
            $ref: '#/components/schemas/RequestReviewer'
      required:
        - stage
        - operator
        - reviewers
    ReviewStageOperator:
      description: The operator to apply to reviewers in a stage
      type: string
      enum:
        - AND
        - OR
    RequestReviewer:
      description: A reviewer in a request stage
      type: object
      properties:
        id:
          description: The unique identifier of the reviewer
          type: string
          format: uuid
        full_name:
          description: The user's full name.
          example: Jake Barnes
          type: string
        status:
          description: The status of this reviewer's review
          type: string
          enum:
            - PENDING
            - APPROVED
            - REJECTED
      required:
        - id
        - status
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````