Method | URI and Fields |
GET
| /iap/grp |
Returns all groups that current user is permitted to read. This method allows pagination, sorting and filtering by name, though this is optional. Query Parametersname – filters groups by the specified name scId – filters groups by segment controller’s id scName – filters groups by segment controller’s name pg – page number sz – page size sortOrder – sort order sortBy – field by which sorting will be performed
Success ResponseCollection of groups. Examplehttps://localhost/iap/grp Response[ { "id": 574, "name": "TestGroup", "geozoneId": 88, "devices": [ "13" ], "datapoints": { "light-hlsb/0": { "datapointValueType": "HLSB", "name": "light-hlsb/0" }, "motionControl": { "datapointValueType": "GROUP_MOTION_CONTROL", "name": "motionControl" } }, "qualifiers": [ ] } ] |
|
/iap/grp/{id} |
Returns a group with the specified ID. Returns nothing if the current user doesn't have permission to read this group. ParameterSuccess ResponseGroup with the specified ID. Examplehttps://localhost/iap/grp/574 Response{ "id": 574, "name": "TestGroup", "geozoneId": 88, "devices": [ "13" ], "datapoints": { "light-hlsb/0": { "datapointValueType": "HLSB", "name": "light-hlsb/0" }, "motionControl": { "datapointValueType": "GROUP_MOTION_CONTROL", "name": "motionControl" } }, "qualifiers": [ ] } |
|
/iap/grp/gz/{id} |
Returns a collection of groups related to the specified geozone. If flag recursive is set to true also returns all groups related to child geozones for the specified geozone. This method allows pagination, though it is optional. ParameterQuery ParametersSuccess ResponseCollection of groups. Examplehttps://localhost/iap/grp/gz/88 Response[ { "id": 574, "name": "TestGroup", "geozoneId": 88, "devices": [ "13" ], "datapoints": { "light-hlsb/0": { "datapointValueType": "HLSB", "name": "light-hlsb/0" }, "motionControl": { "datapointValueType": "GROUP_MOTION_CONTROL", "name": "motionControl" } }, "qualifiers": [ ] } ] |
|
/iap/grp/count |
Returns number of groups that matches passed filters. Query ParametersgeozonePK – count groups that belongs only to the specified geozone name – count only those groups which contains the specified substring in their names scId – filters groups by segment controller’s id scName – filters groups by segment controller’s name
Success ResponseNumber of groups for the specified filters. Examplehttps://localhost/iap/grp/count Response{ "value": 2 } |
|
PUT
| /iap/grp |
Update an already existed group with the specified properties. Query ParameterSuccess ResponseUpdated group. Examplehttps://localhost/iap/grp Request Body{ "id":2002, "name":"Updated group", "geozoneId":88, "devices":[], "datapoints":{ "light-hlsb/0":{ "datapointValueType":"HLSB", "name":"light-hlsb/0" }, "motionControl":{ "datapointValueType":"GROUP_MOTION_CONTROL", "name":"motionControl" } }, "qualifiers": [] } Response{ "id": 2002, "name": "Updated group", "geozoneId": 88, "devices": [ ], "datapoints": { "light-hlsb/0": { "datapointValueType": "HLSB", "name": "light-hlsb/0" }, "motionControl": { "datapointValueType": "GROUP_MOTION_CONTROL", "name": "motionControl" } }, "qualifiers": [ ] } |
|
/iap/grp/delete |
Deletes groups include or exclude the specific IDs. ParameterQuery ParameterSuccess ResponseCollection with IDs of deleted groups. Examplehttps://localhost/iap/grp/delete https://localhost/iap/grp/delete?exclude=true Request Body
[2003,2004,2005] Response[ 2003, 2004, 2005 ] |
|
/iap/grp/{groupId}/addDevs |
Adds given devices to the group specified. ParameterSuccess ResponseResponse code 200 in case of success or some error code otherwise. Examplehttps://localhost/iap/grp/574/addDevs Request Body["14","15","17"] ResponseResponse code 200 |
|
/iap/grp/{groupId}/assign/dev |
Assigns the specified collection of devices to the specified group. Device can be assigned only to one group at a time, so in order to perform this operation make sure that device is not assigned to some other group. Throws ValidationException if and of devices already assigned to some other group. ParameterSuccess ResponseResponse code 200 in case of success or some error code otherwise. Examplehttps://localhost/iap/grp/574/assign/dev Request Body["14","15","17"] ResponseResponse code 200 |
|
/iap/grp/{groupId}/assign/devs |
Adds specified devices to the specified group. ParameterSuccess ResponseResponse code 200 in case of success or some error code otherwise. Examplehttps://localhost/iap/grp/468/assign/devs Request Body{ "processAllCurrentDevices":false, "devicesDIDs": [ "3","4","5" ], "devicesDIDsToExclude":[] } ResponseResponse code 200 |
|
/iap/grp/{groupId}/assign/dp |
Adds specified datapoints to the specified group. ParameterSuccess ResponseResponse code 200 in case of success or some error code otherwise. Examplehttps://localhost/iap/grp/468/assign/dp Request Body{ "devLevel":"*", "blockNameLevel":"*", "blockIndexLevel":"*", "dpNameLevel":"*", "valueLevel":"*", "processAllCurrentDatapoints":false, "datapointQualifiers": [ "2/device/0/nviDO1", "2/device/0/nviDO2", "2/device/0/nviDO3" ], "datapointQualifiersToExclude":[] }
ResponseResponse code 200 |
|
/iap/grp/{groupId}/rmDevs |
Removes specified devices from the specified group. ParameterSuccess ResponseResponse code 200 in case of success or some error code otherwise. Examplehttps://localhost/iap/grp/574/rmDevs Request Body["13","14","15","17"] ResponseResponse code 200 |
|
/iap/grp/{groupId}/unassign/devs |
Parameter |
/iap/grp/{groupId}/unassign/dp |
Removes specified datapoints from the specified group. ParameterSuccess ResponseResponse code 200 in case of success or some error code otherwise. Examplehttps://localhost/iap/grp/468/unassign/dp Request Body{ "datapointQualifiers": [ "2/device/0/nviDO3" ] } ResponseResponse code 200 |
|
/iap/grp/getApplicable |
Returns set of applicable groups for given devices. So all devices can be assigned on any of returned groups. Query ParameterSuccess ResponseCollections of suitable groups. Examplehttps://localhost/iap/grp/getApplicable Request Body["13","14","15","17"] Response[ { "id": 574, "name": "TestGroup", "geozoneId": 88, "schedules": [ 6, 4 ], "devices": [ ], "datapoints": { "light-hlsb/0": { "datapointValueType": "HLSB", "name": "light-hlsb/0" }, "motionControl": { "datapointValueType": "GROUP_MOTION_CONTROL", "name": "motionControl" } } } ] |
|
/iap/grp/doImport/{importId} |
Takes data from temporary cache by unique ID and moves devices to groups. ParameterSuccess ResponseResponse code 200 in case of success or some error code otherwise. Examplehttps://localhost/iap/grp/doImport/bb904c35-5d0d-4eb6-bf32-ac14736fcd4f?isProcess=true Response Response code 200 |
|
POST
| /iap/grp |
Creates new group in the CMS from the specified properties. Query ParameterSuccess ResponseCreated group. Examplehttps://localhost/iap/grp Request Body{ "name":"New group", "geozoneId":70 } Response{ "id": 468, "name": "New group", "geozoneId": 70, "devices": [ ], "datapoints": { "light-hlsb/0": { "datapointValueType": "HLSB", "name": "light-hlsb/0" }, "motionControl": { "datapointValueType": "GROUP_MOTION_CONTROL", "name": "motionControl" } }, "qualifiers": [ ]} |
|