1 2 3 4 Previous Next 46 Replies Latest reply on Mar 7, 2016 7:13 PM by douglerner

    Question about APIs into a Filemaker server

    douglerner

      Currently we have an XML-RPC API running to a third-party server (which we call "the interchange") which received data updates from a non-FM community server we run. That data is then "massaged" and batched and sent on to Zoho.

       

      This solution has not worked out well (between the interchange and Zoho), which is why we are changing to give FM a try. The FM developer we work with has been quite good on setting up nice layouts and relations between tables and search features and export features, etc.

       

      Currently all the data is imported from Excel or CSV files.

       

      But some data will need to be updated in real-time as changes occur on our non-FM server.

       

      My question is, what is the best API interface for doing that with an FM server? I misunderstood and thought that XML Publishing meant some sort of interface to allow sending data via API calls to the FM server. But now I understand it's not that at all. It just a way of making data inquiries and getting XML back.

       

      I also understand that FM has no XML-RPC feature natively, but that there are various plugins which might help with this.

       

      Our current server is a NoSQL object-oriented database, so a solution involving SQL would not help. Our server is also not a PHP-based server. But we do have native XML-RPC functionality and also can make HTTP GET and POST requests from the server.

       

      Any suggestions? If there was an XML-RPC interface that would be fantastic because then I could leverage all my current API code. Other good choices would be a REST API I suppose.

       

      Thanks,

       

      doug

        • 1. Re: Question about APIs into a Filemaker server
          bigtom

          Some NoSQL databases support ODBC. Could this be an option?

          • 2. Re: Question about APIs into a Filemaker server
            douglerner

            bigtom wrote:

             

            Some NoSQL databases support ODBC. Could this be an option?

            Unfortunately not. Are there other alternatives?

             

            Thanks,

             

            doug

            • 3. Re: Question about APIs into a Filemaker server
              bigtom

              If you do not have a PHP web service(running on any server) to manage this with the FM PHP-API and you cannot use ODBC have you looked at RESTfm | FileMaker RESTful Web Service

              • 4. Re: Question about APIs into a Filemaker server
                douglerner

                bigtom wrote:

                 

                If you do not have a PHP web service(running on any server) to manage this with the FM PHP-API and you cannot use ODBC have you looked at RESTfm | FileMaker RESTful Web Service

                I could always set up an additional, inexpensive PHP server just to act as a go-between between our community server and some FM PHP-API. I've set up extra PHP servers to act as a go-between before, such as with the LinkedIn API. So I will check out FM PHP-API and also check out RESTfm.

                 

                Thanks,

                 

                doug

                • 5. Re: Question about APIs into a Filemaker server
                  beverly

                  True, bigtom! what many may not know is that if you have an ODBC source that is NOT a standard that can be used for ESS (external sql source), then with the proper driver some of those sources can use the script steps:

                   

                  Import (for SELECT)

                  ExecuteSQL (for INSERT, UPDATE, DELETE)

                   

                  This is NOT a near-real-time connection between FM and the sources, but in some cases is quite sufficient. It was the method I used long before there was an ESS set of "approved" dbs.

                   

                  beverly

                  • 6. Re: Question about APIs into a Filemaker server
                    monkeybreadsoftware

                    Plugins may only help in a limited way.

                    As plugins can't run in background on server and do things (idle event is not called by FM Server for plugins), they can't wait there.

                     

                    I do have a MBS Plugin example which runs a script with a loop to check for incoming socket activity.
                    This way the script can answer queries coming in by TCP Socket.

                    Of course this could be a XML-RPC request. But I normally would so simpler things like just send a one word command.

                    Than the script could do SQL query and dump result to socket back.

                    • 7. Re: Question about APIs into a Filemaker server
                      douglerner

                      But the RESTfm code mentioned above would accept calls and communicate with the FM server, right?

                       

                      doug

                      • 8. Re: Question about APIs into a Filemaker server
                        nickorr

                        Doug,

                         

                        Yes that's the intention of RESTfm : the situation where you have other applications that want to talk to FileMaker in real time via Web Services.

                         

                        Cheers,

                        Nick

                        • 9. Re: Question about APIs into a Filemaker server
                          wimdecorte

                          douglerner wrote:

                          I misunderstood and thought that XML Publishing meant some sort of interface to allow sending data via API calls to the FM server. But now I understand it's not that at all. It just a way of making data inquiries and getting XML back.

                           

                          Back to the beginning because this statement is NOT true.

                           

                          Using the XML API you can construct simple URLs and send data to FMS, create records, even run scripts.

                           

                          Yes, you will always get XML back but if you are creating records or modifying records (thus sending data TO FMS) then the XML is just confirmation of what you have sent and any errors.

                          • 10. Re: Question about APIs into a Filemaker server
                            wimdecorte

                            What is: a GET request (GET does not mean only getting data from the server, it can also send data).

                             

                            What is not: POST, SOAP, RESTful... for that you need additions like RESTfm, etc.

                            • 11. Re: Question about APIs into a Filemaker server
                              douglerner

                              Right, of course. A GET request passes it's parameters via the URL and a POST request passes it's parameters in headers, as though you had submitted a form.

                               

                              But my developer says XML Publishing is not suitable for the kinds of requests we need to make because it is not passing XML *to* the FM server, as with XML-RPC. In other words, the "publishing" is out from the FM server, not in, or both ways, like with XML-RPC. So it doesn't seem suitable for what we are doing.

                               

                              He isn't recommending RESTfm either. I don't know why, but he said that it unnecessarily exposes all the database records when we really need only access to a few. So he is deploying his own REST solution so I can make customized calls to that and just update the data I need to.

                               

                              Thanks,

                               

                              doug

                              • 12. Re: Question about APIs into a Filemaker server
                                wimdecorte

                                douglerner wrote:

                                 

                                But my developer says XML Publishing is not suitable for the kinds of requests we need to make because it is not passing XML *to* the FM server,

                                 

                                That doesn't make sense / he does not know what is talking about.

                                 

                                Nobody ever claimed that the FMS XML API is about passing XML to FMS.  The whole point is that you can construct a URL to talk to FMS and it will return XML.

                                 

                                But the point that your developer seems to miss is that the instructions included in the URL run the whole gamut of:

                                - asking for data / finding data

                                - creating new records

                                - updating existing records

                                - running scripts on FMS

                                 

                                https://fmhelp.filemaker.com/docs/14/en/fms14_cwp_guide.pdf

                                page 11 to start with.

                                page 42 for the full breakdown of all the URL parameters

                                • 13. Re: Question about APIs into a Filemaker server
                                  wimdecorte

                                  douglerner wrote:

                                   

                                  He isn't recommending RESTfm either. I don't know why, but he said that it unnecessarily exposes all the database records when we really need only access to a few. So he is deploying his own REST solution so I can make customized calls to that and just update the data I need to.

                                   

                                   

                                  Really?  Why wouldn't he be able to explain better?

                                  Access to the records is governed by security, not by technology...

                                  • 14. Re: Question about APIs into a Filemaker server
                                    douglerner

                                    wimdecorte wrote:

                                     

                                    douglerner wrote:

                                     

                                    But my developer says XML Publishing is not suitable for the kinds of requests we need to make because it is not passing XML *to* the FM server,

                                     

                                    That doesn't make sense / he does not know what is talking about.

                                     

                                    Nobody ever claimed that the FMS XML API is about passing XML to FMS.  The whole point is that you can construct a URL to talk to FMS and it will return XML.

                                     

                                    But the point that your developer seems to miss is that the instructions included in the URL run the whole gamut of:

                                    - asking for data / finding data

                                    - creating new records

                                    - updating existing records

                                    - running scripts on FMS

                                     

                                    https://fmhelp.filemaker.com/docs/14/en/fms14_cwp_guide.pdf

                                    page 11 to start with.

                                    page 42 for the full breakdown of all the URL parameters

                                     

                                    Right now we have an XML-RPC API to a different, non-FM server. It sends data that really isn't suitable to send via a URL. It's easiest to send as structured XML data. It might be ok to send using a REST API. But it really isn't suitable to send as a GET request (i.e. via a URL).  I believe that's what my developer meant when he gave the opinion that XML publishing is not suitable for the kinds of requests we need to the FM server.

                                     

                                    If the XML Publishing can do everything, why was the RESTfm API developed?

                                     

                                    Thanks,

                                     

                                    doug

                                    1 2 3 4 Previous Next