Document Link: create-access-request | SailPoint Developer Community
The document is slightly off; the requestedFor section should be in an array format, even if it’s for a single identity.
Snippet from the SailPoint docs:
POST /v3/access-requests HTTP/1.1
Host: sailpoint.api.identitynow.com
Content-Type: application/json
Accept: application/json
Authorization: Bearer <TOKEN>
Content-Length: 1626
{
"requestedFor": "2c918084660f45d6016617daa9210584", // *THIS IS INCORRECT syntax*
"requestType": "GRANT_ACCESS",
"requestedItems": [
{
"type": "ACCESS_PROFILE",
"id": "2c9180835d2e5168015d32f890ca1581",
"comment": "Requesting access profile for John Doe",
"clientMetadata": {
"requestedAppName": "test-app",
"requestedAppId": "2c91808f7892918f0178b78da4a305a1"
},
"removeDate": "2020-07-11T21:23:15.000Z",
"assignmentId": "ee48a191c00d49bf9264eb0a4fc3a9fc",
"nativeIdentity": "CN=User db3377de14bf,OU=YOURCONTAINER, DC=YOURDOMAIN"
}
],
"clientMetadata": {
"requestedAppId": "2c91808f7892918f0178b78da4a305a1",
"requestedAppName": "test-app"
},
"requestedForWithRequestedItems": [
{
"identityId": "cb89bc2f1ee6445fbea12224c526ba3a",
"requestedItems": [
{
"type": "ACCESS_PROFILE",
"id": "2c9180835d2e5168015d32f890ca1581",
"comment": "Requesting access profile for John Doe",
"clientMetadata": {
"requestedAppName": "test-app",
"requestedAppId": "2c91808f7892918f0178b78da4a305a1"
},
"removeDate": "2020-07-11T21:23:15.000Z",
"accountSelection": [
{
"sourceId": "cb89bc2f1ee6445fbea12224c526ba3a",
"accounts": [
{
"accountUuid": "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
"nativeIdentity": "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
}
]
}
]
}
]
}
]
}
Reference topic: Manage Access-400 Bad request while adding Entitlement using workflow
The requestedFor section should be in an array format, even if it’s for a single identity.
Example with correction:
"requestedFor": ["2c918084660f45d6016617daa9210584"],