{recordID} is a record identifier used internally by FileMaker, this is always unique and should be sufficient for common use. In some cases it may be impractical (i.e. if the identifier changes due to deletion + re-insertion of a record). RESTfm provides an alternate format by allowing a specified fieldName=uniqueValue in place of any {recordID}. This is known as {unique-key-recordID}.

The uniqueValue should be in the same format as a FileMaker Find. e.g. an exact match for 1234 would be ==1234

An error will result if the find fieldName=uniqueValue does not return single (unique) record.

The entire fieldName=uniqueValue string should be URL encoded if used as part of a URI.

Note: This is not a query string parameter, but a part of the URI itself. Therefore the equals sign should also be encoded.

e.g. for the field myField and the unique value to find ==1234, the entire string would be myField===1234, when URL encoded would appear as: myField%3D%3D%3D1234. This string is now a valid replacement for any occurrence of {recordID} in any RESTfm URI.

Example URI and response

Example error response

Record URI - JSON - GET unique-key-recordID - non-unique error.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    "data": [
        
    ],
    "meta": [
        
    ],
    "info": {
        "X-RESTfm-Version": "2.0.1\/r280",
        "X-RESTfm-Protocol": "4",
        "X-RESTfm-Status": 409,
        "X-RESTfm-Reason": "11 conflicting records found",
        "X-RESTfm-Method": "GET"
    }
}
Example JSON format GET error response from a non-unique recordID.

Changelog

Version Description
2.0.0 Added support for {unique-key-recordID}.