| 39 | |
| 40 | == URL Argument Lists == |
| 41 | |
| 42 | General URL format: |
| 43 | |
| 44 | {{{ |
| 45 | http://host/application/module/resource/<arguments>?<vars> |
| 46 | }}} |
| 47 | |
| 48 | The argument list is interpreted as follows: |
| 49 | |
| 50 | * '''empty argument list''' accesses to all/any records of the resource |
| 51 | * '''<id>''' access to record #<id> of the resource |
| 52 | * '''<method>''' <method> access to all/any records of the resource |
| 53 | * '''<method>/<id>''' <method> access to the record #<id> of the resource |
| 54 | |
| 55 | * '''<id>/<component>''' access to all/any component records of the record #<id> of the resource |
| 56 | * '''<id>/<component>/<method>''' <method> access to all/any component records for the record #<id> of the resource |
| 57 | |
| 58 | You may even pass a record ID for the component at the end of the arguments list to access a particular component record - which would produce an error message if these two records do not belong together. |
| 59 | |
| 60 | The data format of the request can be passed: |
| 61 | |
| 62 | * as extension to the resource, e.g. http://localhost:8000/sahana/pr/person.xml/1 |
| 63 | * as extension to any of the arguments, e.g. http://localhost:8000/sahana/pr/person/1/address/create.xml |
| 64 | * as explicit variable "format", e.g. http://localhost:8000/sahana/pr/person/1/address?format=xml |
| 65 | |
| 66 | If multiple extensions are specified, the rightmost extension applies. Where ''?format='' is specified, it overrides any extensions. |
| 67 | |
| 68 | If no ID for the primary resource record is sent in the URL, the last record ID will be remembered. This can be used for cascading or returning UI actions. This ID trace can be explicitly cleared by sending a request to the primary resource with ''clear'' as method. At login/logout as well as after a ''delete'' action, the ID memory is automatically cleared. |
135 | | General URL format: |
136 | | |
137 | | {{{ |
138 | | http://host/application/module/resource/<arguments>?<vars> |
139 | | }}} |
140 | | |
141 | | The argument list is interpreted as follows: |
142 | | |
143 | | * '''empty argument list''' accesses to all/any records of the resource |
144 | | * '''<id>''' access to record #<id> of the resource |
145 | | * '''<method>''' <method> access to all/any records of the resource |
146 | | * '''<method>/<id>''' <method> access to the record #<id> of the resource |
147 | | |
148 | | * '''<id>/<component>''' access to all/any component records of the record #<id> of the resource |
149 | | * '''<id>/<component>/<method>''' <method> access to all/any component records for the record #<id> of the resource |
150 | | |
151 | | You may even pass a record ID for the component at the end of the arguments list to access a particular component record - which would produce an error message if these two records do not belong together. |
152 | | |
153 | | The data format of the request can be passed: |
154 | | |
155 | | * as extension to the resource, e.g. http://localhost:8000/sahana/pr/person.xml/1 |
156 | | * as extension to the record ID, e.g. http://localhost:8000/sahana/pr/person/1.xml |
157 | | * as extension to the component, e.g. http://localhost:8000/sahana/pr/person/1/address.xml |
158 | | * as extension to the method, e.g. http://localhost:8000/sahana/pr/person/1/address/create.xml |
159 | | * as variable "format", e.g. http://localhost:8000/sahana/pr/person/1/address?format=xml |
160 | | |
161 | | '''Policy:''' the rightmost extension is applied, ''?format='' overrides any extensions |