Get Switch Groups

Groups used for lighting control are called switch groups. This API returns all switch groups on a floor in the building. The response includes the Switch Group ID and Switch name for each switch group. The Switch name is used as the primary identifier in other API calls.

Request

GET https://{em_ip_address_or_hostname}/ems/api/org/switchgroups/list/{facility}/{fid}

Parameters

Request 
em_ip_address or hostname The Enlighted Manage (EM) IP address or hostname.
facility The facility type can be either a floor or a company.  
fid Company or Floor ID. By default, the Company ID is always ‘1’. For Floor ID, use the Floor ID returned in the Get All Floors API or in EM, select Facility > Floor > in the left panel, and click the Settings tab to obtain the Floor ID.
Response 
id Switch Group identifier in EM
name** Switch name (**used as the primary identifier in other API calls)

Sample Code

Using the Floor ID returned in the Get All Floors API, request for the list of all switch groups on the floor. The Switch Group ID and Switch name for all switch groups on Floor 1 is returned. For example, if Floor 1 has two switch groups, the Switch Group ID and Switch name are returned as shown below. The Switch name is used as the primary identifier in other API calls.

Get https://192.80.3.2/ems/api/org/switchgroups/list/floor/1

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json
Content-Length: 7582
Date: Sat, 21 Jul 2015 17:06:51 GMT
 
{
  "gemsGroups": {
    "gemsGroup": [
      {
        "id": "19", **switch group identifier**
"name": "SwitchGrp1" **switch name**

      },
      {
        "id": "29", **switch group identifier**
"name": "SwitchGrp2" **switch name**
          }
    ]
  }
}
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Article is closed for comments.