Changes between Version 73 and Version 74 of RESTController
- Timestamp:
- 12/03/12 16:56:08 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RESTController
v73 v74 1 = REST Controller = 1 2 [[TOC]] 2 3 3 = REST Controller = 4 5 * [wiki:S3XRC S3XRC] 6 * [wiki:S3XRC_S3Resource S3Resource] 4 * [wiki:S3XRC S3XRC] 5 * [wiki:S3XRC_S3Resource S3Resource] 7 6 8 7 == Introduction == … … 15 14 16 15 These default method handlers as well as {{{s3_rest_controller()}}} itself are implemented in: 17 18 * {{{modules/s3/s3crud.py}}}. 16 * {{{modules/s3/s3crud.py}}}. 19 17 20 18 The method handlers of {{{s3crud.py}}} support a number of data representation formats: 21 22 * HTML (including autogenerated Create/Update forms) 23 * PDF (export only) 24 * XLS (export only) 25 * CSV 19 * HTML (including autogenerated Create/Update forms) 20 * PDF (export only) 21 * XLS (export only) 22 * CSV 26 23 27 24 Note: Method handlers for XML and JSON formats are integrated in the backend (S3Resource). 28 25 29 26 A good tool for testing the REST functionality is the [http://code.google.com/p/rest-client/ RESTClient] 27 30 28 == Resources == 31 32 29 Resources are data objects on the server. 33 30 … … 41 38 42 39 == URL Argument Lists == 43 44 40 General URL format: 45 46 41 {{{ 47 42 http://host/application/module/resource/<arguments>?<vars> … … 49 44 50 45 The argument list is interpreted as follows: 51 52 * '''empty argument list''' = all records of the resource 53 * '''<id>''' = a particular record of the resource 54 * '''<id>/<component>''' = all records of a component of a particular record of the resource 55 * '''<component>/<id>''' = a particular record of a component of the resource 46 * '''empty argument list''' = all records of the resource 47 * '''<id>''' = a particular record of the resource 48 * '''<id>/<component>''' = all records of a component of a particular record of the resource 49 * '''<component>/<id>''' = a particular record of a component of the resource 56 50 57 51 If a '''<method>''' argument is added at the end of the argument list, the addressed resource(s) will be accessed with that method.