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 For example: Copy
Example with offset, limit, and portals: Copy
Other optional request body parameters:
|
Response |
The record data in JSON format and a messages array showing an error code of 0. For example: Copy
See Error responses. |
Notes
-
For find criteria in a query, use the same find operators (like "=" for a whole word match) as you do for find requests in FileMaker Pro. See Finding text and characters, Finding numbers, dates, times, and timestamps, Finding ranges of information, and Finding empty or non-empty fields in FileMaker Pro Help.
-
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.