How to Collect IoT (Business) information from Devices

Requirements

  • A Valid API Key:Provisioned and provided by your platform administrator for South API.

  • A Valid device Identifier:Provisioned and provided by your platform administrator for South API or by your self if you have enough permission on your organisation (See how to provision devices).

For the examples We will use the next device identifier

my_device

It is recommended to use a serial number or other unique hardware identifier in the device

Method

POST

API Endpoint

/south/v80/devices/{device.id}/collect/iot

Business IoT information can be can be collected form devices by sending a POST request to the above defined URI, including a correctly formatted JSON document in the POST body.

The minimum fields you must complete are showed in the next example.

JSON example for DMM information collection
Unresolved directive in opengate-api-quick-reference-howto-collect-iot.adoc - include::json/iotExamples/opengate-south-iot-health-bloodPressure-example.json[]

Using curl to perform the request:

curl --request POST \
     --header "X-ApiKey: YOUR_API_KEY_HERE" \
     --header "Content-type: application/json" \
     --data-binary @opengate-south-iot-health-bloodPressure-example.json \
     --verbose \
     http://[your_opengate_address]/south/v80/devices/my_device/collect/iot

In the response we should see a status code of 201 (created). Let’s look the response.

HTTP/1.1 201 Created