GET List Hierarchy Sets
URL: /hierarchy/set
Accessible by: EMS, Utility accounts only.
Restrictions: The user must be able to view the specified node. Only sets viewable by the user are returned.
Returns the management set hierarchy either at a single node depth and its children or recursively starting from the node path specified.
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 "list". |
setPath | 1 | String | Yes | The management set path. |
recursive | 1 | Boolean | No | Whether to also return the children of the children, recursively. Default: false |
includePrivileges | 1 | Boolean | No | Whether to include the privileges with each set. Default: false |
includeThermostats | 1 | Boolean | No | Whether to include a list of all thermostat identifiers assigned to each set. Default: false |
Response Properties
Property | Version | Type | Description |
---|---|---|---|
sets | 1 | HierarchySet [] | The list of hierarchy management sets. |
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: GET https://api.ecobee.com/1/hierarchy/set?format=json&body={"operation":"list","setPath":"/","recursive":true,"includePrivileges":true,"includeThermostats":true}
Sample API Call
Show code sample in:
curl -s -H 'Content-Type: text/json' -H 'Authorization: Bearer ACCESS_TOKEN' 'https://api.ecobee.com/1/hierarchy/set?format=json&body=\{"operation":"list","setPath":"/","recursive":true,"includePrivileges":true,"includeThermostats":true\}'
Example Response:
{ "sets": [ { "setName": "My Sets", "setPath": "/", "children": [ { "setName": "MainNode", "setPath": "/MainNode", "children": [ { "setName": "SubNode1", "setPath": "/MainNode/SubNode1", "children": [ { "setName": "SubNode2", "setPath": "/MainNode/SubNode1/SubNode2", "children": [], "privileges": [], "thermostats": [] } ], "privileges": [ { "setPath": "/MainNode/SubNode1", "setName": "SubNode1", "userName": "api2@ecobee.com", "allowAll": false, "allowNone": false, "allowView": true, "allowProgram": false, "allowVacation": false, "allowSettings": false, "allowDetails": false, "allowReport": false, "allowSecurity": false, "allowHierarchy": false, "allowAlerts": false, "allowManageAccount": false } ], "thermostats": [] } ], "privileges": [], "thermostats": [ "123456789012", "123456789013" ] }, { "setName": "OtherNode", "setPath": "/OtherNode", "children": [], "privileges": [ { "setPath": "/OtherNode", "setName": "OtherNode", "userName": "api2@ecobee.com", "allowAll": false, "allowNone": false, "allowView": false, "allowProgram": false, "allowVacation": false, "allowSettings": false, "allowDetails": false, "allowReport": false, "allowSecurity": false, "allowHierarchy": true, "allowAlerts": false, "allowManageAccount": false } ], "thermostats": [ "123456789014" ] } ], "privileges": [ { "setPath": "/", "setName": "My Sets", "userName": "api@ecobee.com", "allowAll": true, "allowNone": false, "allowView": false, "allowProgram": false, "allowVacation": false, "allowSettings": false, "allowDetails": false, "allowReport": false, "allowSecurity": false, "allowHierarchy": false, "allowAlerts": false, "allowManageAccount": false }, { "setPath": "/", "setName": "My Sets", "userName": "api2@ecobee.com", "allowAll": false, "allowNone": true, "allowView": false, "allowProgram": false, "allowVacation": false, "allowSettings": false, "allowDetails": false, "allowReport": false, "allowSecurity": false, "allowHierarchy": false, "allowAlerts": false, "allowManageAccount": false } ], "thermostats": [] } ], "status": { "code": 0, "message": "" } }