Update record references

To create, update, or delete record relationships, use the $ref option with an HTTP DELETE, PATCH, PUT, or POST method with the record that you want to update in the URL.

Component Description

HTTP method

POST, PATCH, PUT, DELETE

URL

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

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

related-table - the name of the related table

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

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

Parameters

Detach (DELETE) the related record from the parent JSON example:

DELETE /fmi/odata/v4/ContactMgmt/Contacts('ALFKI')/Purchase/$ref

Add (PATCH, PUT, or POST) a related record reference to the parent JSON example:

PATCH /fmi/odata/v4/ContactMgmt/Contacts('ALFKI')/Purchase/$ref

PUT /fmi/odata/v4/ContactMgmt/Contacts('ALFKI')/Purchase/$ref

POST /fmi/odata/v4/ContactMgmt/Contacts('ALFKI')/Purchase/$ref

Copy
{
  "@odata.id": "/fmi/odata/v4/ContactMgmt/Purchase(123456)"
}

FileMaker information