POST vpz/report¶
Resource URL¶
http://erecord.toulouse.inra.fr:8000/vpz/report
Description¶
Maybe modifies the input conditions of a simulator (see input information of a vpz) (depending on the request parameters). In addition with this input conditions modification (optional), maybe modifies the input datas folder of the simulator according to a posted file (optional). Then runs the simulation, then produces and returns the required reports, from the simulation results (see output information of a vpz) and also the input conditions (see input information of a vpz).
Details¶
- jwt
- If the simulator is in limited access then authentication is required, by a ‘jwt’ parameter containing an available JWT value.
input information
It is possible to modify some of the vpz input information (see ‘pars’, ‘begin’…) and in that case the vpz taken into consideration is the vpz updated by the modifications.
- input datas folder
- The file (optional) posted to modify the input datas folder is a zip file given by the user into the POST request (HTTP multipart request) as ‘datafolder’ parameter. The way how this zip file content is taken into account depends on the ‘datafoldercopy’ parameter value.
filtering
It is possible to ask for filtering some of the returned information (see ‘parselect’, ‘outselect’).
reports
The built reports are gathered and returned into a ‘.zip’ file.
Help¶
See an example as help on how to know the simulators that can be chosen with the ‘vpz’ option.
Before a POST vpz/report command, it may be useful to do a GET vpz/input command with ‘compact’ or ‘compactlist’ style (see mode for style) in order to make easier some modifications (see pars or cname.pname, parselect, outselect). See also help to know how some information is identified/selected in the request.
Request parameters¶
Required : either vpz or vpzpath must be provided.
Required : jwt in limited access case.
Example¶
cURL command lines : curl -H "Content-Type: application/json" -d '{"vpz":266,"duration":4,"cond_wwdm.TI":901.0,"parselect":["cond_wwdm.A","cond_wwdm.B","cond_wwdm.TI"],"outselect":["view.top:wwdm.LAI","view.top:wwdm.U"],"mode":["todownload","single","dataframe"],"format":"yaml","report":"all"}' http://erecord.toulouse.inra.fr:8000/vpz/report/ curl -H "Content-Type: application/json" -d '{"vpz":266,"duration":4,"cond_wwdm.TI":[899.0,900.0,901.0],"parselect":["cond_wwdm.A","cond_wwdm.B","cond_wwdm.TI"],"outselect":["view.top:wwdm.LAI","view.top:wwdm.U"],"mode":["todownload","linear","dataframe"],"format":"yaml"}' http://erecord.toulouse.inra.fr:8000/vpz/report/ curl -H "Content-Type: application/x-www-form-urlencoded" -d "vpz=266&duration=4&cond_wwdm.TI=901.0&parselect=cond_wwdm.A&parselect=cond_wwdm.B&parselect=cond_wwdm.TI&outselect=view.top:wwdm.LAI&outselect=view.top:wwdm.U&mode=todownload&mode=single&mode=dataframe&format=yaml&report=all" http://erecord.toulouse.inra.fr:8000/vpz/report/ curl -H "Content-Type: application/x-www-form-urlencoded" -d "vpz=266&duration=4&cond_wwdm.TI=[899.0,900.0,901.0]&parselect=cond_wwdm.A&parselect=cond_wwdm.B&parselect=cond_wwdm.TI&outselect=view.top:wwdm.LAI&outselect=view.top:wwdm.U&mode=todownload&mode=linear&mode=dataframe&format=yaml" http://erecord.toulouse.inra.fr:8000/vpz/report/
Example modifying the input datas folder (using datafolder, datafoldercopy) :
____________________________________________________________________ | The original input datas folder of the simulator wwdm.vpz is : | | data/31035002.csv | | /serieclim.dat | | wwdm_data.zip contains : data/31035002_bis.csv | | /31035002_ter.csv | | | | (31035002_bis.csv and 31035002_ter.csv are copies of 31035002.csv) | ____________________________________________________________________------------------------------------------------------------------------------- * Case : - wwdm_data.zip as datafolder - overwrite datafoldercopy - cond_meteo.meteo_file="31035002_ter.csv" - linear plan (mode) - dataframe restype (mode) - format yaml * cURL command line : curl -F 'vpz=266' -F 'datafolder=@wwdm_data.zip' -F 'datafoldercopy=overwrite' -F 'cond_meteo.meteo_file="31035002_ter.csv"' -F 'duration=4' -F 'cond_wwdm.TI=[899.0,900.0,901.0]' -F 'parselect=cond_meteo.meteo_file' -F 'parselect=cond_wwdm.A' -F 'parselect=cond_wwdm.B' -F 'parselect=cond_wwdm.TI' -F 'outselect=view.top:wwdm.LAI' -F 'outselect=view.top:wwdm.U' -F 'mode=todownload' -F 'plan=linear' -F 'restype=dataframe' -F 'format=yaml' http://erecord.toulouse.inra.fr:8000/vpz/report/ * Comments : The modified input datas folder : data/31035002.csv /serieclim.dat /31035002_bis.csv /31035002_ter.csv -------------------------------------------------------------------------------
More¶
This resource is part of Web API ‘vpz’