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

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string<uuid>
required

The ID of the request.

Response

200 - application/json

The requested request object.

Request Object

Description

The Request object is used to represent a request.

Usage Example

Returned from the GET Requests endpoint.

id
string<uuid>
required

The unique identifier of the request.

Example:

"7c86c85d-0651-43e2-a748-d69d658418e8"

created_at
string<date-time>
required

The date and time the request was created.

Example:

"2021-01-06T20:00:00.000Z"

updated_at
string<date-time>
required

The date and time the request was last updated.

Example:

"2021-01-06T20:00:00.000Z"

requester_id
string<uuid>
required

The unique identifier of the user who created the request.

Example:

"7c86c85d-0651-43e2-a748-d69d658418e8"

status
enum<string>
required

The status of the request.

Available options:
PENDING,
APPROVED,
DENIED,
CANCELED
reason
string
required

The reason for the request.

Example:

"I need access to the AWS account."

target_user_id
string<uuid>

The unique identifier of the user who is the target of the request.

Example:

"7c86c85d-0651-43e2-a748-d69d658418e8"

target_group_id
string<uuid>

The unique identifier of the group who is the target of the request.

Example:

"7c86c85d-0651-43e2-a748-d69d658418e8"

duration_minutes
integer

The duration of the request in minutes.

Example:

120

requested_items_list
object[]

The list of targets for the request.

custom_fields_responses
object[]

The responses given to the custom fields associated to the request

stages
object
deprecated

The stages configuration for this request

reviewer_stages
object[]

The configured reviewer stages for every item in this request