kdoronzio / fmrest.php Goto Github PK
View Code? Open in Web Editor NEWPHP class file to support FileMaker Server Data API (REST engine)
Home Page: https://sosimplesoftware.com/fmrest.php
License: MIT License
PHP class file to support FileMaker Server Data API (REST engine)
Home Page: https://sosimplesoftware.com/fmrest.php
License: MIT License
First of all I wanted to thank you for this great piece of code. It did save me a lot of headaches.
I notices there's a difference in the parameters the Filemaker Data API expects and the examples you provided. For the getRecords
function you mention the offset
and range
parameters, but the FM API expects _offset
and _limit
.
Any change this can be edited?
Hello -- Trying to track down the root cause of this issue:
My server applied a patch this morning and afterwards FMREST throws a CURL communication error when trying to call our filemaker server. I ran an undo on the patch and it was working normally again:
Installed rpm-4.11.3-48.el7_9.x86_64 @rhel-7-server-rpms Installed subscription-manager-1.24.52-2.el7_9.x86_64 @rhel-7-server-rpms Installed yum-3.4.3-168.el7.noarch @rhel-7-server-rpms
Packages Altered:
Updated nspr-4.34.0-3.1.el7_9.x86_64 @rhel-7-server-rpms
Update 4.35.0-1.el7_9.x86_64 @rhel-7-server-rpms
Updated nss-3.79.0-5.el7_9.x86_64 @rhel-7-server-rpms
Update 3.90.0-2.el7_9.x86_64 @rhel-7-server-rpms
Updated nss-softokn-3.79.0-4.el7_9.x86_64 @rhel-7-server-rpms
Update 3.90.0-6.el7_9.x86_64 @rhel-7-server-rpms
Updated nss-softokn-freebl-3.79.0-4.el7_9.x86_64 @rhel-7-server-rpms
Update 3.90.0-6.el7_9.x86_64 @rhel-7-server-rpms
Updated nss-sysinit-3.79.0-5.el7_9.x86_64 @rhel-7-server-rpms
Update 3.90.0-2.el7_9.x86_64 @rhel-7-server-rpms
Updated nss-tools-3.79.0-5.el7_9.x86_64 @rhel-7-server-rpms
Update 3.90.0-2.el7_9.x86_64 @rhel-7-server-rpms
Updated nss-util-3.79.0-1.el7_9.x86_64 @rhel-7-server-rpms
Update 3.90.0-1.el7_9.x86_64 @rhel-7-server-rpms
Are you aware of any CURL compatibility issues with recent RHEL updates that I can investigate? I know it wasn't the firewall as I toggled it off and on with no improvement. Are there CURL verify settings I can configure in FMREST?
I am having trouble with getting a timestamp from the API.
The timestamp $timestampBeginn is being created, later on it needs to be fetched again but it's always empty.
Here is snippet of my code:
$dateEnd = new DateTime('NOW');
$dateEnd = $dateEnd->format('Y-m-d H:i:s');
$timestampEnd = strtotime($dateEnd);
$timestampBeginn = $result['response']['data'][0]['fieldData']['timestamp'];
$recordId = $result['response']['data'][0]['fieldData']['recordId'];
$calltime = $timestampEnd - $timestampBeginn;
$record['calltime'] = $calltime;
$dataedit['fieldData'] = $record;
$result = $fm->editRecord($recordId, $dataedit, $layout2);
When being created, the timestamp $imestampBeginn works properly and is shown.
There seems to be no examples for Sorting the found records.
First, Many thanks for your tool. I'm not a developper and I can simply use it for data publication from FM on a website.
But, since few days, I've this error when I open the connection to FM with fmrest :
Result: HTTP/2 stream 0 was not closed cleanly: Unknown error code (err 1)
For the moment, I have solved the problem, thanks to an info on StackOverflow, by adding this line (on line 384):
curl_setopt ($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
(Be careful, I don't know if this is the right thing to do).
Best Regards,
Hey there, I am using your fmRest API since a while and everything works great thanks! However, when I try to use findRecords, I always get this error: Resource doesn't support the specified HTTP verb [code] => 1704
I tried debugging it, looked at your fmrest.php file and so on but never found out what's wrong..
Do you have any idea concerning this topic?
Kind regards
Yassin
Hi,
Thanks for this great php class. I've tweaked it to work with webhooks wherein it stores the session token to a text file on the server rather than a variable in the client's browser (since there wouldn't be a browser session in the case of webhooks).
I've tested and it works, but others may have improvements.
I'm new to Github - is this something you'd like me to post or share back to this repository in some way?
Chris
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.