FileMaker REST using BaseElements Plugin

REST (Representational state transfer) has quickly become the de facto standard for communication between services and apps. Before it, came SOAP and XMLRPC, but the two buzzwords you’ll hear over and over these days are REST and JSON.

When it comes to FileMaker, you’ve always been able to do super basic REST with the Insert from URL script step. Later down the road, FileMaker added in support for the POST method of service interaction with the httpspost:// url scheme.

While the basics are always nice to have, you can’t do much beyond access public services with what FileMaker provides natively. If you’re ever going to work with a truly powerful API such as those offered by YouTube, FaceBook, Twitter, Google Apps and Vimeo, then you have to use something a bit more powerful.

Fortunately, for FileMaker developers, we have a number of possibilities. One of those options is the freely available BaseElements plugin. The plugin can access pretty much access any web service and will allow you to perform the full suite of possible interactions. It uses the very popular cURL library behind the scenes and with a little bit of knowledge, you’ll be interacting with web services in no time.

If you have the need for integrating true REST client functionality within a FileMaker solution, then you’ll be glad you watched this video!

AttachmentSize
VimeoVideosConnect.zip29.93 KB

Comments

Dear Matt,

TVYVM for your post!
I've found a couple of conceptual errors in your digression about CF (the secret token!) and Scripts so let me clarify a couple of things about security:

Custom Functions
====================
When you set the CF Avalaibility to "Only accounts assigned to full access privileges", you are instructing FileMaker to give no access to that CF to accounts with lower privileges.
As generic accounts already can't edit any custom function, its purpose is avoiding them to use the CF in their own calculations.
However generic accounts can still benefit from its results when that CF's used in calculations provided by the solution developer!

Scripts w/Full Access Privileges
===================================
As any user can benefit from such a CF –which can be used by the developer here and there— there is not need to assign this privilege to any script that is using it!
Full Access Privileges option aims at letting a common user do things beyond his privileges and avoiding him (if developer's wrongly set his Script privilege to Modify All ) to have access at that script.
In your case with or without that privileges, your script always results with the secret token!

Have a nice DevCon 2016

/Stefano

Looks like there's always more to learn. I just tested thing out and sure enough. You don't have to assign Full Access Privs to a script which uses a Full Access Custom Function.

That's pretty good to know!

-- Matt Petrowsky - ISO FileMaker Magazine Editor

Excellent new design, great improvement, love it.

How is this different from goya's RESTfm plugin?

Goya offers the BaseElements plug-in for free. It allows you to perform REST based operations with other web sites. In the world of REST, it's know as a REST client. The RESTfm product, which is also free from Goya, is a REST based server. It uses the PHP API provided by FileMaker Server to serve up REST based results from your FileMaker solutions.

It too is useful, (I use it myself) but it has very little to do with the client side of REST of which this video talks about.

I hope this helps out.

-- Matt Petrowsky - ISO FileMaker Magazine Editor