Skip to main content
GET
/
requests
Get requests
curl --request GET \
  --url https://api.opal.dev/v1/requests \
  --header 'Authorization: Bearer <token>'
{
  "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="
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

start_date_filter
string

A start date filter for the events.

end_date_filter
string

An end date filter for the events.

requester_id
string<uuid>

Filter requests by their requester ID.

target_user_id
string<uuid>

Filter requests by their target user ID.

cursor
string

The pagination cursor value.

page_size
integer

Number of results to return per page. Default is 200.

Required range: x <= 1000
show_pending_only
boolean

Boolean toggle for if it should only show pending requests.

Response

200 - application/json

The list of requests.

Request List

Description

The RequestList object is used to represent a list of requests.

Usage Example

Returned from the GET Requests endpoint.

requests
object[]

The list of requests.

cursor
string

The cursor to use in the next request to get the next page of results.

Example:

"eyJjcmVhdGVkX2F0IjoiMjAyMS0wMS0wNlQyMDo0NzowMFoiLCJ2YWx1ZSI6ImFkbWluIn0="