Overview

Extension MIME type Description
.html text/html A handy format for browsing resources and navigating URIs during development.
.txt text/plain A direct representation of RESTfm's internal data structure. Handy for testing and debugging.
.json application/json A complete JSON representation of RESTfm's internal data structure. Input and Output supported.
.xml application/xml A complete XML representation of RESTfm's internal data structure. Input and Output supported.
.simple An easy to parse format for systems without XML and JSON support. Output only.
.fmpxml FileMaker FMPXMLRESULT grammar compliant. Input and Output supported.

Specifying formats

The format may be specified in one of two ways:
  1. By appending the format as a file extension in the URI.
  2. By specifying the MIME type in the HTTP Accept: header.
Note: The file extension method takes precedence over the HTTP Accept: header.
Note: Not every format has an appropriate MIME type (e.g. fmpxml and simple), so only the file extension method is usable.

Both of these cURL CLI invocations specify the format as xml:

curl -i -X GET -u username:password -k "https://localhost/RESTfm/.xml" curl -i -H "Accept: application/xml" -X GET -u username:password -k "https://localhost/RESTfm/" 

Common structure

Native RESTfm formats contain multiple 'sections'. (Non-native formats may not be able to translate all information available in the native formats. e.g. fmpxml).

Section Availability Description
nav Sometimes Contains automatically generated URIs (start, end, next, prev) for easy navigation of paginated results.
data Always The main data arranged in records of field-name / value pairs.
meta Always Record meta data. Typically the FileMaker internal recordID.
metaField Sometimes Field meta data.
FileMaker specific field information such as autoEntered, global, maxRepeat, resultType.
info Always Contains RESTfm and FileMaker status codes, and other information.
multistatus Bulk Operations Any bulk operation error will cause the multistatus section to appear.

Input vs. Output structure

RESTfm uses an identical structure for input and output, this allows unmodified output to be fed directly back into RESTfm.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us