updateUser
A Graze API POST request that updates an existing user.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint updateUser
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| String | No, you use if | Username of the user to be updated. |
| Long | No, if you use | User ID of the user to be updated. |
| String | No | New user password, only valid for DB realm. |
| Boolean | No | Set to |
| String | No | User's email address. |
| String | No | User's full name. |
| JSON list | No | List of either the role IDs or the role names. For example, |
| String or Number | No | User's primary group name or primary group ID. |
| String or Number | No | User's department ID or department name. |
| String | No | User's timezone. |
| String | No | User's phone number. |
| Number | No | Number of minutes after which the user's session expires. Default is the system default. |
competencies | JSON list | No | A list with the user competencies. Each competency should have have name or cid and ranking. For example: [ {"name":"SunOS", "ranking": 40}, {"name":"SAP", "ranking": 50}, {"name":"EMC", "ranking": 60} ] |
| JSON list of Numbers or Strings | No | List of the user's team names or team IDs. |
Response
Endpoint updateUser
returns the following response:
Examples
The following examples demonstrate typical use of endpoint updateUser
:
Request example
Example cURL request to update user ID 5:
curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/updateUser" \ -H "Content-Type: application/json; charset=UTF-8" \ -d '{"uid" : 5, "active" : true, "password" : "test", "roles" : ["Super User", "Operator"], "teams" : ["my team 1"], "session_expiry" : null, "properties" : null, "contact_num" : "555-123456", "timezone" : "Europe/London", "fullname" : "John Doe", "department" : "Support", "primary_group" : "Network", "email" : "test@test.com"}'