Curl Is Required To Use The Filemaker Api.
FileMaker OneDrive Integration OneDrive and Microsoft Office 365 is one of the most popular business software packages and services on the planet. Its reach has expanded 238% since 2014 and 81% since 2016. And with the Microsoft OneDrive API, integrating has never been easier. OneDrive is excelle.
FileMaker 16 Overview A new and exciting version of the FileMaker platform is here! 2017 marks over 32 years in business for FileMaker. In a collection of articles, we review what’s new in the FileMaker platform, specifically the features for FileMaker Pro 16, FileMaker Server 16, FileMaker Go 16, FileMaker WebDirect 16, and FileMaker Cloud. While cURL options are set to: File access isn't supported with cURL in FileMaker, so store the trace in a variable: -trace-ascii.
so I've looked around everywhere to try and figure out the problem to this, but I haven't really been able to piece it together. With the recent FM 16 arrival we have gained cURL functionality, which before I was just using a simple PHP script to do all of the processing and the importing to FileMaker using the API.
I'm trying to convert this:
Filemaker Curl Examples
And my cURL options in FileMaker looks like this:
'--request POST' & '--data surveyId=$surveyID & format=csv & useLabels=true' & '--header 'X-API-TOKEN: $apiKey' & '--header 'Content-Type: application/json'
But all I get is a response from that server that says it doesn't understand my call.
1 Answer
Posting a quick reply away from my machine, but you need to split up your strings and variables. Like this : ...surveyId=' & $surveyID & 'format=...
I haven't looked at the rest of the syntax yet.
EDIT:
To see what the final call that gets passed is, you should prepare everything and store it in a variable which you then pass as cURL options. If you have FileMaker Pro Advanced you can use the Data Viewer to check the variable for errors. If not, you can put a global variable on a layout as a merge variable to see it's content after you run a script.
A script step to set the variable should be something like this:
Set Variable $myHeader (or $$myHeader if you want to examine it outside the script)
(You may have defined the $surveyID and $apiKey variables elsewhere.)
After fixing your call I get this from the above calculation: