PATCH /accounts/{id}/users/{userId}
You can make the following updates to a user:
- Change the
password
,firstName
,lastName
, oremail
. - Assign roles to a user.
- Activate or deactivate a with the
active
parameter.
Path Parameters
id | The unique identifier for an account within an organization. |
userId | The id associated with a specific user. |
Request Body Parameters
firstName | The first name of the user. |
lastName | The last name of the user. |
email | The email address of the user. The email receives all password reset emails. |
password | The assigned password for the user. |
roles | An object containing role assignment, which can be:
|
active | Deactivate by sending "active"= false .Activate by sending "active"= true . |
Example Request
curl -X PATCH \ https://api.openconnectors.us2.ext.hana.ondemand.com/elements/api-v2/accounts/161268/users/178592 \ -H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \ -H 'content-type: application/json' \ -d '{ "firstName": "First", "lastName": "Last", "email": "firstlast@cloud-elements.com",
"password": "password",
"roles:[
{
"key": "admin"
}
] } '
Example Response
[ { "id":160255, "createdDate":"2017-01-18", "firstName":"first", "password":"secured", "email":"
firstlast@cloud-elements.com
", "active":true, "lastName":"last", "accountExpired":false, "accountLocked":false, "credentialsExpired":false, "roles":[ ], "secret": "wGOw+75xqzBhek=/cP8wm3SPSNggfTZp1GFLtwfYzV0r""lastLoginDate":"2018-03-07", "accountNonLocked":true, "credentialsNonExpired":true, "accountNonExpired":true, "enabled":true, "fullName":"First Last" } ]