Changes between Version 5 and Version 6 of DownscalingPortal/RESTfulAPI/Climate4Impact


Ignore:
Timestamp:
Jan 31, 2017 3:45:16 PM (5 years ago)
Author:
vegasm
Comment:

DP REST ENDPOINTS

Legend:

Unmodified
Added
Removed
Modified
  • DownscalingPortal/RESTfulAPI/Climate4Impact

    v5 v6  
    7676}}}
    7777
    78 == Predictands ==
    79 
    80 In order to test if everything is OK, check if you can get your predictands
    81 
    82 {{{
    83 curl -i -H "token: your_token" http://meteo.unican.es/dp/rest/predictands
    84 }}}
    85 
    86 Success
    87 {{{
    88 HTTP/1.1 200 OK
    89 Server: Apache-Coyote/1.1
    90 Content-Type: application/json;charset=UTF-8
    91 Transfer-Encoding: chunked
    92 Date: Mon, 24 Mar 2014 14:48:05 GMT
    93 
    94 {"responseCode":"success","message":"List of predictands","values":["NorthAtlantic1_TX","WestPrecipCanary","TnNorthCarolina","TxMaxTempUSA","PrecipGSN","TxUSAPacific","Namibia"]}
    95 }}}
     78
     79
     80== Variables ==
     81{{{
     82curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/variables
     83}}}
     84
     85== Variables by VariableType ==
     86{{{
     87curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/variables?variableType=TEMPERATURE
     88}}}
     89
     90== Zones ==
     91{{{
     92curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/zones
     93}}}
     94
     95== Zone ==
     96{{{
     97curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/zones/{zoneId}
     98}}}
     99Example: ZONE_ID=2637
     100
     101== Predictor ==
     102{{{
     103curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/zones/{zoneId}/predictor
     104}}}
     105
     106== User Predictands ==
     107
     108{{{
     109curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/predictands
     110}}}
     111
     112== Zone Predictands ==
     113
     114{{{
     115https://meteo.unican.es/dp/rest/zones/{ZONE_ID}/predictands
     116}}}
     117
     118== Filtered predictands ==
     119{{{
     120curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/predictands?dataset={DATASET_NAME}&variable={VARIABLE_NAME}&domain={DOMAIN_NAME}
     121}}}
     122
     123Optional parameter for clients: username. (Get predictands from the given user)
     124
     125VARIABLE_NAME examples: TN TX, RR...
     126
     127== Domains ==
     128{{{
     129curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/domains
     130}}}
     131
     132== Datasets ==
     133{{{
     134curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/datasets
     135}}}
     136
     137== Stations ==
     138{{{
     139curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/zones/{ZONE_ID}/predictands/{PREDICTAND_NAME}/stations
     140}}}
     141
     142== Models ==
     143{{{
     144curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/models?zone={ZONE_ID}
     145}}}
     146
     147== Models filtering ==
     148{{{
     149curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/models?zone={ZONE_ID}&project={PROJECT_NAME}&experiment={EXPERIMENT_NAME}&ensemble={ENSEMBLE_NAME}
     150}}}
     151
     152{{{
     153Example: https://meteo.unican.es/dp/rest/models?zone=2637&project=CMIP5&experiment=historical&ensemble=r1i1p1
     154}}}
     155
     156== Model scenarios ==
     157{{{
     158curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/models/{MODEL_NAME}/scenarios
     159}}}
     160
     161{{{
     162Example: https://meteo.unican.es/dp/rest/models/CANESM2/scenarios
     163}}}
     164
     165== Jobs ==
     166{{{
     167curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/jobs
     168}}}
     169
     170== Downscalings ==
     171{{{
     172curl -i -H "token: your_token" http://meteo.unican.es/dp/rest/downscalings?zone={ZONE_ID}&predictand={PREDICTAND_NAME}x&downscalingMethod=Analogues%20(default)&downscalingType={DOWNSCALING_TYPE_NAME}&model={MODEL_NAME}&project={PROJECT_NAME}&experiment={EXPERIMENT_NAME}&ensemble={ENSEMBLE_NAME}
     173}}}
     174
     175{{{
     176Example: http://meteo.unican.es/dp/rest/downscalings?zone=2637&predictand=VALUE_Iberia_ECA_Tmax&downscalingMethod=Analogues%20(default)&downscalingType=CLIMATE_CHANGE&model=GFDL-ESM2M&project=CMIP5&experiment=historical&ensemble=r1i1p1
     177}}}
     178
     179== Downscaling methods ==
     180{{{
     181curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/zones/{ZONE_ID}/predictands/{PREDICTAND_NAME}/downscalingMethods
     182}}}
     183
     184== Delete job ==
     185{{{
     186curl -X DELETE-i -H "token: your_token" localhost:8080/dp/rest/jobs/{JOB_ID}
     187}}}
     188WARNING: you can only delete non owner jobs if you are the client. For this purpose use "username" parameter.
     189
     190== Downscaling download CSV ==
     191{{{
     192curl -i -H "token: your_token" http://meteo.unican.es/dp/rest/downscalings/download4?jobId=33221&zone=2637&predictand=VALUE_Iberia_ECA_Tmax&downscalingMethod=Analogues%20(default)&model=GFDL-ESM2M&experiment=historical_r1i1p1&sYear=1951&eYear=1961&username=ceda.ac.uk.openid.Vega.Manuel&type=CLIMATE_CHANGE
     193}}}
     194
     195{{{
     196Example: http://meteo.unican.es/dp/rest/downscalings/download4?jobId=33221&zone=2637&predictand=VALUE_Iberia_ECA_Tmax&downscalingMethod=Analogues%20(default)&model=GFDL-ESM2M&experiment=historical_r1i1p1&sYear=1951&eYear=1961&username=ceda.ac.uk.openid.Vega.Manuel&type=CLIMATE_CHANGE
     197}}}
     198== Downscaling download NetCDF4 ==
     199{{{
     200curl -i -H "token: your_token" http://meteo.unican.es/dp/rest/downscalings/download4?jobId={JOB_ID}&zone={ZONE_ID}&predictand={PREDICTAND_NAME}&downscalingMethod={DOWNSCALING_METHOD_NAME}&model={MODEL_NAME}&experiment={EXPERIMENT_NAME}&sYear={START_YEAR}&eYear={END_YEAR}&type={TYPE_name}
     201}}}
     202
     203Optional: "username" parameter for clients.
     204{{{
     205Example: http://meteo.unican.es/dp/rest/downscalings/download4?jobId=33221&zone=2637&predictand=VALUE_Iberia_ECA_Tmax&downscalingMethod=Analogues%20(default)&model=GFDL-ESM2M&experiment=historical_r1i1p1&sYear=1951&eYear=1961&username=ceda.ac.uk.openid.Vega.Manuel&type=CLIMATE_CHANGE
     206}}}
     207
     208== JOB LOG ==
     209{{{
     210curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/jobs/{JOB_ID}/log
     211}}}
     212WARNING: only for downscaling jobs from DP 2.1 update. "username" parameter available for clients.
     213
     214== DP ESGF-Search experimental end-point ==
     215{{{
     216curl -i -H "token: your_token" https://meteo.unican.es/dp/rest/ESGF/gcm
     217}}}
     218
     219== Launch downscaling ==
     220{{{
     221curl -i -H "token: your_token" --data="zone={ZONE_ID}&predictand={PREDICTAND_NAME}&downscalingMethod={DOWNSCALING_METHOD}&model={MODEL_NAME}&experiment={EXPERIMENT_NAME}&sYear={START_YEAR}&eYear={END_YEAR}" https://meteo.unican.es/dp/rest/downscale
     222}}}
     223WARNING: "username" parameter available for clients.