curl --request POST \
--url https://api.dfns.io/permissions/{permissionId}/assignments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-DFNS-USERACTION: <api-key>' \
--data '
{
"identityId": "<string>"
}
'{
"id": "as-1vcmc-qrek0-6b4vii9pln60907e",
"permissionId": "pm-37vj4-jkr4l-lc9945spfftkne57",
"identityId": "<string>",
"isImmutable": true,
"dateCreated": "2023-04-14T20:41:28.715Z",
"dateUpdated": "2023-04-14T20:41:28.715Z"
}Assigns a permission (role) to an identity (user, PAT or service account), granting it access to the operations defined in the permission. Returns the assignment on success (200), or a pending change request if approval is required (202).
curl --request POST \
--url https://api.dfns.io/permissions/{permissionId}/assignments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-DFNS-USERACTION: <api-key>' \
--data '
{
"identityId": "<string>"
}
'{
"id": "as-1vcmc-qrek0-6b4vii9pln60907e",
"permissionId": "pm-37vj4-jkr4l-lc9945spfftkne57",
"identityId": "<string>",
"isImmutable": true,
"dateCreated": "2023-04-14T20:41:28.715Z",
"dateUpdated": "2023-04-14T20:41:28.715Z"
}CustomerEmployee)EndUser)Permissions:Assign: Always required.Bearer Token: Used to authenticate API requests. More details how to generate the token: Authentication flows
User Action Signature: Used to sign the change-inducing API requests. More details how to generate the token: User Action Signing flows
ID of the permission (also referred to as "role" in the dashboard).
1 - 64ID of the identity to assign the permission to. Can be a user ID, a service account ID, or a personal access token (PAT) ID.
1Success
ID of the permission assignment.
1 - 64^as-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$"as-1vcmc-qrek0-6b4vii9pln60907e"
ID of the permission (also referred to as "role" in the dashboard).
1 - 64^pm-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$"pm-37vj4-jkr4l-lc9945spfftkne57"
ID of the identity the permission is assigned to. Can be a user ID, a service account ID, or a personal access token (PAT) ID.
Whether this assignment is system-managed and cannot be modified.
Was this page helpful?