Set global field values

To set the values for global fields, use an HTTP PATCH method with the globals API endpoint specifying the database name.

HTTP method

PATCH

URL

/fmi/data/version/databases/database-name/globals

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

database-name – the name of the hosted database

HTTP header

Content-Type: application/json

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

Parameters

A JSON object with field-and-value pairs specifying the global fields to set. The global fields must be specified using fully qualified field names (table name::field name).

For example:

Copy
{
  "globalFields": {
    "baseTable::gCompany": "FileMaker",
    "baseTable::gCode": "95054"
  }
}
Response

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

For example:

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