Start Observation

It is possible to monitor a particular resource for a value or range of values. This is very common for measuring the collected data and fault management use cases.

When a resource on a Device needs to be monitored, IMPACT IoT sends a JSON object for the Adapter to start monitoring the resource. The content is sent as POST /devices from IMPACT IoT to the Adapter.

The value OBSERVE is sent with the resource to be monitored with an array of end point client names.

The following table provides details on this API.

Table 1. Start observation API format
Parameters Description
URL http://<adapter_hostname>:<port>/devices
Method POST
Content-Type application/json

The parameters are:

  • resource - Specifies the Device resource.
  • string - Specifies the resource value, which is OBSERVE for this API.
  • endPointClientNames - Specifies the Device Id.
  • minReportingPeriod - Specifies the minimum time interval between consecutive notifications.
  • id - Specifies the Policy identity.
  • version - Specifies the version.
Sample Call
				"string":"OBSERVE", "resource":"device/0/battery",

Response Body:

"msg": "Success","code":1000
Success Code
Response Code: 200
Error Code
400 : Bad Request
401 : Unauthorized 
403 : Forbidden 
404 : Not Found