POST Update Hierarchy User
URL: /hierarchy/user
Accessible by: EMS, Utility accounts only.
Restrictions: User must have the security privilege on My Sets set to update users and the set the privileges are being assigned or updated on.
Updates hierarchy user information and may update or add privileges to existing hierarchy users.
Privileges are either updated if they already exist, or added if they do not.
To add new users, use the add operation.
See Getting Started with Management Set Hierarchy for additional information.
Request Properties
Property | Version | Type | Required | Description |
---|---|---|---|---|
operation | 1 | String | Yes | The type of request. Always "update". |
users | 1 | HierarchyUser [] | No | The users to update. |
privileges | 1 | HierarchyPrivilege [] | No | The privileges to update or add. |
Response Properties
Property | Version | Type | Description |
---|---|---|---|
status | 1 | Status | The api response code. |
Example Request:
Request Body
NOTE: Request body is not encoded for example purposes.
HEADERS: Content-Type: application/json;charset=UTF-8 Authorization: Bearer Rc7JE8P7XUgSCPogLOx2VLMfITqQQrjg REQUEST: POST https://api.ecobee.com/1/hierarchy/user?format=json POST BODY: { "operation": "update", "users": [ { "userName": "user1@update.com", "firstName": "Updated", "lastName": "User", "phone": "222-333-4444", "emailAlerts": false } ], "privileges": [ { "setPath": "/MainNode", "userName": "user1@update.com", "allowAll": true }, { "setPath": "/MainNode", "userName": "user2@update.com", "allowAll": true }, { "setPath": "/OtherNode", "userName": "user2@update.com", "allowView": true } ] }
Sample API Call
Show code sample in:
curl -s --request POST --data-urlencode @json.txt -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Bearer ACCESS_TOKEN" "https://api.ecobee.com/1/hierarchy/user?format=json"
Example Response:
{ "status": { "code": 0, "message": "" } }