group

Retrieve status of a group, group tree and optionally the assigned controllers.

Description

https://api.eze.io/v1/group/{mode}/["systems"]

The API key used will determine the starting group.

Parameters

mode The mode of the request. See below.
“systems” If given, the command will return all the ezeio controllers in each group.

Possible modes are:

one : The root group of the API key.
tree : The whole tree of groups, starting with the root group of the API key.
flat : Like tree but as a flat array.
{groupno} : If a group id number is given, return data on this group only.

Example usage

Fetch data for the API key's group, and the controllers therein:

https://api.eze.io/v1/group/one/systems

Fetch data for a specific group (id=56):

https://api.eze.io/v1/group/56

Fetch data for all groups and all controllers:

https://api.eze.io/v1/group/tree/systems

Additional options for more detail (may be combined):

“fields” Return all field names and values for each controller
“alarms” Return most recent alarm state for each controller
“services” Return service settings for each controller

Example:

https://api.eze.io/v1/group/one/systems,fields,alarms

To return data for select fields, use the tag parameter:

https://api.eze.io/v1/group/one/systems/tag=TEMP

This will return field status only for those fields that have the assettag “TEMP”

Return value

JSON formatted data

(below examples have whitespaces added for readability)

This shows data from a call requesting hierarchical data including controllers:

{
  "reqtime":"2019-06-16T21:27:12Z",
  "groups":[
    {
      "id":"2",
      "name":"ACME Inc",
      "description":"ACME IoT System",
      "is_account":"1",
      "systems":[
        {
          "ezeid":"XYZ001",
          "name":"West monitor",
          "note":null
        },
        {
          "ezeid":"XYZ002",
          "name":"East monitor",
          "note":"No special note"
        }
      ],
      "children":[
        {
          "id":"55",
          "name":"Client A",
          "description":"",
          "is_account":"0",
          "systems":[
            {
              "ezeid":"XYZ101",
              "name":"Client A demo unit",
              "note":null
            }
          ]
        },
        {
          "id":"56",
          "name":"Client C",
          "description":"",
          "is_account":"0",
          "systems":[
            {
              "ezeid":"XYZ103",
              "name":"Home office",
              "note":null
            }
          ]
        }
      ]
    }
  ],
  "status":"OK",
  "exec_time":0.029423952102661133
}