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/.xml?

  • is either http (for regular HTTP access) or https (for secure HTTP access).
  • is the hostname or the IP address of the web server thats been configured with FileMaker Server Advanced. (Note that if the web server is on a machine other than the FileMaker Server, its the address of the web server that must be used here, not that of the FileMaker Server machine.)
  • 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).
  • is the name of one of the four valid FileMaker XML grammars, discussed in the next section.
  • is a query string composed of some number of query parameters in combination with a query command. Specifics are discussed in upcoming sections.

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.

URL Syntax for Access to Container Objects

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 are as described in the previous section.
  • is the file type extension for the container data being fetched (.jpg, .txt, and the like). This extension allows the web server to set the MIME type of the data correctly.

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.

URL Syntax for XSLT Access

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//.xsl?

  • , , , and are as described in the previous sections.
  • The 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.
  • is the name of the stylesheet that will be applied to the XML data.

Example:

http://my.filemakerserver.net/fmi/xsl/customer-files/customer_list.xsl?-db=Customer&-lay=list&-max=50&-findall



: FileMaker Specifications

FileMaker 8 Product Line

Specifications and Storage Limits

Field Types and Import/Export Formats

: Calculation Functions

Working with Calculations Primer

Calculation Signatures

Calculation Functions

: Custom Functions

Custom Functions Primer

Useful Custom Functions

: Script Steps

Scripting Primer

Script Step Reference

: Quick Reference

FileMaker Error Codes

FileMaker Keyboard Shortcuts

FileMaker Network Ports

FileMaker Server Command Line Reference

FileMaker XML Reference

: Other Resources

Where to Go for More Information



FileMaker 8 Functions and Scripts Desk Reference
FileMaker 8 Functions and Scripts Desk Reference
ISBN: 0789735113
EAN: 2147483647
Year: 2004
Pages: 352

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net