These methods are client.login() and client.logout(). The client contains two methods related to Data API sessions. The client will always attempt to reuse a valid token whenever possible. The Data API session is also monitored, updated, and saved as the client interacts with the Data API. If a new session is required the client will authenticate and generate a new session or queue requests if the session limit has been reached. The client will automatically handle creating and closing Data API sessions. The concurrency limit is set when a client is created. The client will open and use a new session up to the configured concurrency limit. This functionality is designed to prevent session collisions. The client will ensure that a session is not in use or expired before it uses a session token in a request. The client will automatically queue a requests to the FileMaker Data API if there are no available sessions to make the request. examples/results/create-many-records-example.json Request Queue All public methods on the client return promises.įile. The Filemaker.find(query) will return either an empty array or an array of clients. The Filemaker.findOne(query) method will return either one client or null. The Filemaker.find(query) or Filemaker.findOne(query) methods can be used to recall clients. Client UseĪ client can be used after it is created and saved or recalled from the datastore. Any client removed using the the leteOne(query) method or the leteMany(query) method will not log out before being destroyed. Note Only the stroy() method will close a FileMaker session. then ( client => utilities ( client ) )Ī client can be removed using either the stroy() method, the leteOne(query) method or the leteMany(query) method. then ( client => authentication ( client ) ). The custom script parameter follows the following syntax:Ĭonst ). Where appropriate and useful the client also allows additional parameters. The client supports the same parameter syntax as is found in the Data API Documentation. For more information on the utility modules see the utilities section. These utilities will accept and return either an object or an array objects. The provided utility modules are fieldData, recordId, containerData, and transform. The client also provides utility modules to aid in working with FileMaker Data API Results. For more information on Data API Session handling see the request queue section. This behavior prevents request session collisions. The client will attempt ensure that each request to the Data API is made with an valid token which is not in use. The client can be configured with a concurrency setting. The client will queue concurrent requests to the Data API. All messages and codes follow the FileMaker Data API codes where applicable. Additionally, if a script result is valid JSON it will be automatically parsed for you by the client.Īll methods on the client return promises and each method will reject with a message and code upon encountering an error. The client will also automatically convert limit, find, and offset parameters into their underscored conterparts as needed. The limit and offset parameters can be either strings or a numbers. In addition to the expanded syntax the client will also automatically parse arrays, objects, and numbers to adhere to the requirements of the Data API. For more information on the syntax supported by the client see the parameter syntax section. Find queries can be defined as either an object or an array. Scripts and portals can be defined as arrays. The client also allows for an expanded parameter syntax designed to make interacting with the client easier. For more information on Data API Session handling see the Data API sessions section.Īll client methods accept parameters as defined by FileMaker. To remove a client from a datastore and log out a session call stroy(). If required, clients can also manually open or close their FileMaker sessions by calling either the client.login() method or the client.logout() method. For more information about datastore configuration see the datastore connection section and the marpat project.Įach client committed to the datastore will automatically handle Data API Sessions. The client uses a lightweight datastore to hold Data API connections. This client attempts to follow the terminology and conventions used by FileMaker wherever possible. Much ❤️ to FileMaker for their work on the Data API. The fms-api-client is a wrapper around the FileMaker Data API. Npm install -save fms-api-client Usage Introduction This client abstracts the FileMaker 17 & 18 Data API into class based methods.įms-api-client documentation Table of Contents A FileMaker Data API client designed to allow easier interaction with a FileMaker database from a web environment.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |