Update users
put
/iam/governance/selfservice/api/v1/users
Updates the one or more user(s) with list of user attributes specified in the request payload. The user should have the necessary privileges to perform the modify user action.
Request
Supported Media Types
- application/json
List of attributes of users to be updated. "id" is a mandatory field. The "id" field maps to the usr_key attribute of the user.
Response
Supported Media Types
- application/json
200 Response
Successful
Headers
-
ResponseTime: string
Captures the time in milliseconds taken for processing the request.
401 Response
Unauthorized
403 Response
Forbidden
404 Response
Resource not found
500 Response
Internal Server Error
Examples
This demonstrates the ability to update multiple users in a single request. This shows both a success and a failure. The information shown here is against a pseudo system and serves as a prototype.
cURL Example
curl -H "Content-Type: application/json" -H "X-Requested-By: <anyvalue>" -X PUT -u username:password -d @put.json https://pseudo.com/iam/governance/selfservice/api/v1/users
Example of PUT Request Body
The following example shows the contents of the request body in JSON format.
{ "users": [ { "requestId": "123", "id": "24", "fields": [ { "name": "First Name", "value": "UpdatedFN" } ] }, { "requestId": "123", "id": "9999", "fields": [ { "name": "First Name", "value": "UpdatedFN1" } ] } ] }
Example of PUT Response Body
The following example shows the contents of the response body in JSON format.
{ "users": [ { "links": [ { "rel": "self", "href": "http://pseudo.com:PORT/iam/governance/selfservice/api/v1/users/24" } ], "requestId": "123", "status": "SUCCESS", "fields": [ { "name": "First Name", "value": "UpdatedFN" } ] }, { "links": [ { "rel": "self", "href": "http://pseudo.com:PORT/iam/governance/selfservice/api/v1/users/9999" } ], "requestId": "123", "status": "FAIL", "reason": "IAM-2040028:User does not exists:" } ] }