Patch Users

patch

/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 : PatchUsersRequest
Type: object
Show Source
Nested Schema : users
Type: array
Show Source
Nested Schema : PatchUserRequest
Type: object
Show Source
Nested Schema : add
Type: array
Show Source
Nested Schema : delete
Type: array
Show Source
Nested Schema : update
Type: array
Show Source
Nested Schema : Fields
Type: object
Show Source
Nested Schema : PatchUserRequestDelete
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successful
Headers
Body ()
Root Schema : PatchUsersResponse
Type: object
Show Source
Nested Schema : RequestInfo
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 example demonstrates the ability to patch multiple users with a single request. 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 PATCH  -u username:password  -d @patch.json https://pseudo.com/iam/governance/selfservice/api/v1/users

Example of PATCH Request Body

The following example shows the contents of the request body in JSON format.

{
  "users": [
    {
      "id": "18008",
      "add": [
        {
          "name": "Last Name",
          "value": "updateed12345"
        }
      ],
      "delete": [
        {
          "name": "First Name"
        }
      ],
      "update": [
        {
          "name": "Display Name",
          "value": "supriya12345"
        }
      ]
    },
    {
      "id": "18009",
      "add": [
        {
          "name": "Last Name",
          "value": "updateed12345"
        }
      ],
      "delete": [
        {
          "name": "First Name"
        }
      ],
      "update": [
        {
          "name": "Display Name",
          "value": "supriya12345"
        }
      ]
    }
  ]
}

Example of PATCH Response Body

The following example shows the contents of the response body in JSON format:

{
  "users": [
    {
      "links": [
        {
          "rel": "self",
          "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/18008"
        }
      ],
      "id": "18008",
      "status": " SUCCESS",
      "request": {
        "links": [
          {
            "rel": "self",
            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/requests/10073"
          }
        ],
        "requestId": "10073"
      }
    },
    {
      "links": [
        {
          "rel": "self",
          "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/18009"
        }
      ],
      "id": "18009",
      "status": " SUCCESS",
      "request": {
        "links": [
          {
            "rel": "self",
            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/requests/10074"
          }
        ],
        "requestId": "10074"
      }
    }
  ]
}
Back to Top