wiki:DownscalingPortal/RESTfulAPI/Climate4Impact

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

--

Climate4Impact

The Downscaling Portal RESTful API is token based authentication. That means, the user has to include a token in every request.

Access the API

Climate4Impact has an existing account into the Downscaling Portal. With the credentials provided is very simple to authenticate and get the token

User Administration

The API allows the manager to create users who have the same experiments as him and this users will be attached to the manager. Thus, users can be added, listed and removed from the DPRA Climate4Impact service.

In order to clarify how to use the API quickly, we are going to follow an example step by step.

1. Create a new user

curl -i -H "Accept: application/json" -H "Content-type: application/json" -H "token: your_token" -X POST -d "{\"username\": \"pcmdi9.llnl.gov.openid.vegasm\", \"email\": \"vegasm@unican.es\", \"openID\": \"https://pcmdi9.llnl.gov/openid/vegasm\"}" http://meteo.unican.es/dp/rest/users

Response

{{{HTTP/1.1 201 Created Date: Mon, 24 Mar 2014 09:08:17 GMT Content-Length: 0 Content-Type: text/plain}}}