Telegram chatbot Contact



















API REST Micra MAX

Especifications

31 de October del 2024


Introduction

API Purpose
The purpose of this API is to provide a REST application programming interface (API) to facilitate communication and data exchange between different systems. This API has been developed with the objective of allowing developers to access and manipulate certain resources and specific functionalities of our system or application in an efficient and secure manner.

Using this API, developers will be able to integrate and use our functionalities in their own applications, thus taking advantage of the capacity and data of our system in a flexible and personalized way. Additionally, by following REST design principles, our API adheres to widely accepted standards, making it easy to adopt and deploy across diverse environments and platforms.

By providing a REST API, our goal is to encourage the creation of applications and services that can effectively interact with our system. This opens new opportunities for collaboration, innovation and the creation of solutions that improve the user experience and provide greater added value through the integration of our functionalities.

Throughout this documentation, you will find detailed information about available endpoints, request parameters, response formats, required authentication, and recommended best practices to use our API effectively. We hope this documentation is a useful guide so developers can take full advantage of the capabilities of our API and build powerful and innovative applications.


Goals and Use Cases

Provide developers with a standardized interface to access and use data generated by probes and sensors connected to IONA Sensors.

Facilitate the integration of IONA into existing applications and systems, allowing the exchange of information in real time.

Improve visualization efficiency in capturing, analyzing and displaying data collected by IONA.

Drive innovation by enabling developers to create custom solutions based on information provided by IONA.


Use cases

Process Monitoring and Control: The API allows developers to obtain real-time data from the probes and sensors connected to IONA, which facilitates the monitoring and control of industrial processes, such as temperature, humidity, CO2, among other critical parameters. .

Integration into Asset Management Platforms: Data from IONA can be used in asset management platforms, allowing users to monitor and manage equipment and systems in real time. For example, the API can be used to receive automatic alerts in case a sensor connected to IONA indicates a problem or a value outside the established limits.

Data Analysis and Report Generation: The API makes it easy to extract data stored in IONA, allowing developers to perform advanced analysis and generate custom reports. For example, sensor data can be used to identify patterns, trends and anomalies, which can be useful in predictive equipment maintenance or process optimization.

These are just a few examples of the goals and use cases that the IONA Connection API can address. By providing an easy-to-use and flexible interface, our API allows developers to take full advantage of the data generated by IONA, opening up a world of possibilities for creating customized solutions and improving efficiency across various sectors and applications.


Communication

Communication with the IONA API is done through JSON (JavaScript Object Notation) objects.

Both requests sent and responses received must be in JSON + UTF-8 format to ensure compatibility and ease of data processing.


Application Methods

The main commands used in the IONA API are:

GET Used to obtain specific information or data from the probes and sensors connected to Micra MAX.


Quick Start Guide

Examples with cURL:

curl -X GET "192.168.1.208/v1/example"

Header Response: 200

json response: [{"id": 1,"status":"Hello World"}]


Error Codes or Response

200: Success

201: Success Creation.

400: Invalid request

401: Unauthorized

404: Resource not found


API REST Endpoints


/ws.php

Receive last value/s from the display (GET)

curl -X GET "IP/ws.php?lastvalue


//Response                  
[{"temp":"24.8","hume":"53.3","date":"2024-10-31 10:54:00"}]         

curl -X GET "IP/ws.php?lastvalue=3


//Response                  
[{"temp":"24.8","hume":"53.4","date":"2024-10-31 10:55:00"},{"temp":"24.8","hume":"53.3","date":"2024-10-31 10:54:00"},{"temp":"24.8","hume":"53.7","date":"2024-10-31 10:53:00"}]

HTTP Endpoints


/ws.php

Receive data from the display by navigator (HTTP)

url: http://ip/ws.php?history&from=2024-10-30&to=2024-10-31


//Response                  
[{"temp":"23.8","hume":"60.7","date":"2024-10-30 00:00:00"},{"temp":"23.8","hume":"60.7","date":"2024-10-30 00:01:00"},{"temp":"23.8","hume":"60.7","date":"2024-10-30 00:02:00"},{"temp":"23.7","hume":"60.7","date":"2024-10-30 00:03:00"},{"temp":"23.8","hume":"60.7","date":"2024-10-30 00:04:00"},{"temp":"23.8","hume":"60.7","date":"2024-10-30 00:05:00"},{"temp":"23.8","hume":"60.7","date":"2024-10-30 00:06:00"},{"temp":"23.8","hume":"60.7","date":"2024-10-30 00:07:00"},{"temp":"23.8","hume":"60.7","date":"2024-10-30 00:08:00"},{"temp":"23.7","hume":"60.7","date":"2024-10-30 00:09:00"},{"temp":"23.8","hume":"60.7","date":"2024-10-30 00:10:00"},{"temp":"23.8","hume":"60.7","date":"2024-10-30 00:11:00"},{"temp":"23.7","hume":"60.7","date":"2024-10-30 00:12:00"},{"temp":"23.8","hume":"60.7","date":"2024-10-30 00:13:00"},{"temp":"23.8","hume":"60.7","date":"2024-10-30 00:14:00"},{"temp":"23.8","hume":"60.6","date":"2024-10-30 00:15:00"},{"temp":"23.7","hume":"60.6","date":"2024-10-30 00:16:00"},{"temp":"23.8","hume":"60.7","date":"2024-10-30 00:17:00"},{"temp":"23.8","hume":"60.6","date":"2024-10-30 00:18:00"},{"temp":"23.7","hume":"60.6","date":"2024-10-30 00:19:00"},{"temp":"23.7","hume":"60.6","date":"2024-10-30 00:20:00"},{"temp":"23.8","hume":"60.6","date":"2024-10-30 00:21:00"},{"temp":"23.8","hume":"60.6","date":"2024-10-30 00:22:00"},{"temp":"23.8","hume":"60.6","date":"2024-10-30 00:23:00"},{"temp":"23.7","hume":"60.6","date":"2024-10-30 00:24:00"},{"temp":"23.8","hume":"60.6","date":"2024-10-30 00:25:00"},{"temp":"23.8","hume":"60.6","date":"2024-10-30 00:26:00"},{"temp":"23.8","hume":"60.6","date":"2024-10-30 00:27:00"},{"temp":"23.8","hume":"60.6","date":"2024-10-30 00:28:00"},{"temp":"23.8","hume":"60.6","date":"2024-10-30 00:29:00"},{"temp":"23.8","hume":"60.6","date":"2024-10-30 00:30:00"},{"temp":"23.8","hume":"60.6","date":"2024-10-30 00:31:00"},{"temp":"23.7","hume":"60.6","date":"2024-10-30 00:32:00"},{"temp":"23.7","hume":"60.6","date":"2024-10-30 00:33:00"},{"temp":"23.7","hume":"60.5","date":"2024-10-30 00:34:00"},{"temp":"23.7","hume":"60.6","date":"2024-10-30 00:35:00"},{"temp":"23.8","hume":"60.6","date":"2024-10-30 00:36:00"},{"temp":"23.8","hume":"60.5","date":"2024-10-30 00:37:00"},{"temp":"23.7","hume":"60.6","date":"2024-10-30 00:38:00"},{"temp":"23.8","hume":"60.5","date":"2024-10-30 00:39:00"},{"temp":"23.8","hume":"60.5","date":"2024-10-30 00:40:00"},{"temp":"23.7","hume":"60.5","date":"2024-10-30 00:41:00"},{"temp":"23.7","hume":"60.5","date":"2024-10-30 00:42:00"},{"temp":"23.7","hume":"60.5","date":"2024-10-30 00:43:00"},{"temp":"23.8","hume":"60.5","date":"2024-10-30 00:44:00"},{"temp":"23.8","hume":"60.5","date":"2024-10-30 00:45:00"},{"temp":"23.8","hume":"60.5","date":"2024-10-30 00:46:00"},{"temp":"23.8","hume":"60.5","date":"2024-10-30 00:47:00"},{"temp":"23.7","hume":"60.5","date":"2024-10-30 00:48:00"},{"temp":"23.7","hume":"60.5","date":"2024-10-30 00:49:00"},{"temp":"23.7","hume":"60.5","date":"2024-10-30 00:50:00"},{"temp":"23.8","hume":"60.5","date":"2024-10-30 00:51:00"},{"temp":"23.8","hume":"60.5","date":"2024-10-30 00:52:00"},{"temp":"23.8","hume":"60.5","date":"2024-10-30 00:53:00"},{"temp":"23.7","hume":"60.5","date":"2024-10-30 00:54:00"},{"temp":"23.8","hume":"60.5","date":"2024-10-30 00:55:00"},{"temp":"23.8","hume":"60.4","date":"2024-10-30 00:56:00"},{"temp":"23.7","hume":"60.5","date":"2024-10-30 00:57:00"},{"temp":"23.8","hume":"60.5","date":"2024-10-30 00:58:00"},{"temp":"23.7","hume":"60.4","date":"2024-10-30 00:59:00"},{"temp":"23.7","hume":"60.5","date":"2024-10-30 01:00:00"},{"temp":"23.8","hume":"60.5","date":"2024-10-30 01:01:00"},{"temp":"23.8","hume":"60.4","date":"2024-10-30 01:02:00"},{"temp":"23.8","hume":"60.4","date":"2024-10-30 01:03:00"},{"temp":"23.7","hume":"60.4","date":"2024-10-30 01:04:00"},{"temp":"23.7","hume":"60.4","date":"2024-10-30 01:05:00"},{"temp":"23.7","hume":"60.4","date":"2024-10-30 01:06:00"},{"temp":"23.7","hume":"60.4","date":"2024-10-30 01:07:00"},{"temp":"23.8","hume":"60.4","date":"2024-10-30 01:08:00"},{"temp":"23.7","hume":"60.4","date":"2024-10-30 01:09:00"}]         

url: http://ip/ws.php?csv&from=2024-10-30&to=2024-10-31


//Response                  
a file to be download in csv format