Update container fields in a record using base64-encoded data

To use base64-encoded data to update the value of one or more container fields in a record, use the HTTP PATCH method with JSON or Atom for the request body. For more on supported data types for container fields, see Create a record with an image or PDF in a container field.

Component Description

HTTP method

PATCH

URL

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

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

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

Parameters

Example of a JSON request body to update the Photo container field using a base64-encoded image and to update the Website text field:

Copy
{
  "Photo": "R0lGODlhCQAJAIABAH9/f////yH5BAEAAAEALAAAAAAJAAkAAAIMjI+pC+1wHkSOrbsKADs=",
  "Website": "www.example.com"
}

FileMaker information

Using this method to update container fields, it's not possible to specify the media type of the base64-encoded data via the Content-Type header. The media type of each base64-encoded container value is inferred by comparing the first bytes of the data to expected values for the supported media types. However, if the media type is misidentified when using base64-encoded data, you may instead need to use binary data and specify the Content-Type header for each container field value (see Update a container field in a record using binary data).