Method | URI and Fields |
GET
| /iap/devs |
Returns all devices that the current user is permitted to read. - It is possible to count only those devices where the name contains the substring specified in the name parameter.
- The result list can be filtered by device category using the category parameter. If passed "GLP_SC" then only segment controllers will be returned. If passed "GLP_device" then only EDGE devices will be returned.
- This method allows pagination, though it is optional.
- The returned collection can be sorted by the field specified in the sortBy parameter.
- Sorting can be performed in reverse order if param sortOrder is set to DESC.
- The result can be filtered by device provision state via the sts query parameter. Available provision states are: PROVISIONED, UNPROVISIONED, PROVISIONING, UNPROVISIONING. DELETED state is available too.
See Query Parameters below for information on filtering and sorting the devices that are returned. Query ParametersParameters | Description |
---|
category | Filter the returning devices by category. | customerId | ID of the customer. | dss | Describes how devices should be selected by the provided groupPK. Possible values: - ASSIGNED (the default) , which means only devices assigned to the group will be returned. In the case of allowed devices that can be assigned to the group, but are not yet assigned, ASSIGNED will be returned.
- ALL which unites previously described filters.
| firmwareVersion | Filter returned collection by firmware version. Only edge devices would be returned if this parameter is set. | florId | If specified then will be returned number of devices that matched passed filters and belongs to the floor with this PK. | gn | If set to true then returned DeviceDTO will contain groupName field for each device. | groupId | ID of the group by which devices should be filtered. Instead of ID string 'NONE' can be passed and in this case only devices which have no group assignment will be returned. | gzId | If specified then will be returned number of devices that matched passed filters and belongs to the geozone with this PK. | hasAlarms | If present then devices will be filtered by the presence of alarms (true - devices with alarms, false - devices without alarms). | includeTags | If set to true then returned DeviceDTO will contain tag field for each device. | isAssignedOnFloor | If set to true and floorPK is specified then all devices assigned to this floorPK will be returned. If set to false then all devices not assigned to the specified floorPK will be returned. | macAddress | Filter returned collection by macAddress. Only segment controllers would be returned if this parameter is set. | model | Filter returned collection by models. Only edge devices would be returned if this parameter is set. | modelNumber | Filters devices by given model number. | name | Filter returned collection of devices by the substring in their name. | pg | Page number. Skipped if null or negative. | satmState | Filter returned collection by given SATM state. | scId | Filters devices by Segment Controller id. | short | If set to true then returned DeviceDTO will contain only device ID and geo position. | sortBy | Sorting field. Can be used only in couple with sortOrder. | sortOrder | Sorting order. Can be either ASC or DESC. If omitted default is ASC. Can be used only in couple of sortBy. | sts | Filter returned collection of devices by their provision state. | sz | Size of a page. Skipped if null or negative. | uid | Filter returned collection of devices by given UID. |
Examples
GET /iap/devs/nc.0/if/*/*/*/*
Returns all properties of all datapoints of all block indices of all blocks within the interface of device with ID "nc.0".
GET /iap/devs/nc.0/if/Switch/*/nvoValue/value
Returns the value property of all nvoValue datapoints in any block index of block "Switch" within the interface of device with ID "nc.0", and so on.
https://localhost/iap/devs
https://localhost/iap/devs?sts=PROVISIONED&short=true
https://localhost/iap/devs?uid=00D07111EAC0
RESPONSE
[
{
"name": "00D07111EAC0",
"category": "EDGE",
"id": "2",
"latitude": 37.33959,
"longitude": -121.99081,
"capabilities": {
"replacement": {
},
"commissioning": {
"commissionMethod": "MANUAL"
}
},
"status": {
"state": "provisioned",
"health": "normal",
"connection": "connected",
"connectionStatusSince": "2019-01-11T15:27:52.994-08:00[America/Los_Angeles]",
"action": null,
"product": "LH-PM100E_6k",
"wasProvisioned": true
},
"scName": "segment",
"scId": "Ab93fcpn",
"scState": "provisioned",
"uid": "00D07111EAC0",
"protocol": "lon",
"typeId": 128,
"createdOnGlp": true,
"deviceTypeName": "LH-PM100E_S6k",
"gpsEnabled": false,
"installationDate": "2019-03-25"
}
]
|
/iap/devs/{id}/count |
Returns count of devices according to specified parameters. - param - For a list of all valid parameters, see the {id} Path Parameters table on the Path Parameters page.
Query ParametersFor a full list of possible query parameters, see GET description for /iap/devs at the top of this page. Examples
https://localhost/iap/devs/*/count
https://localhost/iap/devs/*+health==DOWN/count
RESPONSE:
{
"value": 2
}
|
/iap/devs/count |
Returns the number of devices available for the current user to get. - It is possible to count only those devices which names contain specified in name substring.
- The result list can be filtered by device category using category param. If passed "GLP_SC" then only segment controllers will be returned. If passed "GLP_device" then only EDGE devices will be returned.
- Result can be filtered by device provision state via sts query parameter. Available provision states are: PROVISIONED, UNPROVISIONED, PROVISIONING, UNPROVISIONING. DELETED state is available too, but it is an MQTT term and might make sense to the client.
See Query Parameters at the bottom of this page for information on filtering and sorting the devices that are returned. Query ParametersFor a full list of possible query parameters, see GET description for /iap/devs at the top of this page. Success ResponseNumber of devices Examplehttps://localhost/iap/devs/count Sample Response{ "value": 15 } |
/iap/devs/grp/{id} |
Returns collection of devices that assigned on the specified group. By default only devices' coordinates will be returned. In order to return full device information flag coordinatesOnly need to be set to false. Path Parameter- id - (required) the ID of the group assigned on which devices will be returned
Query Parameters- coordinatesOnly if set to true then only information about devices that will be returned is their coordinates. Default is true.
- pg - page number. Skipped if null or negative
- sz - size of a page. Skipped if null or negative
Success ResponseCollection of devices Example
https://localhost/iap/devs/grp/574
RESPONSE:
[
{
"name": "LHP_sim10",
"category": "EDGE",
"id": "22",
"geozoneId": 88,
"geozoneName": "World",
"customerId": 81,
"latitude": 40.97999,
"longitude": -103.35928,
"capabilities": {
"replacement": {
},
"commissioning": {
"commissionMethod": "MANUAL"
}
},
"status": {
"state": "unprovisioned",
"action": null,
"wasProvisioned": false
},
"scName": "segment",
"scId": "Ab93fcpn",
"scState": "provisioned",
"uid": null,
"discoveryMethod": "manual",
"protocol": "lon",
"typeId": 128,
"createdOnGlp": false,
"deviceTypeName": "LH-PM100E_S6k",
"gpsLatitude": null,
"gpsLongitude": null,
"gpsDilution": null,
"gpsEnabled": false,
"installationDate": "2019-04-04",
"ownerMAC": "11-11-11-11-11-11",
"DID": "22"
},
{
"name": "LHP_sim1",
"category": "EDGE",
"id": "13",
"geozoneId": 88,
"geozoneName": "World",
"customerId": 81,
"latitude": 40.9799,
"longitude": -103.35937,
"capabilities": {
"replacement": {
},
"commissioning": {
"commissionMethod": "MANUAL"
}
},
"status": {
"state": "unprovisioned",
"action": null,
"wasProvisioned": false
},
"scName": "segment",
"scId": "Ab93fcpn",
"scState": "provisioned",
"uid": null,
"discoveryMethod": "manual",
"protocol": "lon",
"typeId": 128,
"createdOnGlp": false,
"deviceTypeName": "LH-PM100E_S6k",
"gpsLatitude": null,
"gpsLongitude": null,
"gpsDilution": null,
"gpsEnabled": false,
"installationDate": "2019-04-04",
"ownerMAC": "11-11-11-11-11-11",
"DID": "13"
}
]
|
/iap/devs/gz/{id} |
Returns all devices assigned to the specified geozone, if the current user has permission to read devices from this geozone. If recursive set to true also returns devices assigned to geozones that are children to the specified geozone. Parameter- id - (required) the ID of the geozone
Query Parameters- recursive - include devices from child geozones.
- pg - page number. Skipped if null or negative
- sz - size of a page. Skipped if null or negative
Success ResponseCollection of devices Example
https://localhost/iap/devs/gz/88
RESPONSE:
[
{
"name": "LHP_sim1",
"category": "EDGE",
"id": "13",
"geozoneId": 88,
"geozoneName": "World",
"customerId": 81,
"latitude": 40.9799,
"longitude": -103.35937,
"capabilities": {
"replacement": {
},
"commissioning": {
"commissionMethod": "MANUAL"
}
},
"status": {
"state": "unprovisioned",
"action": null,
"wasProvisioned": false
},
"scName": "segment",
"scId": "Ab93fcpn",
"scState": "provisioned",
"uid": null,
"discoveryMethod": "manual",
"protocol": "lon",
"typeId": 128,
"createdOnGlp": false,
"deviceTypeName": "LH-PM100E_S6k",
"gpsLatitude": null,
"gpsLongitude": null,
"gpsDilution": null,
"gpsEnabled": false,
"installationDate": "2019-04-04",
"ownerMAC": "11-11-11-11-11-11",
"DID": "13"
},
{
"name": "sc239",
"category": "SC",
"id": "2bzzwZs",
"geozoneId": 88,
"geozoneName": "World",
"customerId": 81,
"latitude": 58.447731,
"longitude": 55.5468788,
"capabilities": {
"replacement": {
}
},
"datapoints": {
"ScRtsmTiming": {
"datapointValueType": "SC_RTSM_TIMING",
"datapointValue": {
"interval": "QUARTER_HOUR",
"multiplier": 1
},
"name": "ScRtsmTiming"
},
"about": {
"datapointValueType": "SC_ABOUT",
"datapointValue": {
"product": "SmartServer IoT",
"model": "SmartServer",
"version": "3.30.057"
},
"name": "about"
},
"location": {
"datapointValueType": "LOCATION",
"datapointValue": {
"desc": "",
"lat": 58.447731,
"lng": 55.5468788,
"elevation": 0
},
"name": "location"
},
"ScScheduleAndClockUpdate": {
"datapointValueType": "SC_SCHEDULE_CLOCK_UPDATE",
"datapointValue": {
"sendsched": null,
"ncup": 6
},
"name": "ScScheduleAndClockUpdate"
},
"ScMessaging": {
"datapointValueType": "SC_MESSAGING",
"datapointValue": {
"retries": 4,
"rtimer": 500
},
"name": "ScMessaging"
}
},
"timezone": "America/Los_Angeles",
"rtsm": "2012-12-01T15:13:45-08:00[America/Los_Angeles]",
"firmwareVersion": "1.30.047",
"status": {
"state": "provisioned",
"health": "down",
"connection": "broken",
"connectionStatusSince": "2019-04-12T00:12:33.47-07:00[America/Los_Angeles]",
"action": null,
"pingTime": "2019-04-04T08:16:06"
},
"MACaddress": "00-0C-E3-74-4F-89",
"SID": "2bzzwZs"
}
]
|
/iap/devs/ids |
Returns all device IDs that current user is permitted to read. - It is possible to count only those devices which names contain specified in name substring.
- The result list can be filtered by device category using category param.
- If passed "GLP_SC" then only segment controllers will be returned.
- If passed "GLP_device" then only EDGE devices will be returned.
- This method allows pagination, though it is optional.
- The returned collection can be sorted by field specified in the sortBy param.
- Sorting can be performed in reverse order if param sortOrder is set to DESC.
- Result can be filtered by device provision state via sts query parameter. Available provision states are: PROVISIONED, UNPROVISIONED, PROVISIONING, UNPROVISIONING. DELETED state is available too.
Query ParametersFor a full list of possible query parameters, see GET description for /iap/devs at the top of this page. Success ResponseCollection of device IDs Example
https://localhost/iap/devs/ids?category=EDGE
RESPONSE:
[
"17",
"18",
"2",
"19",
"20",
"21",
"22",
"7",
"12",
"13",
"14",
"15",
"16"
]
|
/iap/devs/lon/{id} |
Obtains current Onnet/Offnet mode for specific segment controller. Parameter- id - the device handle id of a segment controller
Success ResponseJSON with string value: “Onnet”/”Offnet” Example
https://localhost/iap/devs/lon/Ab93fcpn
RESPONSE:
{
"value": "Onnet"
}
|
PUT | /iap/devs/delete |
Deletes a collection of specified devices. Request BodyContains the collection of device IDs to delete. Success ResponseCollection of Device IDs of the removed devices. Example
https://localhost/iap/devs/delete
REQUEST BODY:
["31","33"]
RESPONSE:
[
"31",
"33"
]
|
/iap/devs/listByIDs |
Returns a collection of devices for the specified IDs, if the current user has permission to read those devices. Throws an AuthorizationException otherwise. Query Parameter- skipDP – (True/False) If set to true, then datapoints will be skipped in the result.
Request BodyContains the collection of device IDs. Success ResponseCollection of devices. Example
https://localhost/iap/devs/listByIDs?skipDP=true
REQUEST BODY:
["34","35"]
RESPONSE:
[
{
"name": "TestDevice4",
"category": "EDGE",
"id": "34",
"geozoneId": 88,
"geozoneName": "World",
"customerId": 81,
"latitude": 63.54858,
"longitude": 102.65628,
"capabilities": {
"replacement": {
},
"commissioning": {
"commissionMethod": "MANUAL"
}
},
"status": {
"state": "unprovisioned",
"action": null,
"wasProvisioned": false
},
"scName": "segment",
"scId": "Ab93fcpn",
"scState": "provisioned",
"uid": null,
"discoveryMethod": "manual",
"protocol": "lon",
"typeId": 128,
"createdOnGlp": false,
"deviceTypeName": "LH-PM100E_S6k",
"gpsLatitude": null,
"gpsLongitude": null,
"gpsDilution": null,
"gpsEnabled": false,
"installationDate": "2019-04-15",
"ownerMAC": "11-11-11-11-11-11",
"DID": "34"
},
{
"name": "TestDevice5",
"category": "EDGE",
"id": "35",
"geozoneId": 88,
"geozoneName": "World",
"customerId": 81,
"latitude": 63.54859,
"longitude": 102.65629,
"capabilities": {
"replacement": {
},
"commissioning": {
"commissionMethod": "MANUAL"
}
},
"status": {
"state": "unprovisioned",
"action": null,
"wasProvisioned": false
},
"scName": "segment",
"scId": "Ab93fcpn",
"scState": "provisioned",
"uid": null,
"discoveryMethod": "manual",
"protocol": "lon",
"typeId": 128,
"createdOnGlp": false,
"deviceTypeName": "LH-PM100E_S6k",
"gpsLatitude": null,
"gpsLongitude": null,
"gpsDilution": null,
"gpsEnabled": false,
"installationDate": "2019-04-15",
"ownerMAC": "11-11-11-11-11-11",
"DID": "35"
}
]
|
/iap/devs/exportByIDs |
Returns a CSV file with the specified devices, if the current user has permission to read those devices. Throws an AuthorizationException otherwise. Request BodyContains the collection of device IDs to export. Success ResponseA CSV file with collection of exported device IDs. Example
https://localhost/iap/devs/delete
REQUEST BODY:
["34","35"]
RESPONSE:
Application Octet Stream
CSV file with specified devices
|
/iap/devs/{id}/unassign/floor |
Removes the floor assignment from the specified device. Throws an AuthorizationException if the current user doesn't have write permission on the specified device. Parameter- id - Specifies the ID of the device.
Request BodyContains the collection of device IDs to export. Success ResponseReturns the status of the performed operation. True in case of success and false otherwise. Example
https://localhost/iap/devs/13/unassign/floor
REQUEST BODY:
{"ID":"13"}
RESPONSE:
{
"value": true
}
|
/iap/devs/{id}/assign/floor/{floorId} |
Assigns the specified device to the specified floor on the specified coordinates. Parameters- id - the id of the device that needs to be assigned to floor
- floorId - the id of floor that the device needs to be assigned to
Request BodyContains the coordinates of the device inside floor. Success ResponseReturns the status of the performed operation. True in case of success and false otherwise. Example
https://localhost/iap/devs/13/assign/floor/1641
REQUEST BODY:
{"x":194.4375,"y":299}
RESPONSE:
{
"value": true
}
|
/iap/devs/loadForAllDevices |
Updates the firmware for all devices that the current user is able to get. NOTE: Currently does not support embedded inner images. This means that the manifest file must contain a URL from which the inner image can be downloaded. This URL and credentials are passed to the edge servers. Request BodyA zip archive containing the valid manifest file. Success ResponseEmpty Example
https://localhost/iap/devs/loadForAllDevices
REQUEST HEADER:
Content-Type: multipart/form-data
REQUEST BODY:
------WebKitFormBoundaryLV4CHbZ9f2pGxCsP
Content-Disposition: form-data; name="metafile"; filename="ControlM_V4_29_type02_with_image.glpo"
Content-Type: application/octet-stream
------WebKitFormBoundaryLV4CHbZ9f2pGxCsP--
RESPONSE:
Empty
|
/iap/devs/{id}/changeScTo/{scId} |
Changes the edge server of the specified device to another specified edge server. If the device is in a group, information about this group will be transferred to the new edge server.
Returns information about edge device on which this operations was performed. Parameters- id - Device ID of the edge device changing edge servers.
- scId - SID of the new edge server.
Success ResponseInformation about the edge device on which this operations was performed. Example
https://localhost/iap/devs/13/changeScTo/2bzzwZs
RESPONSE:
{
"name": "LHP_sim1",
"category": "EDGE",
"id": "13",
"geozoneId": 88,
"geozoneName": "World",
"customerId": 81,
"latitude": 40.9799,
"longitude": -103.35937,
"capabilities": {
"replacement": {
},
"commissioning": {
"commissionMethod": "MANUAL"
}
},
"status": {
"state": "unprovisioned",
"action": null,
"wasProvisioned": false
},
"scName": "sc239",
"scId": "2bzzwZs",
"scState": "provisioned",
"uid": null,
"discoveryMethod": "manual",
"protocol": "lon",
"typeId": 128,
"createdOnGlp": false,
"deviceTypeName": "LH-PM100E_S6k",
"gpsLatitude": null,
"gpsLongitude": null,
"gpsDilution": null,
"gpsEnabled": false,
"installationDate": "2019-04-04",
"ownerMAC": "00-0C-E3-74-4F-89",
"DID": "13"
}
|
/iap/devs/updateProperties |
Updates the specified device's properties. Throws an AuthorizationException if the current user does not have WRITE permission on this device. Request BodyContains the information with which the device is updated. Success ResponseInformation about the updated device. Example
https://localhost/iap/devs/updateProperties
REQUEST BODY:
{
"id":"13",
"name":"LHP_sim1",
"latitude":5.61599,
"longitude":24.60938,
"category":"EDGE",
"scId":"2bzzwZs",
"capabilities":{
"replacement":{},
"commissioning":{
"commissionMethod":"MANUAL"
}
},
"protocol":"lon",
"scState":"provisioned",
"scName":"sc239",
"uid":"3334ffdd3212",
"typeId":128,
"gpsLatitude":null,
"gpsLongitude":null,
"gpsDilution":null,
"installationDate":"2019-04-04",
"geozoneId":88,
"customerId":81,
"gpsEnabled":false,
"geozoneName":"World",
"ownerMAC":"00-0C-E3-74-4F-89",
"discoveryMethod":"manual",
"DID":"13",
"createdOnGlp":false
}
RESPONSE:
{
"name": "LHP_sim1",
"category": "EDGE",
"id": "13",
"geozoneId": 88,
"geozoneName": "World",
"customerId": 81,
"latitude": 5.61599,
"longitude": 24.60938,
"capabilities": {
"replacement": {
},
"commissioning": {
"commissionMethod": "MANUAL"
}
},
"status": {
"state": "unprovisioned",
"action": null,
"wasProvisioned": false
},
"scName": "sc239",
"scId": "2bzzwZs",
"scState": "provisioned",
"uid": "3334ffdd3212",
"discoveryMethod": "manual",
"protocol": "lon",
"typeId": 128,
"createdOnGlp": false,
"deviceTypeName": "LH-PM100E_S6k",
"gpsLatitude": null,
"gpsLongitude": null,
"gpsDilution": null,
"gpsEnabled": false,
"installationDate": "2019-04-04",
"ownerMAC": "00-0C-E3-74-4F-89",
"DID": "13"
}
|
/iap/devs/dpTypeNames |
Returns datapoint types and names for datapoints that have set monitoring/logging settings (dla rules). Applied only to datapoints with scalar types. Request BodyContains the collection of Device IDs. Query Parameterextended – Specifies whether full datapoint name should be returned. Default value is false. Success ResponseCollection of datapoint types and names. Example
https://localhost/iap/devs/dpTypeNames?extended=false
REQUEST BODY:
["2"]
RESPONSE:
[
{
"typeId": "SNVT_elec_kwh_l",
"name": "nvoEPpos"
},
{
"typeId": "SNVT_count",
"name": "nviPassword"
}
]
|
/iap/devs/lon/onnet |
Sets the specified edge servers to the Onnet mode. If the received list of device IDs is empty then the operation will be performed on all edge servers the user has access to. Request BodyList of edge servers to set mode to on. Success ResponseEmpty. Example
https://localhost/iap/devs/lon/onnet
REQUEST BODY:
["Ab93fcpn"]
RESPONSE:
Empty
|
/iap/devs/lon/offnet |
Sets the specified edge server to the Offnet mode. If the received list of DIDs is empty then the operation will be performed on all edge servers the user has access to. Request BodyList of edge servers to set mode to off. Success ResponseEmpty. Example
https://localhost/iap/devs/lon/offnet
REQUEST BODY:
["Ab93fcpn"]
RESPONSE:
Empty
|
/iap/devs/{id}/tags/{tag_param} |
Updates all tags that match the provided filters with the provided value. Parameters |