URI /RESTfm/{database}/script/{script}/{layout} Execute - GET
URI /RESTfm/{database}/script/{script}/{layout}
Executes {script} in the context of {database} and {layout}.
Every script must specify a layout for context.
Returns a list of records from the script's found set. If the script does not produce a found set, a single random record is always returned from {layout}.
Optional query string parameters
| RFMscriptParam=<string> | URL encoded parameter string to pass to script. |
Example FileMaker script, URI and Response
Enter Find Mode [ ] Set Field [ postcodes::Pcode; Get ( ScriptParameter ) ] Perform Find [ ] If [ Get ( FoundCount ) > 0 ] Exit Script [ Result: Get ( FoundCount ) ] End If
{
"data": [
{
"Pcode": "7300",
"Locality": "DEVON HILLS",
"State": "TAS",
"Comments": ""
},
{
"Pcode": "7300",
"Locality": "PERTH",
"State": "TAS",
"Comments": ""
},
{
"Pcode": "7300",
"Locality": "POWRANNA",
"State": "TAS",
"Comments": ""
}
],
"meta": [
{
"recordID": "5900630",
"href": null
},
{
"recordID": "5900631",
"href": null
},
{
"recordID": "5900632",
"href": null
}
],
"info": {
"X-RESTfm-Version": "2.0.1\/r280",
"X-RESTfm-Protocol": "4",
"X-RESTfm-Status": 200,
"X-RESTfm-Reason": "OK",
"X-RESTfm-Method": "GET"
}
}
Changelog
| Version | Description |
|---|---|
| 1.1.0 | Script parameter querystring changed to RFMscriptParam |
| 1.0.0 | Script parameter querystring was RFMparam |