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. ParametersArgument | Description |
---|
id | [string] Can be specified as a device ID, an asterisk, or a regular expression. For a list of all valid parameters, see the {id} Path Parameters table on the Path Parameters page. | tag_param | [string] Can be specified as tag name, as an asterisk, or a regular expression. Possible params: tag.name, tag.value |
Query ParametersFor a full list of possible query parameters, see GET description for /iap/devs at the top of this page. PayloadNew tag value. Success Response204 No Content response code. Example
https://localhost/iap/devs/*/tags/*
https://localhost/iap/devs/7/tags/*
https://localhost/iap/devs/*+health==DOWN/tags/*+tag.name==tag1
PAYLOAD:
new tag value
RESPONSE:
204 No Content
|
POST | /iap/devs |
Creates a new device in the CMS. The device property must be set to false. Throws ValidationException if the received device information does not pass the validation. The Geozone of the new device is calculated using the device’s latitude and longitude. Returns information about the successfully created device. Request BodyContains the information from which the new device will be created. Success ResponseThe successfully created device. Example
https://localhost/iap/devs
REQUEST BODY:
{
"latitude":58.44773,
"longitude":75.9375,
"name":"Test Device",
"category":"EDGE",
"customerId":81,
"status":{},
"uid":"00D07111EA6B",
"discoveryMethod":"manual",
"ownerMAC":"11-11-11-11-11-11",
"scId":"Ab93fcpn",
"protocol":"lon",
"typeId":128
}
RESPONSE:
{
"name": "Test Device",
"category": "EDGE",
"id": "25",
"geozoneId": 88,
"geozoneName": "World",
"customerId": 81,
"latitude": 58.44773,
"longitude": 75.9375,
"capabilities": {
"replacement": {
},
"commissioning": {
"commissionMethod": "MANUAL"
}
},
"status": {
"state": "unprovisioned",
"action": null,
"wasProvisioned": false
},
"scName": "segment",
"scId": "Ab93fcpn",
"scState": "provisioned",
"uid": "00D07111EA6B",
"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": "25"
}
|
/iap/devs/bulk |
Creates new devices of bulk in CMS. Request Bodyinformation about the devices to be created in CMS. Success ResponseList of successfully created devices. Example
https://localhost/iap/devs/bulk
REQUEST BODY:
{
"namePrefix":"TestDevice",
"count":5,
"from":1,
"deviceTemplate":{
"category":"EDGE",
"customerId":81,
"latitude":63.54855,
"longitude":102.65625,
"status":{},
"discoveryMethod":"manual",
"ownerMAC":"11-11-11-11-11-11",
"scId":"Ab93fcpn",
"protocol":"lon",
"typeId":128
}
}
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"
},
{
"name": "TestDevice1",
"category": "EDGE",
"id": "31",
"geozoneId": 88,
"geozoneName": "World",
"customerId": 81,
"latitude": 63.54855,
"longitude": 102.65625,
"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": "31"
},
{
"name": "TestDevice2",
"category": "EDGE",
"id": "32",
"geozoneId": 88,
"geozoneName": "World",
"customerId": 81,
"latitude": 63.54856,
"longitude": 102.65626,
"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": "32"
},
{
"name": "TestDevice3",
"category": "EDGE",
"id": "33",
"geozoneId": 88,
"geozoneName": "World",
"customerId": 81,
"latitude": 63.54857,
"longitude": 102.65627,
"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": "33"
}
]
|
/iap/devs/create |
Creates multiple devices in the CMS. Throws a ValidationException if the received device information has not passed the validation. The geozone of the new devices is calculated by the device's latitude and longitude. Query ParametersField | Description |
---|
prefix | If specified, then all devices will be created with this prefix. | from | Numbering starting number. Ignored if prefix is not specified. 1 by default. |
Success ResponseSuccessfully created devices. Example
https://localhost/iap/devs/create?prefix=device&from=1
REQUEST BODY:
[{
"latitude": 37.38481,
"longitude": -121.9848,
"name": "dev_1",
"category": "EDGE",
"status": {},
"discoveryMethod": "manual",
"uid": "123457",
"ownerMAC": "00-00-00-00-00-00",
"scId": "1",
"segmentPK": 1,
"protocol": "lon",
"typeId": 103
},
{
"latitude": 37.38481,
"longitude": -121.9848,
"name": "dev_2",
"category": "EDGE",
"status": {},
"discoveryMethod": "manual",
"uid": "123459",
"ownerMAC": "00-00-00-00-00-00",
"scId": "1",
"segmentPK": 1,
"protocol": "lon",
"typeId": 103
}]
RESPONSE:
[
{
"name": "dev_1",
"category": "EDGE",
"id": 12,
"geozoneId": 32,
"geozoneName": "World",
"customerId": 31,
"latitude": 37.38481,
"longitude": -121.9848,
"capabilities": {
"replacement": {
},
"commissioning": {
"commissionMethod": "MANUAL"
}
},
"groupName": [
],
"status": {
"state": "unprovisioned",
"action": null,
"wasProvisioned": false
},
"tags": [
],
"scName": "segment",
"segmentPK": 3,
"scId": "1",
"scState": "unprovisioned",
"uid": "123457",
"discoveryMethod": "manual",
"protocol": "lon",
"typeId": 103,
"createdOnGlp": false,
"deviceTypeName": "1U Headend",
"gpsLatitude": null,
"gpsLongitude": null,
"gpsDilution": null,
"gpsEnabled": false,
"installationDate": "2019-10-24",
"ownerMAC": "00-00-00-00-00-00",
"DID": "12"
},
{
"name": "dev_2",
"category": "EDGE",
"id": 13,
"geozoneId": 32,
"geozoneName": "World",
"customerId": 31,
"latitude": 37.38481,
"longitude": -121.9848,
"capabilities": {
"replacement": {
},
"commissioning": {
"commissionMethod": "MANUAL"
}
},
"groupName": [
],
"status": {
"state": "unprovisioned",
"action": null,
"wasProvisioned": false
},
"tags": [
],
"scName": "segment",
"segmentPK": 3,
"scId": "1",
"scState": "unprovisioned",
"uid": "123459",
"discoveryMethod": "manual",
"protocol": "lon",
"typeId": 103,
"createdOnGlp": false,
"deviceTypeName": "1U Headend",
"gpsLatitude": null,
"gpsLongitude": null,
"gpsDilution": null,
"gpsEnabled": false,
"installationDate": "2019-10-24",
"ownerMAC": "00-00-00-00-00-00",
"DID": "13"
}
]
|
/iap/devs/floor/{id} |
Creates a new device on the specified floor. Throws ValidationException if the received device information hasn't pass the validation. ParameterArgument | Description |
---|
id | [string] The ID of the floor on which the device is to be created. See also Floorplans. |
Request BodyInformation used to create the new device. Success ResponseList of successfully created devices.
Example
https://localhost/iap/devs/floor/1641
REQUEST BODY:
{
"latitude":37.3847,
"longitude":-121.98507,
"floorCoordinates":{
"floorId":1641,
"x":100,
"y":427
},
"name":"Floor Test Device Second",
"category":"EDGE",
"customerId":81,
"status":{},
"uid":"1555",
"discoveryMethod":"manual",
"ownerMAC":"11-11-11-11-11-11",
"scId":"Ab93fcpn",
"protocol":"lon",
"typeId":129
}
RESPONSE:
{
"name": "Test Device",
"category": "EDGE",
"id": "25",
"geozoneId": 88,
"geozoneName": "World",
"customerId": 81,
"latitude": 58.44773,
"longitude": 75.9375,
"capabilities": {
"replacement": {
},
"commissioning": {
"commissionMethod": "MANUAL"
}
},
"status": {
"state": "unprovisioned",
"action": null,
"wasProvisioned": false
},
"scName": "segment",
"scId": "Ab93fcpn",
"scState": "provisioned",
"uid": "00D07111EA6B",
"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": "25"
}
|
/iap/devs/import |
Imports devices to the CMS from a CSV file. Request BodyThe CSV file containing the list of devices to be imported. Success ResponseCollection of imported devices Example of CSV Fileprotocol,uid,longitude,latitude,timezone,name,deviceType,category,discoveryMethod,installationDate,customerName,ownerMAC lon,1234567890,102.65628,63.54858,America/Los_Angeles,ImportedDevice4,LH-PM100E_S6k,EDGE,manual,2019-04-15,"Customer 1",11-11-11-11-11-11 lon,0987654321,102.65629,63.54859,America/Los_Angeles,ImportedDevice5,LH-PM100E_S6k,EDGE,manual,2019-04-15,"Customer 1",11-11-11-11-11-11 |
Example
https://localhost/iap/devs/import
REQUEST HEADER:
Content-Type: multipart/form-data
REQUEST BODY:
------WebKitFormBoundaryNvCyJBh56B2oBkBw
Content-Disposition: form-data; name="file"; filename="import_devices.csv"
Content-Type: application/vnd.ms-excel
------WebKitFormBoundaryNvCyJBh56B2oBkBw--
RESPONSE:
[
{
"name": "ImportedDevice4",
"category": "EDGE",
"id": "37",
"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": "1234567890",
"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": "37"
},
{
"name": "ImportedDevice5",
"category": "EDGE",
"id": "38",
"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": "0987654321",
"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": "38"
}
]
|
/iap/devs/{param}/tags |
Apple's provided tags to every device that matches the filters. ArgumentsArgument | Description |
---|
param | Can be specified as tag name, as an asterisk, or a regular expression. For a list of all valid parameters, see the {id} Path Parameters table on the Path Parameters page. |
Success response
204 No Content response code Examplehttps://localhost/iap/devs/*/tags https://localhost/iap/devs/7/tags https://localhost/iap/devs/*+health==DOWN/tags Response: 204 No Content |
|
DELETE | /iap/devs/{id} |
Deletes the specified device from the CMS. Throws AuthorizationException if the user doesn't have a permission to delete the specified device. Throws ValidatorException if device cannot be deleted for some reason. ArgumentsArgument | Description |
---|
id | [string] The ID of the device to delete. |
Success response Status of performed operation. True in case of success and false otherwise. Examplehttps://localhost/iap/devs/32 Response:
{ "value": true } |
|
/iap/devs/{id}/tags/{tag_param} |
Deletes all tags that match provided filters.
ArgumentsArgument | Description |
---|
id | [string] For a list of all valid parameters, see the {id} Path Parameters table on the Path Parameters page. | tag_param | [string] Can be specified as tag name, as an asterisk, or a regular expression. Possible params: tag.name, tag.value |
Success response204 No Content response code. Query ParametersFor a full list of possible query parameters, see GET description for /iap/devs at the top of this table. Examples
https://localhost/iap/devs/*/tags/*
https://localhost/iap/devs/7/tags/*
https://localhost/iap/devs/*+health==DOWN/tags/*+tag.name==tag1
RESPONSE
204 No Content
|