Get a single record
To get a record, use an HTTP GET method with the records
API endpoint specifying the database name, layout, and record ID. You can also specify portal information to limit the number of related records that are returned.
HTTP method |
GET |
URL |
Format 1: /fmi/data/version/databases/database-name/layouts/layout-name/records/record-id Format 2: /fmi/data/version/databases/database-name/layouts/layout-name/records/record-id?portal=["portal-name-n", ...] &_offset.portal-name=starting-record &_limit.portal-name=number-of-records version – the FileMaker Data API version requested can use
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 to get For the portal keyword: portal-name-n is a portal containing the related records. A portal name can be either the object name shown in the Inspector in FileMaker Pro or the related table name. You can specify multiple portal names. The portal portion of the URL is optional. If the layout includes portals, specify the portal names for better performance. If the portal portion is omitted, the call will return all related records in all portals on the layout. For For If you want the response data in the context of a different layout, use the You can run FileMaker scripts as part of this request by including the |
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 |
The record data in JSON format and a messages array showing an error code of 0. For example: Copy
See Error responses. |
Notes
-
To return data for specific portal rows, use
_offset.portal-name
and_limit.portal-name
. A portal name can be either the object name shown in the Inspector in FileMaker Pro or the related table name. If you omit the offset and limit values for portal rows, the default for offset is 1 and the default limit for portal records is 50.