wiki:DownscalingPortal/RESTfulAPI

Version 3 (modified by vegasm, 8 years ago) (diff)

--

The Downscaling Portal RESTful API

Nowadays, RESTful services become more popular due to the implementation simplicity and the easy way to get information quickly. In our case, The Downscaling Portal has an useful but difficult user interface which does not allow people of different ranges of knowledge to interact in the whole downscaling process. For this reason, we have launched the Downscaling Portal RESTul API (DPRA) which is available here http://meteo.unican.es/dp/rest This API can be accessed by people registered in the Downscaling Portal and has two types of use:

  • Portals which have users interested in the downscaling process and have services to manage its users (add, list, remove). The portal has an user manager who controls everything.
  • End-users registered into the Downscaling Portal which are interested in downscale without using the UI (User Interface).

The authentication through the RESTful API is token based. As we explains in the main page (http://meteo.unican.es/dp/rest) and the first steps are very simple:

  1. If you don’t have an account, create one here: http://meteo.unican.es/dp/registration.html
  2. Now you can forget the UI. Just login to the RESTful API through curl or your preferred tool. Note: This manual explains how to call the services with curl.
  3. curl -i -X POST -d username=your_username -d password=your_password http://meteo.unican.es/dp/rest/authenticate
  4. Done! You will receive your token valid for 2 days in the headers.