Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About jasonw75

  • Rank
  1. I think I discovered what the latency problem is. When I call the (small) APITarget database from Postman, the response is quite fast (<30ms), but when I then call a script in the main database from APITarget, the first call from Postman takes 10s, due to a very complicated relationship graph in the main database, which apparently must be loaded. I discovered that PSOS doesn't get around that problem, but I'm hoping that an API call might.
  2. Great suggestion, thanks! Would using the FM API to call a script from within FM possibly be faster than PSOS? I'm struggling to find references to the proper syntax for doing that, while embedding the authentication into the call. Thanks!
  3. Hi Wim. If I were to use FMS18, and the GET method to run a script, is there a character limit or other limit on the parameter, if I stringify it? Once typical use would be to pass data to create records, and that data content could be large. Presently, in FMS17, running a POST find, and calling a script works, but takes a few seconds. Thanks!
  4. Hi Wim. Thanks! I found the FMS Data API 18 collection. Is that the one you had in mind? At the moment, we're in FMS17, and not yet able to upgrade to v18. I tried the following POST in Postman: https://{{server}}/fmi/data/v1/databases/{{database}}/layouts/{{layout}}/_find With this body: { "query": [ { "Constant": "1" } ], "script": "SlackNotifyWithParam", "script.param": {{param}} } The variable 'param' is: {"employees":[ { "firstName":"John", "lastName":"Doe" }, { "firstName":"Anna", "lastName":"Smith" }, { "firstName":"Peter", "lastName":"Jones" } ]} And I get the following result: { "messages": [ { "message": "writeString called without a string/Buffer argument: [object Object]" } ], "response": {} } I think I'm pretty close. Do you see what may be wrong here? Thanks!
  5. Thanks, Wim! Is this script endpoint in the Data API different in FMS18 such that it will support this? Or perhaps that might be coming in a future version? The inbound API calls to FM will be from a webserver, not FM. It will likely be passing in a lot of data, so maybe the POST find request would be best. Do you have or know an example of a POST Find call, perhaps in a Postman collection? I hope you're doing well! Thanks again!
  6. Hello. I'm trying to determine proper format for calling a script via API and passing a JSON parameter. I'm running the following as a GET via Postman, targeting FMS17: https://SG-FMS/fmi/data/v1/databases/APITarget/layouts/APIOpen/records/1?script=StoreResults&script.param=TEST The script is called, and receives the parameter 'TEST'. However, using only a GET URL , I'm unable to pass a JSON payload. I'm having trouble finding references to proper syntax for constructing a POST API call to run a script and pass data. Thanks!
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.