Device APIs
The Anedya platform offers two primary APIs for IoT device connectivity: HTTP and MQTT . Both APIs provide distinct advantages for different use cases.
HTTP APIs are well-suited for scenarios where simplicity and power efficiency are paramount. For instance, in applications where data submission is the primary objective and subsequent device actions involve low-power states, HTTP APIs are ideal. This is because HTTP APIs do not necessitate a persistent TCP or WS connection with Anedya endpoints, reducing device power consumption.
On the other hand, MQTT APIs excel in situations that demand real-time data exchange and responsiveness. MQTT's persistent connection enables devices to subscribe to critical alerts from the platform and trigger immediate actions. It might be possible to achieve some degree of power saving depending on type of hardware. It is important to note that certain functionalities are exclusive to specific API types.
The choice between HTTP and MQTT APIs depends on the specific requirements of the IoT application. For simple data submission tasks, HTTP APIs offer ease of use and power efficiency. For real-time data exchange and responsiveness, MQTT APIs provide the necessary connectivity.
Data Format
To ensure seamless data processing, Anedya platform requires data submission in a specific format. Currently, JSON format is supported, and additional formats will be available soon. For detailed schema requirements, please consult the respective API documentation.
Time Specifications
All device APIs utilize Unix timestamps in UTC for time representation. Specifying a timestamp value of 0 in any API will result in Anedya automatically replacing it with the current time in UTC.
Currently, the Anedya Platform supports a time resolution of up to 1 second.
Don't have NTP stack available in your device? You can use simple HTTP POST request based Time synchronization API provided by Anedya! Refer device operations API Section for more detail.
Anedya Time Service (ATS)
Anedya offers a complimentary NTP time service to all users. This service ensures that your IoT device's clock remains synchronized with the Anedya platform, ensuring accurate timekeeping and seamless data exchange.
To utilize this service, simply configure your IoT device to use time.anedya.io
as its NTP time source.
It is recommended that you use Anedya Time Service(ATS) as a prefered source of time. This can eliminate rare issues which arises due to out of sync time between devices and cloud platform.
Region
Currently Anedya Platform is available only in Asia Pacific/India region. More regions will be added as we expand our network. You can use following region codes in the API.
Region | Region code |
---|---|
Asia-Pacific/India | ap-in-1 |