The curl command below will create a new Topic that will aggregate the IoT data of the supplied topicURI. Below is the data portion of the response.

curl -X POST -d '{ "topicURI": "http://api.thingspeak.com/channels/12397/fields/4.json" }' 'http://api.datagator.tech/users/123456789/topics?access_token=TOKEN'

The "errorWait" and "errorRetryMax" are just default values and the "brokerCreate" date will be calculated on the backend. The "id" is used to uniquely reference the Topic on DataGator. 

{
"topicURI": "http://api.thingspeak.com/channels/12397/fields/4.json",
"errorWait": 20,
"errorRetryMax": 3,
"brokerCreate": "1970-01-01T00:00:00.000Z",
"id": "587f7c45aa784d4a3743667d",
"created": "2017-01-18T14:31:33.520Z",
"modified": "2017-01-18T14:31:33.520Z"
}

Verify Topic Configuration

A get request to can be used to verify the values that the Topic was configured with on the backend.

curl 'http://api.datagator.tech/Topics/587f7c45aa784d4a3743667d?access_token=TOKEN'

Below is the data portion of the response.

{
"topicURI": "http://api.thingspeak.com/channels/12397/fields/4.json",
"topicName": "WeatherStation",
"topicDescription": "MathWorks Weather Station, West Garage, Natick, MA 01760, USA",
"topicUnit": "Temperature (F)",
"latitude": "42.299676",
"longitude": "-71.350525",
"elevation": "60",
"errorWait": 20,
"errorRetryMax": 3,
"brokerCreate": "2014-05-20T21:50:32.000Z",
"id": "587f7c45aa784d4a3743667d",
"created": "2017-01-18T02:55:41.091Z",
"modified": "2017-01-18T02:55:47.000Z"
}

All the optional values for the Topic were filled by the backend. To really leave a value empty just supply an empty string "" for it when creating the Topic.

Notes

The URLs that were shown for the DataGator service are not yet being made publicly available and are subject to change. They were just used to provide a clearer explanation of about how interaction with the service would look like.

I plan to create integrations to more IoT data brokers in the future also to allow direct bulk uploading of data. Also planned is to have a bridge to CoAP and implement a direct uploading of IoT data.