easy-fm is a Node.js client for Claris FileMaker Data API.
It helps you connect Node.js code to FileMaker Server or FileMaker Cloud so you can fetch records, run finds, edit data, work with portals, and run scripts using a typed JavaScript or TypeScript API.
This repository uses a pnpm workspace. The publishable package lives in
packages/easy-fm; root scripts delegate to that workspace package.
22+fmrest privilegeClaris Data API reference:
help.claris.com/en/data-api-guide/content/index.html
npm install @jd-data-limited/easy-fm
import { Database, DataApiProvider } from '@jd-data-limited/easy-fm';
const database = Database.create({
provider: new DataApiProvider({
hostname: 'https://example.com',
database: 'Contacts',
credentials: {
method: 'filemaker',
username: 'api-user',
password: 'secret',
},
externalSources: [],
}),
});
const layout = database.layout('Contacts_API');
const records = await layout.records
.list({
portals: {},
limit: 25,
})
.fetch();
for (const record of records) {
console.log(record.fields.FirstName.value, record.fields.LastName.value);
}
recordId and modId are internal FileMaker IDs. Avoid treating recordId as a
business ID; modId can still be useful for change or concurrency checks.Updating from v4 to v5? Check the guide here;
docs/upgrade-to-v5.md
Start here:
docs/getting-started.md: first connection, first find,
closing sessionsdocs/core-concepts.md: host, database, layout, record,
portal, IDsTask guides:
docs/working-with-records.md: list, create, update,
duplicate, delete, portal rowsdocs/query-recipes.md: find requests, sorting, paging,
script hooksdocs/authentication-and-sessions.md: auth
modes, pooling, lifecycledocs/provider-api.md: custom transports and provider
sessionsdocs/typescript-layouts.md: typed layouts and stronger
autocompletedocs/testGuide.md: local test commandsAPI reference:
docs_out/index.html: generated TypeDoc sitenpm run docs:build
npm test
npm run test:unit
npm run test:integration
Integration tests require a working FileMaker environment and credentials.