|Version 4 (modified by 14 years ago) ( diff ),|
This page hosts detailed specifications for Blueprint for the RESTful API.
Web2Py generates URLs in this format:
These are generally fairly RESTful anyway, e.g.:
/sahana/gis/add_feature /sahana/gis/list_features /sahana/gis/display_feature/1 /sahana/gis/update_feature/1
Is there much benefit in chaning to URLs like:
/sahana/gis/feature/create /sahana/gis/feature/list /sahana/gis/feature/list_add /sahana/gis/feature/display/x /sahana/gis/feature/display/x?format=json /sahana/gis/feature/update/x
We want to be able extending this for exporting raw data in other formats using the optional vars: /sahana/pr/display_person/4?[xml|csv]
Web2Py already supports export as JSON, CSV & RTF. Hope to extend this to XML using http://www.reportlab.org/pyrxp.html
It would be best for us to add support to the framework to make it easy for module writers to have this functionality within their controllers.
Discussion of changes to Web2Py to make it more RESTful:
New SQLROW to JSON function:
NB Web2Py currently doesn't support HTTP PUT/DELETE/UPDATE (only GET).