URL Syntax for Web Access to FileMaker Data
FileMaker can provide data in XML format in two ways: via the Export As XML feature in the regular FileMaker client, and via URL-based access requests sent directly to databases hosted via FileMaker Server Advanced.
A URL designed to extract data from FileMaker Server Advanced has two components: a resource name, and a query string. This section demonstrates the correct syntax for resource names within a URL. The query string is made up of potentially many commands and parameters: later sections of this chapter discuss those in more detail.
For more information on the structure of query requests, see "Query Parameters for XML/XSLT URL Requests," later in this chapter. |
URL Syntax for XML Access
In order to extract data from FileMaker Server Advanced in XML format, a URL of the following form is used:
:// ]/fmi/xml/ is either http (for regular HTTP access) or https (for secure HTTP access). need only be specified if the web server has been configured to run on a port other than the default for the specified protocol (80 for HTTP, 443 for HTTPS). Example: http://my.filemakerserver.net:8080/fmi/xml/fmresultset.xml?-dbnames This query will access a server running on port 8080 on the machine my.filemakerserver.net, and will request a list of all databases available for XML access on that server, with the results returned in the fmresultset grammar.
FileMaker Server Advanced has a special URL syntax for accessing data in container fields. Such a request will cause the container data to be returned directly (much like clicking on a PDF link in a web page). The exact mechanism depends on whether the container data is stored directly in the database, or stored by reference. In order to extract container data stored directly in a FileMaker database, a URL of the following form is used: :// ]/fmi/xml/cnt/data. , , and The query string must contain a field query parameter with a fully qualified field name, meaning it must contain a repetition index number reference even if the field is not a repeating field. Example: http://my.filemakerserver.net:8080/fmi/xml/cnt/data.tiffgif?-db=Customers&-lay=web_search&-field=photo[1]&-recid=303 This URL will extract container data from a specific field (called photo) from the record with recid=303. Even though photo is not a repeating field, the syntax photo[1] is still necessary. The web server will return this container data as GIF data, assuming the .gif suffix is correctly mapped to the TIFF MIME type on the server. For information on how to manage container data when the container data is stored only by reference, please see the FileMaker Server Custom Web Publishing Documentation.
When extracting XML data from FileMaker Server Advanced, its also possible to apply an XSLT stylesheet in order to transform the XML into something else, such as an HTML page. The syntax for XSLT access is as follows: :// ]/fmi/xsl/ / , , and element is optional. Without it, the Web Publishing engine will look for the specified stylesheet within the xslt-template-files directory on the web server. If you wish to create additional directory structures within the xslt-template-files folder, the relative path to the stylesheet must be specified here. Example: http://my.filemakerserver.net/fmi/xsl/customer-files/customer_list.xsl?-db=Customer&-lay=list&-max=50&-findall
URL Syntax for Access to Container Objects
URL Syntax for XSLT Access
Категории