Assign Permission
POST /permissions/{permissionId}/assignments
Creates a permission assignment, effectively granting a permission to a specific Identity. Response confirms the assignment (success) or gives the reason why it's not possible (failure).
Required Permissions
Name
Conditions
Permissions:Assign
Always Required
Request body
In the request body specify the identity ID.
Request body fields
Type - Required
Description
identityId
String - Required
The ID of the identity the permission is being assigned to.
Request example
{
"identityId": "some-identity-id",
}
Response
Response example 200 - no approval required
// permission assignment
{
"id": "as-stream-pizza-08edcfff93",
"permissionId": "pm-orange-apple-2b17a80613",
"identityId": "oe-louisiana-one-6cf5e80c205c",
"isImmutable": false,
"dateCreated": "2022-10-26T09:48:31.247Z",
"dateUpdated": "2022-10-26T09:48:31.247Z"
}
Response example 202 - approval required
// permission assignment change request
{
"id":"cr-...",
"kind":"Assignment",
"operationKind":"Create",
"status":"Pending",
"entityId":"as-...",
"dateCreated":"2023-12-22T20:57:55.814Z",
"dateResolved":"2023-12-22T20:57:55.814Z",
"requester":{
"userId":"us-...",
"tokenId":"to-..."
},
"body":{
"id":"as-stream-pizza-08edcfff93",
"permissionId":"pm-orange-apple-2b17a80613",
"identityId":"oe-louisiana-one-6cf5e80c205c",
"isImmutable":false,
},
}
Notes
Assignment IDs look like this: as-stream-pizza-08edcfff93
. They follow this format: as-<random-words>-<random-alphanumeric-string>
Last updated