Update user
PUT {{baseUrl}}/users/:id?aid=1234
Updates a user using the user ID. You can update the user name, email address, account group assignments, or roles. This endpoint requires the Edit users in all account groups
or Edit users
permission.
When updating a user, the following applies:
* When updating a user's email address, the user must confirm the username change before they can subsequently log in or perform API operations.
* Any update that includes accountGroupRoles
is a replace-based update and not a delta-based update.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
aid | number | A unique identifier associated with your account group. You can retrieve your AccountGroupId from the /account-groups endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. |
Request Body
{"name"=>"User X", "email"=>"userx@thousandeyes.com", "loginAccountGroupId"=>"691", "accountGroupRoles"=>[{"accountGroupId"=>"315", "roleIds"=>["57", "1140"]}, {"accountGroupId"=>"315", "roleIds"=>["57", "1140"]}], "allAccountGroupRoleIds"=>["57", "1140"]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"name":"User X","email":"userx@thousandeyes.com","uid":"245","dateRegistered":"2020-07-17T22:00:54Z","loginAccountGroup":{"aid":"1234","accountGroupName":"Account A"},"lastLogin":"2022-07-17T22:00:54Z","accountGroupRoles":[{"accountGroup":{"aid":"1234","accountGroupName":"Account A"},"roles":[{"name":"Organization Admin","roleId":"35","isBuiltin":false,"hasManagementPermissions":true},{"name":"Organization Admin","roleId":"35","isBuiltin":false,"hasManagementPermissions":false}]},{"accountGroup":{"aid":"1234","accountGroupName":"Account A"},"roles":[{"name":"Organization Admin","roleId":"35","isBuiltin":false,"hasManagementPermissions":true},{"name":"Organization Admin","roleId":"35","isBuiltin":false,"hasManagementPermissions":false}]}],"allAccountGroupRoles":[{"name":"Organization Admin","roleId":"35","isBuiltin":true,"hasManagementPermissions":true},{"name":"Organization Admin","roleId":"35","isBuiltin":false,"hasManagementPermissions":true}],"_links":{"self":{"href":"https://api.thousandeyes.com/v7/link/to/resource/id","templated":false,"type":"amet ipsum fugiat cillum","deprecation":"eiusmod consectetur ea sint","name":"voluptate f","profile":"laborum Lorem voluptate nisi","title":"nostrud voluptate mollit officia ullamco","hreflang":"officia sit"}}}