geobeyond / Arpav-PPCV-backend

Backend di Piattaforma Proiezioni Climatiche per il Nord-Est.
Creative Commons Attribution 4.0 International
0 stars 1 forks source link

Update integration with observations API in order to account for changing endpoints #47

Closed ricardogsilva closed 4 months ago

ricardogsilva commented 4 months ago

Variables

The endpoint for listing available variables has changed. Additionally it now also includes a variable's unit of measurement:

GET /REST/v1/clima_indicatori/tipo_indicatore

Stations

It is still possible to get stations for a specific variable. This now includes also the unit of measurement:

GET /REST/v1/clima_indicatori/staz_attive?indicatore=PRCPTOT

There is now an endpoint that returns all stations:

GET /REST/v1/clima_indicatori/staz_attive_lunghe_total

There is also an endpoint for retrieving details about a single station:

GET /REST/v1/clima_indicatori/staz_singola?indicatore=PRCPTOT&statcd=111

It is even possible to get stations for a specific variable and temporal aggregation frequency. The URL is different and the pdati parameter has been removed:

GET /REST/v1/clima_indicatori/staz_attive_lunghe?indicatore=PRCPTOT&tabella=M&periodo=2

Measurements

The endpoint that returns measurements for a single station now also includes the measurement unit:

GET /REST/v1/clima_indicatori?statcd=111&indicatore=PRCPTOT&tabella=M&periodo=2

There is now an endpoint that returns all measurements for multiple stations. It is filterable by variable and temporal aggregation frequency. Additionally, this returns measurement values and their corresponding unit:

GET REST/v1/clima_indicatori/valori_staz_attive?indicatore=PRCPTOT&tabella=M&periodo=2