Upload container data

To upload container data, use an HTTP POST method with the containers API endpoint specifying the database name, layout name, record ID, field name, and a field repetition.

HTTP method

POST

URL

Format: /fmi/data/version/databases/database-name/layouts/layout-name/records/record-id/containers/field-name/field-repetition

version – the FileMaker Data API version requested can use v1, v2, or vLatest

database-name – the name of the hosted database

layout-name – the name of the layout to use as the context for getting the record

record-id – the record ID of the record

field-name – the name of the container field

field-repetition – the particular repetition in a repeating field

Other optional URL parameters:

  • modId - Specify a modification ID to ensure that you are editing the current version of a record. If the modification ID value does not match the current modification ID value in the database, the record is not changed.

HTTP header

Content-Type: multipart/form-data

Authorization: Bearer session-token, where session-token is the unique X-FM-Data-Access-Token value for the database session

Parameters

A multipart MIME data stream (Content-Type: multipart/form-data) where the container field object is defined as a part with name="upload"; only the part named upload will be processed by the FileMaker Data API. All other parts are ignored.

Use a library that supports specifying multipart/form-data.

Response

An empty response body, and a messages array showing an error code of 0.

For example:

Copy
{
  "response": {},
  "messages": [
    {
      "code": "0",
      "message": "OK"
    }
  ]
}

See Error responses.

Notes 

  • The container field must be a field in the table occurrence of the specified layout. It cannot be a container field in a related table.

  • The Content-Type header must be set properly, specifying multipart/form-data including the boundary parameter.

  • The FileMaker Data API allows all MIME types. The MIME types are not checked to restrict them to the types supported by FileMaker software or the web server.

  • The FileMaker Data API caches the container field data to a cache folder on the primary machine when it is being uploaded, but the cached data is deleted when the request completes.