Undefined

The "One" REST Script

When it comes to programming, there's always more to learn and share. If you've worked with REST APIs in the past, then you may have already devised your perfect system. If not, then this video will showcase a freely available script which you might want to consider first before trying to solve the problem yourself.

In our ever expanding world of coding to standards and systems, many of which have existed for decades, it's always prudent to see if you can beg, borrow and... Ok, don't steal... code which already does the trick. When it comes to HTTP's REST implementation we've already got all the code necessary.

Thanks to a great community contribution by Todd Geist, you really don't need to fumble through all the variations and possibilities of HTTP's REST methods used by FileMaker's cURL features found within the Insert from URL step. Todd and company did the heavy lifting and made an open source file available to everyone.

In this video I showcase my own personal enhancements to the script and provide some insight into some of the ways I code and why I do the things the way I do.

Tags:

Insert From URL cURL Options

Do you need to work with online APIs and find yourself wishing there was an easy way to accomplish it? Well, there actually is. In fact, in much of technology, there's something or someone somewhere which has likely already solved the problem.

In the case of using REST (Representational state transfer) to interact with service APIs within FileMaker, it's nice to have a single tool which will handle most of the heavy work for you. When native JSON was added to FileMaker, the last piece to the puzzle was a more expanded method of interacting with the network. The cURL library was already being used by FileMaker and it was simply a matter of "opening things up" so developers could use the full suite of the cURL library.

By adding the cURL options calculation to the Insert From URL script step the world of the web opened up for our humble FileMaker Pro.

This video provides a comprehensive understanding of how curl is integrated into FileMaker and how you can use a freely provided script to manage all your REST based interactions. Knowing about HTTP status codes and request/response headers is what you'll find covered in this video and the associated file.

Tags:
AttachmentSize
AccuWeatherAPI.zip127.08 KB

Accessing Google Services - Part 3

Having made the connection to Google's Services using Oauth 2, and spending a touch of time investigating how we can discover documents within Google Drive, we're in the home stretch of reading and writing data to a Google Sheet.

By simplifying the way we make API calls to any of Google's services, we end up with a great solution for working with any of Google's available APIs. Also, by focusing on the simple example of working with one simple Google Sheet, we end up capturing data via a Google Form which dumps data into the Google Sheet. All we need to do is read and write to that sheet.

This video covers the topic of watching for an expired access token and making sure that each call to the API has the greatest chance of success. Within no time you'll be reading and writing to a Google Sheet as if everything was right there within FileMaker Pro itself!

Tags:
AttachmentSize
GoogleOauth2Part3.zip99.19 KB

Using cURL within FileMaker Pro

While FileMaker’s script step Insert from URL does allow for basic communication with web services, it is, by no means, comprehensive enough to provide all the features necessary. What’s really needed is the full cURL library.

This open source tool has been available for over 15 years and is baked into a ton of software packages, including FileMaker itself. However, it’s really only exposed within plug-ins such as Base Elements and the MBS plug-in.

So, in order to fully understand what going on, it’s best to start with the source. And, that’s understanding cURL itself and how options are managed and how you set and parse HTTP headers.

This video walks through the process of using cURL within the context of a plug-in. Once you understand how to set and control settings through the plug-in, you’re off to the races and working with any web service you can think of.

Tags:
AttachmentSize
cURL.zip68.17 KB

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!

Tags:
AttachmentSize
VimeoVideosConnect.zip29.93 KB