Perform a find request
To perform a find request, use an HTTP POST method with the _find
API endpoint specifying the database name and the layout, and additional information to specify the query fields and criteria, sort order, starting record, and number of records. You can also specify portal information to limit the number of related records that are returned.
HTTP method |
POST |
URL |
/fmi/data/version/databases/database-name/layouts/layout-name/_find version – the FileMaker Data API version requested can use
database-name – the name of the hosted database layout-name – the layout to use as the context for the find request |
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 query in JSON format specifying the fields and find criteria. You can use optional parameters to specify omit requests, the sort order, starting record (offset), number of records (limit), and portals for limiting the number of related records that are returned. The offset, limit, and sort parameters work on records found in the layout's table and not related portal records. To restrict the number of records and rows to display in a related set, specify the offset.portal-name and limit.portal-name parameters. If you want the response data in the context of a different layout, use the For example: Copy
Example with offset, limit, and portals: Copy
You can run FileMaker scripts as part of this request by including the |
Response |
The record data in JSON format and a messages array showing an error code of 0. For example: Copy
See Error responses. |
Notes
-
Sorting and returning records can be time consuming. Reduce record download time by limiting the number of fields on the requested layout and omitting fields that contain comments.
-
You cannot specify global fields as find criteria. If you specify a global field with a find request, you receive an error message. Instead, set the global field value before the find request. See Set global field values.