REST comes to FileMaker
While we have been able to use plugins and the Insert from URL script step to consume data from other web-based systems using either SOAP or REST services, FileMaker did not have a native way to easily serve its data to other sites. There is custom web publishing, and ODBC connections, but that was still somewhat limiting when it came to serving data to other web-based systems from anywhere in the world. That all changes in FileMaker 16 with the introduction of the REST based Data API. Now your FileMaker solution can behave like any number of other databases from around the globe who have distinct APIs written for external users to consume the data. Please note that FileMaker considers this a “trial feature”, so it may not be completely ready for prime time. Additionally, within the FileMaker 16 Server Admin Console, there is a new tab enabling and configuring the Data API that alludes to the possibility that somehow data connections may be metered in the future. So if you are trying to provide a high capacity site, note there may be future charges related to the number of API calls to FileMaker Server. Even with these unknowns and certainly some limitations, like not being able to run a script, that come with any first release, the core of this looks very interesting.
Getting Started – The Very Basics
Here is a quick list of things to consider when planning for the new Data API.
- Separate Layout or Separate File: Not unlike Custom Web Publishing (CWP) the Data API can only interact and access the fields on a specified layout so you must create a layout and include only those fields needed for your intended calls.
- Authenticated Accounts only: The Data API requires a fully authenticated account to access the data. Thus, you can not make a straight URL call to access the data in a FileMaker database like you could for say Yahoo Weather. Not only does the API require authentication via FileMaker or the new Oauth feature, but once authenticated you will receive a token that must be used for all subsequent data calls.
- New Extended Privilege: Not only must you use an authenticated account, but that account must have the new fmrest extended privilege attached to it.
- JSON Rules: Whether it is a POST, GET, PUT, or DELETE, the REST parameter or payload must be JSON-formatted text. Therefore you will need to learn how to write out the JSON data when trying to update data in your system as well as read the data when pulling data from your system.
- Separate Configuration: As mentioned previously there is a new tab in the FileMaker 16 Admin Console that allows you to enable the REST API.
- SSL Required: The FileMaker Data API requires SSL encryption so that must be enabled on your server.
- The URL Please: To access the Data API your url will look something like – https://www.mysolution.com/fmi/rest/api/ (then either auth, record, find, or global) /the solution name / layout name/
Where to Go Next