103 | | '''in interactive formats (e.g. HTML):''' |
104 | | * A GET without method and no record ID results in a '''list''' view of the resource |
105 | | * A GET without method but with a record ID results in a '''read''' view of this record. If the user is permitted to update the addressed record, an '''update''' form returned instead |
106 | | * you may specify a '''method''' in the method argument list, e.g. '''create''' (=create new record), '''read''' (=view this record), '''update''' (=update this record) or '''delete''' (=delete this record), all of which are returning a form |
107 | | * some resources support other methods, e.g. '''search_simple''' to perform a simple string search (currently supported by the pr/person and hms/hospital resources) |
| 103 | ==== Interactive Formats ==== |
109 | | '''in non-interactive formats (e.g. XML):''' |
110 | | * '''method''' arguments work like in interactive formats, except they expect the data in the request body in the respective format |
111 | | * all records addressed by the URL are returned in the respective format, there is no difference between (single-record-)"read" and (multi-record-)"list" view |
| 105 | * without method: |
| 106 | - if no record ID/UID in the URL: '''list''' view of the resource |
| 107 | - with a record ID/UID in the URL: '''read''' view of the specified record (if the user is permitted to update the record, an '''update''' form returned instead) |
| 108 | |
| 109 | * with '''method''' in the URL: |
| 110 | - method '''create''' returns a create-form |
| 111 | - method '''read''' returns a view of the specified record (other than with blank method, no update form is returned in this case) |
| 112 | - method '''update''' returns an update form for the specified record |
| 113 | - method '''delete''' returns a delete form for the specified records |
| 114 | |
| 115 | * some resources support other (custom) methods, e.g. |
| 116 | - '''search_simple''' returns a form for simple string search in the resource |
| 117 | |
| 118 | ==== Non-interactive formats ==== |
| 119 | |
| 120 | * without '''method''': |
| 121 | - returns a list of all matching records in the specified format |
| 122 | |
| 123 | * with '''method''' in the URL: |
| 124 | - method '''create''' or '''update''' imports data into the resource from the specified data source: |
| 125 | * ''?filename='' variable to specify a local file (on the server) |
| 126 | * ''?fetchurl='' variable to specify a source URL |
| 127 | * with format extension ''.url'' data are imported directly from the URL |
| 128 | * if none of the above is specified, data are imported from the request body |
| 129 | - method '''read''' returns a the specified records in the requested format |
| 130 | - method '''delete''' deletes the specified records |
| 131 | |