Skip to main content
POST
/
requests
cURL
curl --request POST \
  --url https://api.opal.dev/v1/requests \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "resources": [
    {
      "id": "group283-ca87-4a8a-bdbb-df212eca5353",
      "access_level_remote_id": "arn:aws:iam::490306337630:role/SupportUser",
      "access_level_name": "arn:aws:iam::490306337630:role/SupportUser"
    }
  ],
  "groups": [
    {
      "id": "f454d283-ca87-4a8a-bdbb-df212eca5353",
      "access_level_remote_id": "arn:aws:iam::490306337630:role/SupportUser",
      "access_level_name": "arn:aws:iam::490306337630:role/SupportUser"
    }
  ],
  "target_user_id": "userd283-ca87-4a8a-bdbb-df212eca5353",
  "target_group_id": "userd283-ca87-4a8a-bdbb-df212eca5353",
  "reason": "<string>",
  "support_ticket": {
    "ticketing_provider": "LINEAR",
    "remote_id": "<string>",
    "identifier": "<string>",
    "url": "<string>"
  },
  "duration_minutes": 0,
  "custom_metadata": [
    {
      "name": "<string>",
      "type": "SHORT_TEXT",
      "value": "<string>"
    }
  ]
}'
{
  "id": "4baf8423-db0a-4037-a4cf-f79c60cb67a5"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Resources to be updated

All the information needed for creating a request

resources
object[]
required
groups
object[]
required
reason
string
required
duration_minutes
integer
required

The duration of the request in minutes. -1 represents an indefinite duration

Required range: x >= -1
target_user_id
string<uuid>

The ID of the user to be granted access. Should not be specified if target_group_id is specified.

Example:

"userd283-ca87-4a8a-bdbb-df212eca5353"

target_group_id
string<uuid>

The ID of the group the request is for. Should not be specified if target_user_id is specified.

Example:

"userd283-ca87-4a8a-bdbb-df212eca5353"

support_ticket
object
custom_metadata
object[]

Response

200 - application/json

The resulting request.

id
string<uuid>
Example:

"4baf8423-db0a-4037-a4cf-f79c60cb67a5"