Download presentation
Presentation is loading. Please wait.
Published byShonda Carson Modified over 8 years ago
1
4th project meeting 27-29/05/2013, Budapest, Hungary FP 7-INFRASTRUCTURES-2011-2 programme 283770 agINFRA agINFRA A data infrastructure for agriculture Basic RESTApi tutorial 4th agINFRA Project Meeting 27th - 29th of October, 2013 27th - 29th of October, 2013 Budapest, Hungary G. Hermann MTA SZTAKI
2
4th project meeting 27-29/05/2013, Budapest, Hungary FP 7-INFRASTRUCTURES-2011-2 programme 283770 agINFRA Goal Reach the Aginfra Web Service as a job submission from the WS-PGRADE portal. The API of the Aginfra WEB service is defined here: http://aginfra.ipb.ac.rs/www/restapi/index.html
3
4th project meeting 27-29/05/2013, Budapest, Hungary FP 7-INFRASTRUCTURES-2011-2 programme 283770 agINFRA Solution A special Aginfra related DCI kind („rest”) will be defined in the WS- PGRADE. The URL of the web service call, the name of service (GET,PUT,POST…) and the eventual content type (MIME type) of the input will be defined on the JobConfiguration/Job_Executable/Service page. Eventual extensions of the URL and the input/output files are defined in the JobConfiguration/Job_I/O page where real input files are associated by the „STREAM” and the url extensions by the „URL PATH” tag and there is the possibility to define a form by qualifying each of its input value by a „FORM” tag.
4
4th project meeting 27-29/05/2013, Budapest, Hungary FP 7-INFRASTRUCTURES-2011-2 programme 283770 agINFRA Example 1 API to be mapped TimestampHarvesterDatasets Description This resource contains all produced datasets for a particular harvesting target and particular timestamp. URI http://aginfra.ipb.ac.rs:8080/aginfra/dataset/{harvtrgid}/{timestam p} Method – GET - lists all produced datasets for a particular harvesting target and particular timestamp. Example – GET – curl http://aginfra.ipb.ac.rs:8080/aginfra/dataset/2/1354897812
5
4th project meeting 27-29/05/2013, Budapest, Hungary FP 7-INFRASTRUCTURES-2011-2 programme 283770 agINFRA WS Pgrade mapping of TimestampHarvesterDatasets Job Executable part URI http://aginfra.ipb.ac.rs:8080/aginfra/dataset/ {harvtrgid}/{timestamp} Method GET - lists all produced datasets for a particular harvesting target and particular timestamp.
6
4th project meeting 27-29/05/2013, Budapest, Hungary FP 7-INFRASTRUCTURES-2011-2 programme 283770 agINFRA WS Pgrade mapping of TimestampHarvesterDatasets Job I/O part URI Example GET curl http://aginfra.ipb.ac.rs:8080/aginfra/dat aset/2/1354897812 Note that „URL PATH” tags are ordered according the associated „Port Number”
7
4th project meeting 27-29/05/2013, Budapest, Hungary FP 7-INFRASTRUCTURES-2011-2 programme 283770 agINFRA Example 2 API to be mapped HarvesterTarget Description This resource gives information of particular harvesting target and allows update of these information. URI http://aginfra.ipb.ac.rs:8080/aginfra/harvtrg/{harvtrgid} Method – GET - gives information of particular harvesting target. – POST - updates information of particular harvesting target. Example – GET – curl http://aginfra.ipb.ac.rs:8080/aginfra/harvtrg/7 [output.json]output.json – POST – curl -X POST -H "Content-Type: application/json" -d @harvester.json http:// : @aginfra.ipb.ac.rs:8080/aginfra/harvtrg/7
8
4th project meeting 27-29/05/2013, Budapest, Hungary FP 7-INFRASTRUCTURES-2011-2 programme 283770 agINFRA WS Pgrade mapping of HarvesterTarget Job Executable part URI http://aginfra.ipb.ac.rs:8080/aginfra/harvtrg/{harvtrgid} Method GET - gives information of particular harvesting target. POST - updates information of particular harvesting target. ExampleGET curl http://aginfra.ipb.ac.rs:8080/aginfra/harvtrg/7 [output.json] output.json POST curl -X POST -H "Content-Type: application/json" -d @harvester.json http:// : @aginfra.ipb.ac.rs:8080/a ginfra/harvtrg/7
9
4th project meeting 27-29/05/2013, Budapest, Hungary FP 7-INFRASTRUCTURES-2011-2 programme 283770 agINFRA WS Pgrade mapping of HarvesterTarget Job I/O part URI http://aginfra.ipb.ac.rs:8080/aginfra/harvtrg/{harvtrgid} Method GET - gives information of particular harvesting target. POST - updates information of particular harvesting target. ExampleGET curl http://aginfra.ipb.ac.rs:8080/aginfra/harvtrg/7 [output.json] output.json POST curl -X POST -H "Content-Type: application/json" -d @harvester.json http:// : @aginfra.ipb.ac.rs:8080/a ginfra/harvtrg/7
10
4th project meeting 27-29/05/2013, Budapest, Hungary FP 7-INFRASTRUCTURES-2011-2 programme 283770 agINFRA Thank you !
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.