GET Requests
The file shows the GET endpoints that everyone should have access to. Every request can be made with the URL and any application such as Postman that can make a request to the API.
Currently, all CO2 (carbon dioxide) and NO (nitric oxide) measurements are null values.
Get Average Valid Processed Measurements Time Period#
Returns a list of json data about every qHAWAX without an end date, which means that the qHAWAX is still positioned and sending data.
URL: /api/average_valid_processed_period/?qhawax_id=1&initial_timestamp=02-02-2021 09:00:00&final_timestamp=02-02-2021 10:00:00
Method: GET
URL Parameters:
Required:
- qhawax_id = [string]
- initial_timestamp = [datetime]
- final_timestamp = [datetime]
Success Response:
Code: 200
Content:
Error Response:
Code: 400
OR
Code: 400
Get Gas Measurements Every 24 hours#
Returns a list of json data about the hourly average measurement of the target gas from the last 24 hours of the target qHAWAX.
URL: /api/gas_average_measurement/?qhawax=qH001&gas=SO2
Method: GET
URL Parameters:
Required:
- qhawax = [string]
- gas = [string]
Success Response:
Code: 200
Content:
Error Response:
Code: 400
OR
Code: 400
OR
Code: 400
Get Drone Flight During Period of Time#
Returns a list of json data about all the finished flights. Each json contains the name of the drone, the flight details, the latitude and longitude of the arrival.
URL: /api/get_drone_flights_period_time/?initial_timestamp=02-02-2021 08:00:00&final_timestamp=02-02-2021 15:30:00
Method: GET
URL Parameters:
Required:
- initial_timestamp = [datetime]
- final_timestamp = [datetime]
Success Response:
Code: 200
Content:
Error Response:
Code: 400
Get Telemetry Data From Andean Drone#
Returns a list of json data containing technical information about the flight the target drone during the initial and final timestamps.
URL: /api/telemetry_andean_drone/?qhawax_name=qH006&initial_timestamp=02-02-2021 14:30:00&final_timestamp=02-02-2021 14:31:00
Method: GET
URL Parameters:
Required:
- qhawax_name = [string]
- initial_timestamp = [datetime]
- final_timestamp = [datetime]
Success Response:
Code: 200
Content:
Error Response:
Code: 400
OR
Code: 400
Get Eca Noise Limit By ID#
Returns a list of values containing the ID, area name, the maximum limits during the day and night, respectively.
URL: /api/get_eca_noise_limit/?ID=4
Method: GET
URL Parameters:
Required:
- ID = [integer]
Success Response:
Code: 200
Content:
Error Response:
Code: 400
OR
Code: 400
Get All Areas#
Returns a list of json data containing all the Eca Noise IDs and their correspondent area names available in the “EcaNoise” table.
URL: /api/get_all_areas/
Method: GET
URL Parameters: None
Success Response:
Code: 200
Content:
Error Response:
Code: 400
OR
Code: 400
Get Last Inca Data#
Returns a list of json data containing values from the “GasInca” table. The table contains data regarding the gas sensors, their correspondent qHAWAX and the timestamp which is based on the last hour since the request happened.
URL: /api/last_gas_inca_data/
Method: GET
URL Parameters: None
Success Response:
Code: 200
Content:
Error Response:
Code: 400
OR
Code: 400
Get Processed Data#
Returns a list of json data containing values from the “ProcessedMeasurement” table from the last “interval_minutes” minutes. The json contains data regarding the gas measurements in ppb and ug/m3, PM1, PM10, PM25, meteorological data such as solar radiation, air temperature and humidity, from the target qHAWAX. It also contains latitude, longitude and the correspondent timestamp that indicates the time the measurement happened.
URL: /api/processed_measurements/?name=qH006&interval_minutes=1
Method: GET
URL Parameters:
Required:
- name = [string]
- interval_minutes = [datetime]
Success Response:
Code: 200
Content:
Error Response:
Code: 400
OR
Code: 400
Get Processed Data From Andean Drone#
Returns a list of json data containing values from the “ProcessedMeasurement” table from the last “interval_minutes” minutes. The json contains data regarding the gas measurements in ppb and ug/m3, PM1, PM10, PM25, meteorological data such as solar radiation, air temperature and humidity, from the target Andean Drone. It also contains latitude, longitude and the correspondent timestamps that indicate the time the measurement happened. These timestamp values depend on the initial and final timestamp parameters.
URL: /api/processed_measurements_andean_drone/?qhawax_name=1&initial_timestamp=03-02-2021 16:30:00&final_timestamp=03-02-2021 16:31:00
Method: GET
URL Parameters:
Required:
- qhawax_name = [string]
- initial_timestamp = [datetime]
- final_timestamp = [datetime]
Success Response:
Code: 200
Content:
Error Response:
Code: 400
OR
Code: 400
Get qHAWAX In Map#
Returns a list of json data containing information about every qHAWAX without an end date, which means that the qHAWAX is currently positioned and sending data.
URL: /api/AllQhawaxInMap/
Method: GET
URL Parameters: None
Success Response:
Code: 200
Content:
Error Response:
Code: 400
OR
Code: 400
Get Drones In Map#
Returns a list of json data containing information about every Andean Drone without an end date, which means that the drone is currently flying and sending data.
URL: /api/average_valid_processed_period/?qhawax_id=1&initial_timestamp=02-02-2021 09:00:00&final_timestamp=02-02-2021 10:00:00
Method: GET
URL Parameters:
Required:
- qhawax_id = [string]
- initial_timestamp = [datetime]
- final_timestamp = [datetime]
Success Response:
Code: 200
Content:
Error Response:
Code: 400
OR
Code: 400
Get Installation Date#
Returns the date on which the target qHAWAX was installed as String.
URL: /api/GetInstallationDate/?qhawax_id=4
Method: GET
URL Parameters:
Required:
- qhawax_id = [string]
Success Response:
Code: 200
Content:
Error Response:
Code: 400
OR
Code: 400
Get All Qhawax#
Returns a list of json data containing information about every qHAWAX.
URL: /api/average_valid_processed_period/?qhawax_id=1&initial_timestamp=02-02-2021 09:00:00&final_timestamp=02-02-2021 10:00:00
Method: GET
URL Parameters: None
Success Response:
Code: 200
Content:
Error Response:
Code: 400
OR
Code: 400
Get Active qHAWAX Mode Customer#
Returns a list of json data of all the currently active qHAWAXs, which they all should have state equal to “ON” and mode equal to “Customer”.
URL: /api/get_qhawaxs_active_mode_customer/
Method: GET
URL Parameters: None
Success Response:
Code: 200
Content:
Error Response:
Code: 400
OR
Code: 400
Get Time All Active qHAWAX#
Returns json data containing the last time the target qHAWAX was ON and the last time it was registered.
URL: /api/get_time_all_active_qhawax/?name=qH006
Method: GET
URL Parameters:
Required:
- name = [string]
Success Response:
Code: 200
Content:
Error Response:
Code: 400
OR
Code: 400
Verify If qHAWAX Exists#
Returns True if the target qHAWAX exists in the “Qhawax” table.
URL: /api/qhawax_exist/?name=qH004
Method: GET
URL Parameters:
Required:
- name = [string]
Success Response:
Code: 200
Content:
Error Response:
Code: 400
otro
Get qHAWAX Status#
Returns the current status of the target qHAWAX as String.
URL: /api/qhawax_status/?name=qH004
Method: GET
URL Parameters:
Required:
- name = [string]
Success Response:
Code: 200
Content:
Error Response:
Code: 400