Get layout metadata

To retrieve layout metadata including fields on a layout, portals, and value lists, use an HTTP GET method with the layouts API endpoint and specify a layout name.

HTTP method

GET

URL

Format 1: /fmi/data/version/databases/database-name/layouts/layout-name

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 for which you want metadata

Format 2: /fmi/data/version/databases/database-name/layouts/layout-name?recordId=record-id

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 for which you want metadata

record-id - to retrieve related value list data, include a recordId query parameter.

HTTP header

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

Parameters None
Response

A response body with fieldMetaData, portalMetaData and valueLists arrays, and a messages array showing an error code of 0.

For example:

Copy
{
  "response": {
    "fieldMetaData": [
      {
        "name": "CustomerName",
        "type": "normal",
        "displayType": "editText",
        "result": "text",
        "valueList": "Text",
        "global": false,
        "autoEnter": false,
        "fourDigitYear": false,
        "maxRepeat": 1,
        "maxCharacters": 0
        "notEmpty": false,
        "numeric": false,
        "timeOfDay": false,
        "repetitionStart": 1,
        "repetitionEnd": 1
      }
    ],
    "portalMetaData": {},
    "valueLists": [
      {
        "name": "Region",
        "type": "customList",
        "values": [
          {
            "displayValue": "West",
            "value": "West"
          }
          , 
          {
            "displayValue": "East",
            "value": "East"
          }
        ]
      }
    ]
  },
  "messages": [
    {
      "code": "0",
      "message": "OK"
    }
  ]
}

See Error responses.

Notes 

  • For dynamic value lists, an empty value list is returned when the request does not include a recordId parameter as part of the URL.