How to Retrieve Collected IoT (Business) Information

Requirements

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

You can query for: * Knowing datastream list * Retrieving information (datapoints) associated to one o more data streams

Searching for Datastreams

Method

POST

API Endpoint

/north/v80/search/datastreams

Stored data streams can be retrieved from platform by sending a POST request to the above defined URI, including a correctly formatted JSON document in the POST body to refine the search.

JSON example for Datastreams information searching
Unresolved directive in opengate-api-quick-reference-howto-search-iot.adoc - include::json/iotExamples/opengate-north-iot-datastreams-filter-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-north-iot-datastreams-filter-example.json \
     --verbose \
     http://[your_opengate_address]/north/v80/search/datastreams

In the response we should see a status code of 201. Let’s look the response in JSON format.

Output JSON file
Unresolved directive in opengate-api-quick-reference-howto-search-iot.adoc - include::json/iotExamples/opengate-north-iot-datastreams-response-example.json[]

Searching for Datapoints

Method

POST

API Endpoint

/north/v80/search/datapoints

Stored IoT information can be can be retrieved from platform by sending a POST request to the above defined URI, including a correctly formatted JSON document in the POST body to refine the search.

JSON example for IoT information searching
Unresolved directive in opengate-api-quick-reference-howto-search-iot.adoc - include::json/iotExamples/opengate-north-iot-health-bloodPressure-filter-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-north-iot-health-bloodPressure-filter-example.json \
     --verbose \
     http://[your_opengate_address]/north/v80/search/datapoints

In the response we should see a status code of 201. Let’s look the response in JSON format.

Output JSON file
Unresolved directive in opengate-api-quick-reference-howto-search-iot.adoc - include::json/iotExamples/opengate-north-iot-health-bloodPressure-response-example.json[]