Simulator
The Simulator tab allows users to test and validate the reading and insertion of datapoints in the device's Data List. This functionality is essential in developing your IoT application as it enables you to simulate the behavior of devices before deploying them in the production environment.
Building API Requests
Users can create custom HTTP requests to send simulated data to the Data List. This includes defining the HTTP method (such as GET, POST, etc.), the endpoint URL, request headers, and the message body in JSON format.
API Request data can create a simulation to verify how your IoT application will process and respond to this data. Variables, values, and time series can be included in the request body to mimic real sensor data.
After sending a request, users can view the API response directly in the interface. This includes the HTTP status code (such as 200 OK) and the response body in JSON format, allowing users to verify if the data was processed correctly.
Request Construction
POST Method
Header
-
Endpoint URL: Field to enter the endpoint URL of the API to be queried. -
Authorization: A Bearer Token used for authentication. This token can be the Device Token or Network Token. -
DNID: The Device DNID value. Required only if using Network Token. -
Content-Type: Type of the request content. Alwaysapplication/json.
GET Method
Header
-
Endpoint URL: Field to enter the endpoint URL of the API to be queried. -
Authorization: A Bearer Token used for authentication. This token can be the Device Token or Network Token. -
DNID: The Device DNID value. Required only if using Network Token. -
Content-Type: Type of the request content. Alwaysapplication/json.
Query:
variable: Variable to be searched. If empty, a list with all variables will be returned up to 100 datapoints.limit: Limite de datapoints retornados.start-time: Timestamp (Format RFC3339) or Relative Duration (e.g.-1h). If not provided, the current time it will be used.stop-time: Timestamp (Format RFC3339) or Relative Duration (e.g.-2w).aggregation-function: Select the datapoint within theaggregation-intervalaccording to the selected function. The available functions are:min: Minimummax: Maximumavg: Average
filters:
Referencias
Essas informações foram retiradas da documentação da API. Clique aqui para acessar a documentação da API.