UpdateUserRole
Change the role of a user. Only an Administrator can call this route, and it cannot be run as another user.
Headers
PATCH /api/ss/user/:id/role HTTP/1.1
Host: demo.attackforge.com
X-SSAPI-KEY: APIKey
Content-Type: application/jsonRequest
Path Parameters
id - string | required
ID of the user. Must be a 24-character hexadecimal id.
Example
Request
curl --request PATCH \
--url https://demo.attackforge.com/api/ss/user/5eacb8450c8d520a8281e539/role \
--header 'content-type: application/json' \
--header 'x-ssapi-key: ************' \
--data '{
"role":"projectoperator"
}'Response
Access and failures
Errors are returned in error:
Unauthorized- the caller is not an Administrator.User Not Found- no user has that ID.Rejecting Role Change- the user is the only active Administrator, and the new role is not admin.Maximum Active Users Reached- the user is a client, and the new role would take the number of users past the licence.Error Saving User- the change could not be saved.
Last updated