PHPackages                             myfmbutler/myfmapilibrary-for-js - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. myfmbutler/myfmapilibrary-for-js

ActiveLibrary[API Development](/categories/api)

myfmbutler/myfmapilibrary-for-js
================================

(Claris) FileMaker 19 API Javascript wrapper

2.0.0(6y ago)9368[1 issues](https://github.com/myFMbutler/myFMApiLibrary-for-JS/issues)gpl-3.0JavaScript

Since Aug 7Pushed 6y ago1 watchersCompare

[ Source](https://github.com/myFMbutler/myFMApiLibrary-for-JS)[ Packagist](https://packagist.org/packages/myfmbutler/myfmapilibrary-for-js)[ RSS](/packages/myfmbutler-myfmapilibrary-for-js/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

Lesterius (Claris) FileMaker 19 Data API wrapper - myFMApiLibrary for Javascript
================================================================================

[](#lesterius-claris-filemaker-19-data-api-wrapper---myfmapilibrary-forjavascript)

Presentation
============

[](#presentation)

Team
----

[](#team)

[Lesterius](https://www.lesterius.com "Lesterius") is a European Claris (FileMaker) Business Alliance Platinum member that operates in Belgium, France, the Netherlands, Portugal and Spain. We are creative business consultants who co-create FileMaker Platform based solutions with our customers.
Sharing knowledge takes part of our DNA, that's why we developed this library to make the FileMaker Data API easy-to-use with Javascript.
Break the limits of your application!
[![Lesterius logo](https://camo.githubusercontent.com/386f3e0002c229b9c44489b4263a77571822fe7fef7e0089367dbaf43ba7698b/687474703a2f2f69312e63726561746573656e64312e636f6d2f65692f722f32392f4433332f4446462f3138333530312f637366696e616c2f4d61696c696e675f4c65737465726975732d6c6f676f2e706e67 "Lesterius")](https://camo.githubusercontent.com/386f3e0002c229b9c44489b4263a77571822fe7fef7e0089367dbaf43ba7698b/687474703a2f2f69312e63726561746573656e64312e636f6d2f65692f722f32392f4433332f4446462f3138333530312f637366696e616c2f4d61696c696e675f4c65737465726975732d6c6f676f2e706e67)

Description
-----------

[](#description)

This library is a Javascript wrapper of the (Claris) FileMaker Data API 19.

You can find the PHP wrapper of the FileMaker Data API 18 [here](https://github.com/myFMbutler/myFMApiLibrary-for-PHP)

You can find the Javascript wrapper of the FileMaker Data API 18 on the releases &lt;= v.1.\* .

You will be able to use every functions like it's documented in your FileMaker server Data Api documentation (accessible via https://\[your server domain\]/fmi/data/apidoc). General Claris document on the Data API is available [here](https://help.claris.com/en/data-api-guide/)

Installation
------------

[](#installation)

The recommended way to install it is through [Composer](http://getcomposer.org).

```
composer require myfmbutler/myfmapilibrary-for-js
```

After installing, you can call this javascript library by adding:

```

```

In your html file.

Usage
=====

[](#usage)

Prepare your FileMaker solution
-------------------------------

[](#prepare-your-filemaker-solution)

1. Enable the FileMaker Data API option on your FileMaker server admin console.
2. Create a specific user in your FileMaker database with the 'fmrest' privilege
3. Define records &amp; layouts access for this user

Use the library
---------------

[](#use-the-library)

### Login

[](#login)

Login with credentials:

```
let options = {
        'apiUrl': 'https://test.fmconnection.com/fmi/data',
        'databaseName' : 'MyDatabase',
        'login' : 'filemaker api user',
        'password' : 'filemaker api password'
    };

let api = new DataApi(options);
```

Login with oauth:

```
let options = {
        'apiUrl': 'https://test.fmconnection.com/fmi/data',
        'databaseName' : 'MyDatabase',
        'oAuthRequestId' : 'oAuthIdentifier',
        'oAuthIdentifier' : 'oAuthIdentifier'
    };

let api = new DataApi(options);
```

Use only generated token:

```
let options = {
        'apiUrl': 'https://test.fmconnection.com/fmi/data',
        'databaseName' : 'MyDatabase',
        'token' : 'generated token'
    };

let api = new DataApi(options);
```

To re generate a token, use 'login' function.

*/!\\* **Not available with 'Login with token' method, use 'setApiToken' function.**

### Logout

[](#logout)

```
dataApi.logout();
```

### Validate Session

[](#validate-session)

```
dataApi.validateSession();
```

### Create record

[](#create-record)

```
let data = {
    'FirstName'         : 'John',
    'LastName'          : 'Doe',
    'email'             : 'johndoe@acme.inc'
};

let scripts = [
    {
        'name'  : 'ValidateUser',
        'param' : 'johndoe@acme.inc',
        'type'  : SCRIPT_PREREQUEST
    },
    {
        'name'  : 'SendEmail',
        'param' : 'johndoe@acme.inc',
        'type'  : SCRIPT_POSTREQUEST
    }
];

let portalData = {
  'portalName or OccurenceName' : [
      {
          "Occurence::PortalField 1" : "Value",
          "Occurence::PortalField 2" : "Value",
      }
  ]
 };

let recordId = dataApi.createRecord('layout name', data, scripts, portalData);
```

### Delete record

[](#delete-record)

```
dataApi.deleteRecord('layout name', recordId, script);
```

### Edit record

[](#edit-record)

```
  let recordId = dataApi.editRecord('layout name', recordId, data, lastModificationId, portalData, scripts);
```

### Duplicate record

[](#duplicate-record)

```
  let recordId = dataApi.duplicateRecord('layout name', recordId, scripts);
```

### Get record

[](#get-record)

```
let portals = [
    {
        'name'  : 'Portal1',
        'limit' : 10
    },
    {
        'name'   : 'Portal2',
        'offset' : 3
    }
];

let record = dataApi.getRecord('layout name', recordId, portals, scripts);
```

### Get records

[](#get-records)

```
let sort = [
    {
        'fieldName' : 'FirstName',
        'sortOrder' : 'ascend'
    },
    {
        'fieldName' : 'City',
        'sortOrder' : 'descend'
    }
];

let record = dataApi.getRecords('layout name', sort, offset, limit, portals, scripts);
```

### Find records

[](#find-records)

```
let query = [
    {
        'fields'  : [
            {'fieldname' : 'FirstName', 'fieldvalue' : '==Test'},
            {'fieldname' : 'LastName', 'fieldvalue' : '==Test'},
        ],
        'options' : {'omit': false}
    }
];

let results = dataApi.findRecords('layout name', query, sort, offset, limit,  portals, scripts, responseLayout);
```

### Set global fields

[](#set-global-fields)

```
let data = {
  'FieldName1'	: 'value',
  'FieldName2'	: 'value'
};

dataApi.setGlobalFields('layout name', data);
```

### Execute script

[](#execute-script)

```
dataApi.executeScript('script name', scriptsParams);
```

### Upload file to container

[](#upload-file-to-container)

```
dataApi.uploadToContainer('layout name', recordId, containerFieldName, containerFieldRepetition, file);
```

### Metadata Info

[](#metadata-info)

#### Product Info

[](#product-info)

```
dataApi.getProductInfo();
```

#### Database Names

[](#database-names)

*/!\\* **Not available with 'Login with token' method**

```
dataApi.getDatabaseNames();
```

#### Layout Names

[](#layout-names)

```
dataApi.getLayoutNames();
```

#### Script Names

[](#script-names)

```
dataApi.getScriptNames();
```

#### Layout Metadata

[](#layout-metadata)

```
dataApi.getLayoutMetadata('layout name', recordId);
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~306 days

Total

2

Last Release

2212d ago

Major Versions

1.0.0 → 2.0.02020-06-09

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/39915415?v=4)[Lucie Guilbert](/maintainers/lguilbert)[@lguilbert](https://github.com/lguilbert)

---

Top Contributors

[![lguilbert](https://avatars.githubusercontent.com/u/39915415?v=4)](https://github.com/lguilbert "lguilbert (1 commits)")

---

Tags

apicomposerfilemakerjavascriptwrapper

### Embed Badge

![Health badge](/badges/myfmbutler-myfmapilibrary-for-js/health.svg)

```
[![Health](https://phpackages.com/badges/myfmbutler-myfmapilibrary-for-js/health.svg)](https://phpackages.com/packages/myfmbutler-myfmapilibrary-for-js)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
