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
Body ()
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.
Root Schema : PutUsersRequest
Type: object
Show Source
Nested Schema : users
Type: array
Show Source
Nested Schema : PutUsersRequestEntity
Type: object
Show Source
Nested Schema : fields
Type: array
Show Source
Nested Schema : PutUsersByUserIdResponse
Type: object
Show Source
Nested Schema : RequestInfo
Type: object
Show Source
Nested Schema : LinkDataInstances
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successful
Headers
Body ()
Root Schema : PutUsersResponse
Type: object
Show Source
Nested Schema : users
Type: array
Show Source
Nested Schema : PutUserResponse
Type: object
Show Source
Nested Schema : fields
Type: array
Show Source
Nested Schema : RequestInfo
Type: object
Show Source
Nested Schema : Fields
Type: object
Show Source
Nested Schema : LinkDataInstances
Type: object
Show Source

401 Response

Unauthorized

403 Response

Forbidden

404 Response

Resource not found

500 Response

Internal Server Error
Back to Top

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:"
        }
    ]
}

 
Back to Top