Update Role Privileges
A user’s roles are updated via a request. The URI /requests POST
allows for the addition of roles. The URI /requests DELETE
withdraws a role request that has not been approved yet. The actual update occurs when the request is approved.
cURL Example for Requesting a Role
curl -H "Content-Type: application/json" -H "X-Requested-By: <anyvalue>" -X POST -u username:password -d @post.json https://pseudo.com/iam/governance/selfservice/api/v1/requests
POST Request Body
{ "requests" :[ { "requestId": "Req1001", "reqJustification" : "Request role for sub-ordinate", "reqBeneficiaryList": [ { "id": "24" } ], "reqTargetEntities": [ { "entityId": "12", "entityType": "role", "startDate" : "2019-06-20T01:30:00Z", "endDate" : "2019-09-25T18:30:00Z" }, { "entityId": "13", "entityType": "role", "startDate" : "2019-06-20T01:30:00Z", "endDate" : "2019-09-25T18:30:00Z" } ] } ] }
POST Response Body
{ "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests" } ], "requests": [ { "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests/1003" } ], "id": "1003", "requestId": "Req1001", "reqStatus": "Request Created", "status": "SUCCESS" } ] }
cURL Example for Withdrawing a Role Request
curl -H "Content-Type: application/json" -H "X-Requested-By: <anyvalue>" -X DELETE -u username:password -d @post.json https://pseudo.com/iam/governance/selfservice/api/v1/requests/1003
DELETE Response Body
{ "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/adminservice/api/v1/requests/1003" } ], "id": "1003", "status": "withdrawn" }