REST API for CCMMMA data access

License/Key

LGPL/no

Author

Montella R., F. Nisci, M. Zammartino

Description

This API is designed with the aim of making available for web, desktop and mobile applications the University of Napoli Parthenope Weather Center open data.

How to cite this API:

Budillon B., Buonocore B., Fusco G., Giunta G., Montella R.,Fabio Nisci, Pierini P., Riccio A., Spezie G., Zambianchi E.; Regional Centre for Ocean and Atmosphere Monitoring and Modeling. University of Napoli Parthenope, http://meteo.uniparthenope.it, 2013

Base URI

https://api.uniparthenope.it/meteo/


1. Latest update

Description:

Model last update date - author: Fabio Nisci

URI

https://api.uniparthenope.it/meteo/latest/<model>

URI Parameters

HTTP Method

GET

Resource Formats

application/json

Authentication

Not Required

Responses

200:Ok
404:Wrong model


2. Register new user

Description:

Insert new admin user into database. This user have privileges to edit, generate or update a place info - author: Fabio Nisci

URI

https://api.uniparthenope.it/meteo/generate/insert

URI Parameters

username: username to insert
password: user password

HTTP Method

POST

Resource Formats

application/json

Authentication

Required

Responses

200:Authorized
206:Already authorized
401:Not authorized


3. Update or generate places database

Description:

Update and refresh places in database - author: Fabio Nisci

URI

https://api.uniparthenope.it/meteo/generate

URI Parameters

alsofill: before update locations verify if there are new places
limit:limit places to process

HTTP Method

POST

Resource Formats

application/json

Authentication

Not required

Responses

200 OK OK
404-Not found-Not found


4. Get place by its name

Description:

It returns place information you are looking for. - author: Fabio Nisci

URI

https://api.uniparthenope.it/meteo/byplacename/<placename>

URI Parameters

- <placename>: Place common name to find, aka Napoli, Rome or Paris - space separated by '+' sign

HTTP Method

GET

Resource Formats

application/json

Authentication

Not required

Responses

200 OK OK
404-Not found-Not found


5. Nearest places

Description:

It returns nearest places your location, in radius. - author: Fabio Nisci

URI

https://api.uniparthenope.it/meteo/bycoords/<latitude>/<longitude>

URI Parameters

<latitude> current location latitude
<longitude> current location longitude
radius radius in KM
limit: limit results set

HTTP Method

GET

Resource Formats

application/json

Authentication

Not required

Responses

200 OK OK
404-Not found-Not found


6. Get place by its ID

Description:

It returns place information you are looking for. - author: Fabio Nisci

URI

https://api.uniparthenope.it/meteo/byid/<identifier>

URI Parameters

n/a

HTTP Method

GET

Resource Formats

application/json

Authentication

Not required

Responses

200 OK OK
404-Not found-Not found


7. Get All Models

Description:

Return all type of available models.

URI

https://api.uniparthenope.it/meteo/models/getmodels

URI Parameters

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200 OK OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request
401-Not found-Not found


8. Get info place by region

Description:

Given a Region return weather info of current time. Model and Output default params are: 144h low resolution weather (wrf3), general view (gen)

URI

https://api.uniparthenope.it/meteo/<region>/modeloutput

URI Parameters

<region>-Region ID

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


9. Get info place by region, model, output and custom time

Description:

Given a Region, Model, output type and custom time return weather info.You can obtain all models by Get Models API. You can obtain all output type by Get Output type from models API. If output is 'xml', the api return mean value of current time.

URI

https://api.uniparthenope.it/meteo/<region>/<model>/<output>/<year>/<month>/<day>/<hour>/modeloutput

URI Parameters

<region>-Region ID
<model>-Model ID
<output>-Output ID
<year>-Year = YYYY
<month>-Month = MM
<day>-Day = DD
<hour>-Hour = HH [00-23]

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


10. Get info place by region, model and output

Description:

Given a Region, Model and output type return weather info of current time.You can obtain all models by Get Models API. You can obtain all output type by Get Output type from models API. If output is 'xml', the api return mean value of current time.

URI

https://api.uniparthenope.it/meteo/<region>/<model>/<output>/modeloutput

URI Parameters

<region>-Region ID
<model>-Model ID
<output>-Output ID

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


11. Get info place by region and model

Description:

Given a Region and Model return weather info of current time. Output default params is: general view (gen). You can obtain all models by Get Models API.

URI

https://api.uniparthenope.it/meteo/<region>/<model>/modeloutput

URI Parameters

<region>-Region ID
<model>-Model ID

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


12. Get Output type from models

Description:

Given a model return all type of available outputs.

URI

https://api.uniparthenope.it/meteo/<model>/getoutputs

URI Parameters

<model>-Model ID

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


13. Get Time series

Description:

Return time series from Gaeta to Maratea (ca000), start to current time.

URI

https://api.uniparthenope.it/meteo/timeseries

URI Parameters

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


14. Get Time series by region

Description:

Given a Region return time series, start to current time.

URI

https://api.uniparthenope.it/meteo/<region>/timeseries

URI Parameters

<region>-Region ID

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


15. Get Time Series by region, model

Description:

Given a Region return time series, start to current time.

URI

https://api.uniparthenope.it/meteo/<region>/<model>/timeseries

URI Parameters

<region>-Region ID

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


16. Get Time Series by region, model and output

Description:

Given a Region return time series, start to current time.

URI

https://api.uniparthenope.it/meteo/<region>/<model>/<output>/timeseries

URI Parameters

<region>-Region ID
<model>-Model ID
<output>-Output ID

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


17. Get map image url by place

Description:

Given a Place return weather image map url of current time. Model and Output default params are: 144h low resolution weather (wrf3), general view (gen)

URI

https://api.uniparthenope.it/meteo/<place>/modelmapurl

URI Parameters

<region>-Region ID

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


18. Get map image url by place, model, output and custom time

Description:

Given a Place, Model, output type and custom time return weather info.You can obtain all models by Get Models API. You can obtain all output type by Get Output type from models API.

URI

https://api.uniparthenope.it/meteo/<place>/<model>/<output>/<year>/<month>/<day>/<hour>/modelmapurl

URI Parameters

<region>-Region ID
<model>-Model ID
<output>-Output ID
<year>-Year = YYYY
<month>-Month = MM
<day>-Day = DD
<hour>-Hour = HH [00-23]

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


19. Get map image url by place, model and output

Description:

Given a Place, Model and output type return weather info of current time.You can obtain all models by Get Models API. You can obtain all output type by Get Output type from models API.

URI

https://api.uniparthenope.it/meteo/<place>/<model>/<output>/modelmapurl

URI Parameters

<region>-Region ID
<model>-Model ID
<output>-Output ID

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


20. Get map image url by place and model

Description:

Given a Region and Model return weather info of current time. Output default params is: general view (gen). You can obtain all models by Get Models API.

URI

https://api.uniparthenope.it/meteo/<place>/<model>/modelmapurl

URI Parameters

<region>-Region ID
<model>-Model ID

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


21. Get chart image url

Description:

Return chart from Gaeta to Maratea (ca000), start to current time.

URI

https://api.uniparthenope.it/meteo/modelcharturl

URI Parameters

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


22. Get chart image url by place

Description:

Given a place return the chart time series url, start to current time.

URI

https://api.uniparthenope.it/meteo/<place>/modelcharturl

URI Parameters

<region>-Region ID

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


23. Get chart image url by place, model

Description:

Given a place return chart time series url, start to current time.

URI

https://api.uniparthenope.it/meteo/<place>/<model>/modelcharturl

URI Parameters

<region>-Region ID

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


24. Get chart image url by place, model

Description:

Given a place return chart time series url, start to current time.

URI

https://api.uniparthenope.it/meteo/<place>/<model>/<output>/modelcharturl

URI Parameters

<region>-Region ID

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


25. Get chart image url by full specification

Description:

Given a place return chart time series url, start to current time.

URI

https://api.uniparthenope.it/meteo/<place>/<model>/<output>/<hours>/<step>/modelcharturl

URI Parameters

<place>-Region ID
<model>-Model ID
<output>-Output ID
<hours> Number of hours

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


26. Get data

Description:

Given latitude, longitude, prod or url .

URI

https://api.uniparthenope.it/meteo/data/<latitude>/<longitude>

URI Parameters

<place>-Region ID
<model>-Model ID
<output>-Output ID
<hours> Number of hours

HTTP Method

GET

Resource Formats

application/json

Authentication

Responses

200-OK-OK
201-Created-No content
231-custom-Info not avaiable
400-Bad Request-Bad Request


27. Get place by its name

Description:

It returns place information you are looking for.

URI

https://api.uniparthenope.it/meteo/places/search/byname/<name>

URI Parameters

- <name>: Place common name to find, aka Napoli, Rome or Paris - space separated by '+' sign

HTTP Method

GET

Resource Formats

application/json

Authentication

Not required

Responses

200 OK OK
404-Not found-Not found


28. Nearest places

Description:

It returns nearest places your location, in radius.

URI

https://api.uniparthenope.it/meteo/places/search/bycoords/<latitude>/<longitude>

URI Parameters

<latitude> current location latitude
<longitude> current location longitude
radius radius in KM
limit: limit results set

HTTP Method

GET

Resource Formats

application/json

Authentication

Not required

Responses

200 OK OK
404-Not found-Not found


29. Get place by its ID

Description:

It returns place information you are looking for.

URI

https://api.uniparthenope.it/meteo/places/get/byid/<identifier>

URI Parameters

n/a

HTTP Method

GET

Resource Formats

application/json

Authentication

Not required

Responses

200 OK OK
404-Not found-Not found