FM API Assistant: Integrate FileMaker With REST APIs
If you've done any API integration with FileMaker, then you're probably all too familiar with the limitations of the Insert From URL script step. While it does make it possible for you to make HTTP calls natively from FileMaker, it leaves a lot to be desired.
Limitations of Insert From URL
For example, Insert From URL can only make HTTP calls using the GET and POST methods. You cannot use many of the HTTP methods that most modern, RESTful APIs make use of, such as PUT, PATCH, and DELETE.
Also, there's no support for specifying HTTP header values, which many APIs use for authentication, content negotiation, and so on. And there's no way to specify a timeout value for HTTP requests that are made.
There are FileMaker plugins available that provide alternatives to the Insert From URL script step. However, those plugins can be costly, and present challenges for users accessing a database via WebDirect and Go.
FM API Assistant's HTTP Relay Function
I'm in the process of wrapping up an application that I've been calling FM API Assistant. It's essentially a helper application, which listens for HTTP POST requests. Those requests, which are sent to the app in a JSON-encoded format, define an HTTP request that the API Assistant is to make on FileMaker's behalf. Those requests can include:
• The HTTP Method to use, including GET, POST, PATCH, PUT, DELETE, HEAD, and so on.
• The server address that the request should be sent to, including the port.
• The protocol (HTTP or HTTPS) to use.
• Any URL parameters that should be sent.
• Any body content that should be sent for POST, PATCH, and PUT requests.
• The content type of the body content. For example, application/json.
• Header values that are to be sent with the request.
• The timeout value for the request.
The API Assistant essentially acts as a relay. It receives the request from FileMaker, makes the HTTP request on FileMaker's behalf, receives the response, and sends the response back to FileMaker.
Lots of Deployment Options
I've developed the API Assistant as a Xojo Web application. Therefore, I'll be making it available as a standalone and CGI application which can run on OS X, Windows, and Linux, and as both a 32-bit and 64-bit application. You can specify what port the API Assistant should listen on, so you can avoid conflicts with other services running on the same server. (You could run it alongside FileMaker Server if you'd like).
In terms of licensing, I'm still working through the details. There's a good chance that I'll make the application available free of charge, and only charge for support. We'll see...
In any case, I'm planning to release the FM API Assistant sometime next week. If you're interested in it, stay tuned to my blog and Twitter, or signup for my newsletter.