Update Account Privileges
A user’s accounts are updated via a request. The URI /requests POST
allows for the addition of an account. The URI /accounts/{accountid} DELETE revokes the account instance specified by the account id which was provisioned for a particular user. The actual update occurs when the request is approved.
cURL Example for Requesting an Account
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" :[ { "reqJustification" : "Request account for sub-ordinates", "reqBeneficiaryList": [ { "id": "82" } ], "reqTargetEntities": [ { "entityId": "21", "entityType": "appinstance", "endDate" : "2019-07-25T18:30:00Z" } ] } ] }
To revoke an account using the following URIs:
-
/accounts?userid={userKey} GET
: Retrieves a list of accounts provisioned to a user -
/accounts/{accountid} DELETE
: Revokes an account instance that was provisioned to a user
cURL Example for Retrieving User Accounts
curl -H "Content-Type: application/json" -X GET -u username:password https://pseudo.com/iam/governance/selfservice/api/v1/accounts?userId=1001
GET Response Body
{ "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/accounts?userId=1001&offset=1&limit=10" }, { "rel": "first", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/accounts?userId=1001&offset=1&limit=10" } ], "count": 1, "hasMore": false, "totalResult": -1, "accounts": [ { "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/accounts/41" } ], "id": "41", "name": "dtran20190701", "userId": "1001", "appInstanceId": "1", "requestId": "", "fields": [ { "name": "Status", "value": "Provisioned" }, { "name": "Policy Key", "value": "" }, { "name": "Provisioned By", "value": "1" }, { "name": "Risk Summary", "value": 0 }, { "name": "Account Data", "value": [] }, { "name": "Provisioned-On Date", "value": "2019-07-01T16:42:23Z" }, { "name": "Process Instance Key", "value": "243" }, { "name": "Valid From Date", "value": "2019-07-01T16:42:22Z" }, { "name": "Account Description", "value": "dtran20190701" }, { "name": "Account Type", "value": "Primary" }, { "name": "Normalize Data", "value": [] } ] } ] }
cURL Example for Revoking an Account
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/accounts/41
DELETE Response Body
{ "status": "SUCCESS" }