URI /RESTfm/{database}/bulk/{layout} Update - PUT

URI /RESTfm/{database}/bulk/{layout}

Updates multiple records in {database} and {layout}, from the records provided.

Only the provided fields are updated. Absent fields are not modified in any way.

Note: Each record in the submitted 'data' section must be accompanied by a {recordID} or {unique-key-recordID} in the 'meta' section.

Optional alternative {recordID} format - {unique-key-recordID}

<fieldName>=<uniqueValue> May be used in place of the FileMaker internal record identifier {recordID}.
The uniqueValue should be in the same format as a FileMaker Find.
e.g. an exact match for '1234' would be '==1234'
The final string would then appear as: 'myField===1234'

Optional query string parameters

RFMelsePOST If {recordID} exists, field data is updated as normal,
else perform a POST (Create) operation instead.
RFMscript=<name> URL encoded script name to be called after result set is generated and sorted.
RFMscriptParam=<string> URL encoded parameter string to pass to script.
RFMpreScript=<name> URL encoded script name to be called before performing the find and sorting the result set.
RFMpreScriptParam=<string> URL encoded parameter string to pass to pre-script.

Example message, URI and response

In the following example, two records are updated. The fields to be updated are contained as rows in the 'data' section, the 'meta' section must contain the recordID at the same row index.
Example bulk JSON format UPDATE message.
{
    "meta": [
        {
            "recordID": "9997065"
        },
        {
            "recordID": "9997066"
        }
   ],
    "data": [
        {
            "Comments": "Locality was updated",
            "Locality": "Update location 3"
        },
        {
            "Comments": "Locality was updated",
            "Locality": "Update location 4"
        }
    ]
}

http://demo.restfm.com/RESTfm/postcodes/bulk/brief%20postcodes.json

{
    "info": {
        "X-RESTfm-Version": "3.0.0beta\/r420",
        "X-RESTfm-Protocol": "4",
        "X-RESTfm-Status": 200,
        "X-RESTfm-Reason": "OK",
        "X-RESTfm-Method": "PUT"
    }
}
Example bulk JSON format UPDATE response.

Changelog

Version Description
3.0.0 Added support for bulk operations.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us