19. 9. 2016

JT is making significant progress with the prototype. We are using apiary.io for definition of rest APIs of the device will use. Apiary is allowing us to test these APIs without actually having the device.

Basic principles we follow are these:

API of LED dimmer (next known as device) is based on REST API. API operations use 3 methods:

* GET method for reading values from device

* PUT method for sending values to device

* POST method for executing action in device which does not require input data (e.g. synchronize time from NTP server or save configuration)


Device is considered as a master of values. Therefore all values that can be changed are also exposed via operation for reading.

When sending data to device, it is allowed to send only part of logical block of data (e.g. send only few hours from day when scheduling a day, or set only hour from date time without minutes, seconds, …). In case of sending only partial data, other data which belong to the same logical block are intact (e.g. when only hour during date time setting is sent, only hour will be changed). Data are sent in request body as JSON.


Successfully processed requests are confirmed with http status code 200. Http status code 400 (Bad Request) is used when request cannot be processed (e.g. because invalid input data, incorrect URL parameters). Reponses contain application/json body. This is true for responses to data reading requests and also for responses (both positive with status code 200 and negative with status code 500) to data sending requests.

Share This Post

Subscribe to our newsletter

Get Updates and new information about INTAQO

More To Explore