Partially edit one or more users

patch

/rest/users

Partially updates one or more existing users. userId is required for every entry; other supplied fields are updated. A supplied role requires roleName and at least one of effectiveFrom or effectiveTo. The batch is processed by the existing editUser business operation.

Request

Header Parameters
Back to Top

Response

204 Response

Users updated successfully; no response body.

400 Response

Invalid collection, missing field, duplicate value, invalid date, or invalid locale.

401 Response

Authentication failed.

403 Response

Authorization failed for UserService/editUser.

404 Response

User, role, or primary company was not found.

409 Response

Conflicting user or role state.

500 Response

Uncatalogued business or internal processing error.
Back to Top

Examples

This example describes how to partially edit one or more users.

Example cURL Command

Use the following cURL command to submit a request on the REST resource:

curl -X PATCH \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -u username:password \
    -L "http://server:port/PASJava/rest/users" \
    -d '{"Use this placeholder to plug-in the example request body given below"}'

Example Request Body in JSON Format

The following shows an example of the request body in JSON format:

{
  "users": [
    {
      "userId": "{{user1}}",
      "firstName": "Daniel Updated",
      "email": "daniel.updated@example.com"
    }
  ]
}

Example Response

The operation returns HTTP status code 204 (No Content) when the users are updated successfully. The response does not contain a response body.

Back to Top