DevCon, DevCon 2019, FileMaker, FileMaker Data API

FileMaker Data API workshop – activity one

To get started we need an interface file on our FileMaker server which we can use for all of the following activities.

  1. From the session resources locate the file InterfaceTemplate.fmp12 in the Databases folder.
  2. Make a copy and rename it – my advice is to never use spaces in files which are going to be accessed through an API, you never know how the space will be encoded, so if it’s not there, there can be no issue. I’d suggest YourInitialsInterface.fmp12, e.g. SJWInterface.fmp12, but other than no spaces (and no high ASCII characters either François!) it doesn’t really matter. The default user is Admin with no password.
  3. Secure the file by opening it in FileMaker, renaming the ‘Full Access’ account and setting a password for that account. If you’re going to upload this to your own FileMaker server make sure you use credentials which will let you view the file if you have any server-level file visibility restrictions.
  4. Upload it to a FileMaker Server. At DevCon use:
    1. server:
    2. username: Administrator
    3. password: DevCon19

    If you’re following along at home, that URL won’t resolve so you’ll need to use your own FileMaker Server.

  5. Link your interface to the data file DevCon19Data on the same server. (There is a copy of that file in the session resources so you can run all of this at a later time on your own FMS).
  6. Add the Contacts table from the data file to the graph for your interface file. If you don’t have the DevConData19 file open you may be prompted to enter full access account details to authorise access
    1. username: Administrator
    2. password: DevCon19
  7. Create a layout based on the contacts table. Call it ContactsAPI. Add some fields to the layout, make sure you add at least the fields below, but you can include others if you wish.
    1. Title
    2. First
    3. Last
    4. Company
    5. Job Title
    6. Photo Container

    Don’t worry about styling this layout – the only person who’s ever going to see this file, or this layout is you!

  8. Next we’re going to create two user accounts, both of which have the fmrest extended privilege. It doesn’t matter what you call the accounts, but they will have quite different privileges. I’d suggest YourInitialsFullAccess and YourInitialsReadOnly, e.g. SJWFullAccess and SJWReadOnly. We’ll also create privilege sets to go with these accounts, let’s start there.
  9. Create a new privilege set called DataAPI - Full access and set the permissions like this:
  10. Create a second new privilege set called DataAPI - Read only and set the permissions like this:

    You’ll note that there are custom privileges for the layouts setting. This is what they need to be (if there are other layouts in your file set them to no access – the goal here is that this account can hardly do anything!
  11. Now create your full access and read only accounts and link them to the appropriate privilege set. Make sure you record or remember the passwords for these accounts – you’re going to need them later! You should end up with something which looks like this:
  12. Finally, open the data file DevCon19Data from the server (see above for credentials) and create identical named accounts, with identical passwords and privilege sets – this is the only (slight) drawback of using data separation – the need to create accounts and privileges in every linked file.

< Back to introOn to activity two >

Leave A Comment