[Pywps-dev] REST interface

Jorge Samuel Mendes de Jesus jorge.mendesdejesus at wur.nl
Sun Jun 14 23:52:23 PDT 2015


Hi to all

As Tom indicated normally REST uses HTTP verbs and paths that for
specific operations.

For a good reference try to read this book:
http://www.amazon.com/REST-Design-Rulebook-Mark-Masse/dp/1449310508

And then look at REST examples,
Geoserver - Very extensive (maybe not so dummy friendly)
http://docs.geoserver.org/stable/en/user/rest/

Soilgrids (simple and effective):
http://rest.soilgrids.org/

Taverna (maybe this one is closer the wps functionalities):
http://www.taverna.org.uk/documentation/taverna-2-x/server/2-2/rest-api/

1) From your question should I do:
http://localhost:5000/wps?service=wps&operation=getCabilities (adding
operations)

My IMHO is No, you are exiting KVP of WPS and not creating a real REST,
for example if you want to put/add a new process:

-Use a URL like this
http://localhost/wps/rest/configuration
-A HTTP verb like PUT
-Content file like a python script with process

2) You are using werkzeug/flask on pywps4.0, take advantage of the path
redirects @app.route("/rest/configuration" ) and the security level

3) You have to very careful with security since an properly done WPS
process with some nasty piece of code and blow up your server and be a
security problem.

Jorge

On 14-06-15 22:21, Tom Kralidis wrote:
> Thanks for the info - sounds great! Are you implementing WPS REST based on an OGC profile or best practice?
>
> Having said this, it might be valuable to investigate the degree of RESTful-ness one can achieve (i.e. using pure HTTP verbs instead, etc.). For example:
>
> http://example.org/wps # capabilities
> # config (needs auth)
> http://example.org/wps/server/config
> http://example.org/wps/server/instances
> http://example.org/wps/server/processes
>
> And so on.
>
> Sent from my iPhone
>
>> On Jun 14, 2015, at 15:55, Calin Ciociu <calin.ciociu at gmail.com> wrote:
>>
>> Hello everyone,
>>
>> As some may know I am working during the summer for Google Summer of Code 2015.
>> My job is to implement a REST interface for PyWPS-4.
>>
>> So REST won't be much different than the actual way a client makes requests.
>> Something along the lines of "http://localhost:5000/wps?SERVICE=wps&OPERATION=GetCapabilities"
>>
>> What I was thinking was to add additional operation for different tasks like for example get the server configuration or the list of running server instances and processes. Also be able to set some configuration, control processes etc. (Which might require also some kind of security otherwise anyone can just go ahead and stop or deploy servers/processes)
>>
>> What do you guys think?
>> Does this sound like a plan or should I have something different like "http://localhost:5000/rest?operation=foo&..."?
>>
>> Best regards,
>> Calin Ciociu
>> _______________________________________________
>> pywps-dev mailing list
>> pywps-dev at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/pywps-dev
> _______________________________________________
> pywps-dev mailing list
> pywps-dev at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/pywps-dev

-- 
ISRIC - World Soil Information 
Post: PO box 353, 6700 AJ, Wageningen,
The Netherlands Visiting Address: Droevendaalsesteeg 3, 6708 PB
Wageningen (Bdg. 101), 
Office: C.013 
Office Phone: +31 (0) 317 4 83715
Mobile Phone: +31 (0) 613 9 06950
Skype: jorge.de.jesus (Jorge Samuel Mendes de Jesus) 
OpenPGPKey: 0xA3D0065A



More information about the pywps-dev mailing list