SITELINK REST API
The REST API allows requests to be sent to the Sitelink Cloud server to access Modbus points as well as device configuration, status and statistics. This allows data points to be directly accessed in web pages, mobile apps and backend data acquisition solutions.
API requests are constructed using a REST style interface in which the request is written as a URL and the request is made using https. The format of a Modbus request is as follows:
A number of additional classes are defined that allow access to configuration and status information for the device. Additional options can be added to this request to control a number of features including the format of the response, and to supply security credentials if they are required.
The type of response can be specified to be returned in JSON, XML or plain TEXT format:
Modbus Example
Below is a live demonstration of sending a request to the API. Select a Modbus register, Data Format and Response type and click 'Make Request' to submit the request to the Cloud Server. The response will be returned in the requested format. Clicking on the Request link will cause the browser to send a direct request and display the result.
Register | |
Format | |
Response | |
|
|
Request | |
Response |
|
Device Information Example
Below is a live demonstration of requesting device information from the API. Select the class of data to be requested and click 'Make Request' to submit the request to the Cloud Server. The response will be returned in the requested format. With this type of request the TEXT format is not available. Clicking on the Request link will cause the browser to send a direct request and display the result.
Class | |
Format | |
|
|
Request | |
Response |
|