| 6 | '''Important to know:''' |
| 7 | |
| 8 | * In '''XML and JSON''', data resources are always exported/imported in compound with all their subresources and referenced resources. |
| 9 | * In '''all other formats''', main resources and subresources are addressed separately |
| 10 | |
| 11 | === GET === |
| 12 | |
| 13 | ==== Interactive Formats ==== |
| 14 | |
| 15 | * without method: |
| 16 | - if no record ID/UID in the URL: '''list''' view of the resource |
| 17 | - 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) |
| 18 | |
| 19 | * with '''method''' in the URL: |
| 20 | - method '''create''' returns a create-form |
| 21 | - method '''read''' returns a view of the specified record (other than with blank method, no update form is returned in this case) |
| 22 | - method '''update''' returns an update form for the specified record |
| 23 | - method '''delete''' returns a delete form for the specified records |
| 24 | |
| 25 | * some resources support other (custom) methods, e.g. |
| 26 | - '''search_simple''' returns a form for simple string search in the resource |
| 27 | |
| 28 | ==== Non-interactive formats ==== |
| 29 | |
| 30 | * without '''method''': |
| 31 | - returns a list of all matching records in the specified format |
| 32 | |
| 33 | * with '''method''' in the URL: |
| 34 | - method '''create''' or '''update''' imports data into the resource from the specified data source: |
| 35 | * ''?filename='' variable to specify a local file (on the server) |
| 36 | * ''?fetchurl='' variable to specify a source URL |
| 37 | * with format extension ''.url'' data are imported directly from the URL |
| 38 | * if none of the above is specified, data are imported from the request body |
| 39 | - method '''read''' returns a the specified records in the requested format |
| 40 | - method '''delete''' deletes the specified records |
| 41 | |
| 42 | * XLS and PDF format work read-only (create/update/delete being ignored) |
| 43 | |
| 44 | === POST === |
| 45 | |
| 46 | ==== Interactive Formats ==== |
| 47 | |
| 48 | * performs the respective '''method''' (if specified in the request) |
| 49 | - method '''create''' creates a new record |
| 50 | - method '''update''' updates the specified record |
| 51 | - method '''delete''' deletes the specified record |
| 52 | * expects the form data as multi-part request body |
| 53 | |
| 54 | ==== Non-interactive Formats ==== |
| 55 | |
| 56 | * see PUT |
| 57 | |
| 58 | === PUT === |
| 59 | |
| 60 | ==== Interactive formats ==== |
| 61 | |
| 62 | * see POST |
| 63 | |
| 64 | ==== Non-interactive formats ==== |
| 65 | |
| 66 | * import data from the request body (which must be in the specified format) into the resource |
| 67 | * records being matched by the UIDs specified in the data, while any record IDs in the URL restrict the selection |
| 68 | |
| 69 | === DELETE === |
| 70 | |
| 71 | * deletes those of the addressed records which are deletable by the current user |
| 72 | |