Update a container field in a record using binary data

To use binary data to update the value of one container field in a record, use the HTTP PATCH method with the binary data in the request body. Only the image and PDF data types shown below are supported.

Component Description

HTTP method

PATCH

URL

https://host/fmi/odata/version/database-name/table-name(primary-key-value)/field-name

host – FileMaker Cloud or FileMaker Server host name

version – the OData version, always v4

database-name – the name of the hosted database

table-name - the name of the table

primary-key-value - the unique identifier value of the record

field-name - the name of the container field

Example: /fmi/odata/v4/ContactMgmt/Contacts('ALFKI')/Photo

HTTP header

Content-Type: indicates the format of the request body's binary data. It must be one of the following:

  • image/gif

  • image/png

  • image/jpeg

  • image/tiff

  • application/pdf

Parameters

Binary data in the request body

Example 1 

Using the command-line cURL tool, the following command updates the Photo container field in the record whose primary key field value is "ALFKI" in the Contacts table of the ContactMgmt database, using the account name and password admin to authenticate. The Photo field is updated with the binary data in the photo.png file in the current directory. (If your FileMaker Server host has no custom SSL certificate (not recommended), you may need to add the ‑‑insecure option to skip verification.)

Copy
curl --request PATCH \
"https://myhost.example.com/fmi/odata/v4/ContactMgmt/Contacts('ALFKI')/Photo" \
--header 'Content-Type: image/png' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--header 'OData-Version: 4.0' \
--header 'OData-MaxVersion: 4.0' \
--data-binary '@photo.png' \