DevCon, DevCon 2019, FileMaker, FileMaker Data API

FileMaker Data API workshop – activity two

Now that we’ve got our interface file in place it’s time to start interacting with it using the FileMaker Data API. Initially we’re going to use Postman, an API development and testing tool to try out the various options that are available to us. If you don’t have Postman installed, grab it form their downloads page (which has both Windows and Mac versions).

  1. Launch Postman and dismiss any ‘welcome’ screens to get to the main interface
  2. From the menu select File > Import
  3. Open the session resources folder, locate the Postman folder and drag and drop the two configuration files (the ones not called readme.txt) onto the import dialog. These two files have different purposes
    1. FileMakerDataAPIDemo.postman_collection.json is a pre-configured set of API calls which we can then use in Postman to make calls to the Data API. This is a ‘shortcut’ to save you having to set up the queries yourself for things like authentication, creating, fetching and deleting records etc.
    2. FileMakerDataAPIDemo.postman_environment.json contains a number of variables that are used to configure the calls made in the collection. It holds things like the server address, database name, authentication token etc and saves having to include these things manually in each query in the collection.

  4. We now need to configure the environment that we just imported
    1. In the top right corner of Postman select the dropdown which by default will say ‘No environment’ and switch to the FileMaker Data API demo environment.
    2. Click the eye icon to open the configuration of the environment
    3. In the FileMaker Data API demo section at the top update the Current Value for the database variable to the name of the interface file you just created – when you hover over the current value a ‘pencil’ icon will appear to allow it to be edited. The top two variables, recordId and FMAPIToken will be updated as we perform various requests to the FileMaker Data API.

  5. Back to the main Postman interface
    1. Switch to Collections
    2. Expand the FileMaker Data API demo collection
    3. Click on the Authenticate task
    4. Select the Authorization tab
    5. Update the Username and Password to match the Full Access account you created in activity one.
    6. Click Send to perform the query

  6. Explore each of the other items in the collection and monitor the impact they have in FileMaker.

< Back to activity oneOn to activity three >

Leave A Comment

*
*