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="
}Returns a list of requests for your organization that is visible by the admin.
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="
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
A start date filter for the events.
An end date filter for the events.
Filter requests by their requester ID.
Filter requests by their target user ID.
The pagination cursor value.
Number of results to return per page. Default is 200.
x <= 1000Boolean toggle for if it should only show pending requests.
The list of requests.
The RequestList object is used to represent a list of requests.
Returned from the GET Requests endpoint.
The list of requests.
Show child attributes
The unique identifier of the request.
"7c86c85d-0651-43e2-a748-d69d658418e8"
The date and time the request was created.
"2021-01-06T20:00:00.000Z"
The date and time the request was last updated.
"2021-01-06T20:00:00.000Z"
The unique identifier of the user who created the request.
"7c86c85d-0651-43e2-a748-d69d658418e8"
The status of the request.
PENDING, APPROVED, DENIED, CANCELED "pending"
The reason for the request.
"I need access to the AWS account."
The unique identifier of the user who is the target of the request.
"7c86c85d-0651-43e2-a748-d69d658418e8"
The unique identifier of the group who is the target of the request.
"7c86c85d-0651-43e2-a748-d69d658418e8"
The duration of the request in minutes.
120
The list of targets for the request.
Show child attributes
The ID of the resource requested.
"f454d283-ca87-4a8a-bdbb-df212eca5353"
The ID of the group requested.
"f454d283-ca87-4a8a-bdbb-df212eca5353"
The name of the access level requested.
"admin"
The ID of the access level requested on the remote system.
"arn:aws:iam::490306337630:role/SupportUser"
The name of the target.
"Engineering Team"
The ID of the target on the remote system.
"arn:aws:iam::490306337630:role/SupportUser"
The name of the target on the remote system.
"SupportUser"
The responses given to the custom fields associated to the request
Show child attributes
The type of the custom request field.
SHORT_TEXT, LONG_TEXT, BOOLEAN, MULTI_CHOICE "SHORT_TEXT"
"This is a response to a long text or short text or multi choice"
The stages configuration for this request
Show child attributes
The name of the requested item
The stages of review for this request
Show child attributes
The stage number
The operator to apply to reviewers in this stage
AND, OR The reviewers for this stage
Show child attributes
The unique identifier of the reviewer
The status of this reviewer's review
PENDING, APPROVED, REJECTED The user's full name.
"Jake Barnes"
The name of the requested role
The configured reviewer stages for every item in this request, or an error message if reviewers could not be loaded
Show child attributes
The name of the requested item
The ID of the resource requested.
"f454d283-ca87-4a8a-bdbb-df212eca5353"
The stages of review for this request
Show child attributes
The stage number
The operator to apply to reviewers in this stage
AND, OR The reviewers for this stage
Show child attributes
The unique identifier of the reviewer
The status of this reviewer's review
PENDING, APPROVED, REJECTED The user's full name.
"Jake Barnes"
The name of the access level requested.
"admin"
The ID of the access level requested on the remote system.
"arn:aws:iam::490306337630:role/SupportUser"
The cursor to use in the next request to get the next page of results.
"eyJjcmVhdGVkX2F0IjoiMjAyMS0wMS0wNlQyMDo0NzowMFoiLCJ2YWx1ZSI6ImFkbWluIn0="
Was this page helpful?