Changes between Version 6 and Version 7 of DeveloperGuidelines/Tutorial/RESTCustomisation
- Timestamp:
- 06/11/10 21:15:28 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/Tutorial/RESTCustomisation
v6 v7 103 103 Now you're gonna provide this report in a RESTful way, i.e. you want to provide it as a resource that can be addressed via URLs like: 104 104 105 {{{ 106 http://site.myserver.org/eden/wm/warehouse/report 107 }}} 105 - '''http://site.myserver.org/eden/wm/warehouse/report''' 106 108 107 109 108 and is provided in several different data formats beyond HTML (the interactive view), let's say - XLS and XML: 110 109 111 {{{ 112 http://site.myserver.org/eden/wm/warehouse/report.xls 113 http://site.myserver.org/eden/wm/warehouse/report.xml 114 }}} 110 - '''http://site.myserver.org/eden/wm/warehouse/report.xls''' 111 - '''http://site.myserver.org/eden/wm/warehouse/report.xml''' 115 112 116 113 How to tackle this? … … 203 200 204 201 This URL addresses the report for all warehouses: 205 {{{ 206 http://site.myserver.org/eden/wm/warehouse/report 207 }}} 202 - '''http://site.myserver.org/eden/wm/warehouse/report''' 208 203 209 204 This URL addresses the report for the warehouse record with ID=1. 210 {{{ 211 http://site.myserver.org/eden/wm/warehouse/1/report 212 }}} 205 - '''http://site.myserver.org/eden/wm/warehouse/1/report''' 213 206 214 207 This URL addresses the report in XLS format for the warehouse record with the UUID=123654278 (assuming that you have UUID's in your warehouse table). 215 {{{ 216 http://site.myserver.org/eden/wm/warehouse/report.xls?warehouse.uid=123654278 217 }}} 208 - '''http://site.myserver.org/eden/wm/warehouse/report.xls?warehouse.uid=123654278''' 218 209 219 210 The S3RESTRequest provides the resource information to your warehouse_report function.