Overview of REST API Tools
1. Introduction
In addition to using the Management Console, scripting and command-line tools can be useful when developing and managing IoT systems. Scripts can automate many tasks, resulting in an efficient workflow.
The RIoT Secure REST API can be used to develop a variety of custom tools for an IoT system.
1.1. Scripting
For experienced developers and system managers, command-line tools has certain advatages:
- Tasks that require multiple steps in a graphical user-interface can be performed with a single invocation of a command-line script.
- Scripts can be tailored to a specific task
- Scripts can perform batch operations; for example, a script can update the application firmware on hundereds of devices in one go.
- Command-line tools can be invoked form other tools, and thus be intregrated into an automated workflow.
1.2. Application Examples
Here are some examples of applications for custom tools:
- Monitoring device status
- Analysis of device data
- System diagnosis tools
- Over-the-air batch firmware update of devices
- Developer tools
- Testing utilities
1.2. Application Platforms
Custom tools can be deployed on a variety of application platforms:
- Web-based applications featuring a Web UI
- Mobile applications - native or web app
- Desktop applications - native or native web app
- Command-line tools invoked from a terminal window
- Command-line tools invoked from other programs
2. User Interfaces
The common user interface for scripts is a terminal window. For experienced developers, this can be the preferred way of working.
In addition, graphical user interfaces can be created that makes running scripts more acceccible to users. Graphical UIs can also visualize system processes in a richer way compared to text-based tools.
Web-based UIs and tools can be created by calling the REST API from JavaScript in a web-browser (the API supports cross-origin requests), or on the server side. The PHP command-line scripts available for download can easily be adapted to run on a web server.
3. Customer Cloud Applications
The RIoT Secure Platform supports communication between edge devices and a customer server application - the Customer Cloud.
The Customer Cloud is the end point for custom data sent from edge devices. This component is fully developed and managed by the customer.
Device data sent to the Customer Cloud is typically stored in a database. This data can then be accessed and used by a variaty of applications.
It is fully possible (and recommended) to use both the REST API and the Customer Cloud to access data and mqnage devices.
By using the capabilities of both the REST API and the Customer Cloud, very powerful IoT applications can be designed.