Query String (GET)
Query string parameters without the prefix 'RFM' are considered to be data for a single record in the form of FieldName=FieldValue pairs. This mechanism for submitting data is limited, but may be used with method override to perform basic CRUD operations, using only HTTP GET.
Note: All query string parameters must be 'URL encoded' as described here.
Advantages
- Very easy to submit basic data into RESTfm. It is even possible by just manipulating the URL bar in a browser
Limitations
- Will not work for field names that begin with 'RFM', as these are reserved words for RESTfm query string parameters.
- Query string length is limited by both client and server, and requires testing to check bounds. Approximately 2000 characters appears to be common.
Examples
{ "meta": [ { "recordID": "9880503", "href": "\/RESTfm\/postcodes\/layout\/brief%20postcodes\/9880503.json" } ], "data": [ { "Pcode": "99999", "Locality": "", "State": "", "Comments": "Example" } ], "info": { "X-RESTfm-Version": "3.0.0beta\/r420", "X-RESTfm-Protocol": "4", "X-RESTfm-Status": 201, "X-RESTfm-Reason": "Created", "X-RESTfm-Method": "POST" }, "metaField": [ { "name": "Pcode", "autoEntered": 0, "global": 0, "maxRepeat": 1, "resultType": "text" }, { "name": "Locality", "autoEntered": 0, "global": 0, "maxRepeat": 1, "resultType": "text" }, { "name": "State", "autoEntered": 0, "global": 0, "maxRepeat": 1, "resultType": "text" }, { "name": "Comments", "autoEntered": 0, "global": 0, "maxRepeat": 1, "resultType": "text" } ] }
Example record creation response using GET query string with POST override.
{ "info": { "X-RESTfm-Version": "3.0.0beta\/r420", "X-RESTfm-Protocol": "4", "X-RESTfm-Status": 200, "X-RESTfm-Reason": "OK", "X-RESTfm-Method": "DELETE" } }
Example record deletion response using GET query string with DELETE override.