Jump to content
  • entries
  • comments
  • views

myFMbutler — myFMApiLibrary for Javascript, one library to rule them all, again

Marina Syhanath



myFMbutler — myFMApiLibrary for Javascript, one library to rule them all, again

The Lesterius Team has developed a Javascript library to make the FileMaker Data Api 18 easier to use.

Lesterius co-creates FileMaker Platform based solutions with their customers. Sharing knowledge is in our DNA, that’s why we developed this library to make the FileMaker Data API easy-to-use with Javascript.

1*mLxQxlp3TbGBiyJY3d60Cw.jpegPhoto by Artem Beliaikin on Pexels

Why do we provide a wrapper while the data REST API already works?

To make it simple.

In our library, we’ve already coded all cURL requests. You don’t need to read the FileMaker Data API documentation to make it work, you just have to follow our documentation. Readable by every Javascript developer, you can use it even if you don’t know anything about FileMaker. Even better: this library doesn’t have any dependencies, just add it in a webViewer and start using it! Download it and it’s ready.

Go to our GitHub and download it or do a composer install:

composer require myfmbutler/myfmapilibrary-for-js

See how to enable FileMaker Data Api on your FileMaker Server with this video, then create a user with the fmrest privilege and allow them to access your target data and layouts.

Here is an example that shows how to find records with credentials method login (if you’re using WebDirect, please, use the token method for more security):

<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>My html page</title>
<script src="DataApi.js"></script>
<script type="text/javascript">
let apiURL = "https://test.fmconnection.com/fmi/data";
let login = "User";
let password = "password";
let databaseName = "MyDatabase";
let layoutName = "My Layout";
      console.log("Login to the FileMaker Server");
      let options = {
'apiUrl': apiURL,
'databaseName' : databaseName,
'login' : login,
'password' : password
      let api = new DataApi(options);
      console.log("Find records");
      let search = [
'fields' : {'fieldname': 'First Name', 'fieldvalue': '==John'},
'options' : {'omit': false}
      let sort = [
'fieldName': 'First Name',
'sortOrder': 'ascend'
'fieldName':'Last Name',
      // My results are here
console.log(api.findRecords(layoutName, search, sort));

Enjoy! You can also see all the examples in the readme here.

What’s the difference with others libraries?

  • No depencies
  • One file only
  • A “token method” for login (WebDirect usage)
  • Ready for FileMaker 18
  • Readable by every developer, even beginners

Free download

Download the latest version and documentation from GitHub.


myFMbutler — myFMApiLibrary for Javascript, one library to rule them all, again was originally published in Lesterius on Medium, where people are continuing the conversation by highlighting and responding to this story.

Afficher la totalité du billet



Recommended Comments

There are no comments to display.

Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...