FileMaker 18 Admin API Guide
About this guide
This guide provides information about using FileMaker Admin API version 2 (v2) to perform administrative tasks on FileMaker Cloud for AWS and FileMaker Server. (To learn about FileMaker Admin API version 1 (v1), see FileMaker Admin API Reference installed with supported products.)
This guide assumes you are experienced with:
- using FileMaker Pro Advanced to upload databases. See FileMaker Pro Advanced Help.
- using FileMaker Server or FileMaker Cloud for AWS to host and manage databases. See FileMaker Server Help, or FileMaker Cloud for AWS documentation in the Product Documentation Center.
- using REST APIs in server-side applications or web services that call POST, GET, PATCH, and DELETE methods with data in JSON format. You can use any programming languages or tools you choose.
- FileMaker Cloud for AWS is a service that provides access in the cloud to custom apps that use FileMaker Pro Advanced, FileMaker Go, and FileMaker WebDirect. FileMaker Cloud for AWS runs on the Amazon Web Services (AWS) Cloud and is offered through AWS Marketplace.
- Admin Console refers to Admin Console for FileMaker Server and FileMaker Cloud for AWS, unless describing a particular product.
- Custom app, solution, database, and file are all terms for what you create and work with using FileMaker products.
- This guide uses access token to refer to the JSON Web Token required for authentication.
About the FileMaker Admin API
The FileMaker® Admin API is an application programming interface (API) that allows web services to perform administrative tasks on FileMaker Cloud for AWS and FileMaker Server. Because this API conforms to Representational State Transfer (REST) architecture, the FileMaker Admin API is a REST API.
To use the FileMaker Admin API:
- Write code that uses FileMaker Admin API calls to perform administrative tasks.
- Test that FileMaker Admin API access is working correctly.
- Monitor your results by reviewing the gateway.log file for FileMaker Cloud for AWS or fac.log for FileMaker Server, where all API calls are logged. You can download the gateway.log file from Admin Console for FileMaker Cloud for AWS. The fac.log file is located in the following folder: .../FileMaker Server/Admin/FAC/logs.
- To access data in hosted databases, see FileMaker Data API Guide.
How a FileMaker Admin API call is processed
Some of the FileMaker Admin API calls, such as authentication calls, are processed only based on the first two steps below. Other calls, such as calls related to creating schedules or updating the configuration, are processed based on all of the steps below.
- A REST API client sends a FileMaker Admin API call (an HTTPS request) to the web server.
- The web server routes the request through the FileMaker Web Server Module to the FileMaker Admin API Engine.
- The FileMaker Admin API Engine converts the HTTPS request (URL and JSON data) into a format compatible with the FileMaker Database Server.
- The Database Server sends results of the request back to the FileMaker Admin API Engine.
- The FileMaker Admin API Engine converts the results into an HTTPS response (URL with JSON data) and passes the response back to the web server.
- The web server sends the HTTPS response to the requesting REST API client.
FileMaker Admin API reference information
FileMaker Admin API Reference is installed with FileMaker Server and FileMaker Cloud for AWS. The reference provides detailed information about all of the calls supported by FileMaker Admin API.
To view the reference for FileMaker Cloud for AWS, enter the following URL in a browser window:
host is the host name or IP address of the virtual server running FileMaker Cloud for AWS.
To access the reference for FileMaker Server:
To view the reference in a browser window on the master machine, enter the following URL:
To view the reference in a browser window on a remote machine, enter the following URL:
On a Windows server, the reference is in the following folder:
[drive]:\Program Files\FileMaker\FileMaker Server\Documentation\Admin API Documentation
where [drive] is the drive on which your FileMaker Server deployment resides.
If you install using a non-default location on Windows, your installation location replaces the beginning of the default installation path:
[drive]:installation_location\FileMaker\FileMaker Server\Documentation\Admin API Documentation
On a macOS server, the reference files are in the following folder:
/Library/FileMaker Server/Documentation/Admin API Documentation
- If you use the URL examples in the Admin API Reference, and you open the reference file from your local drive, all examples start with
file:///. To use the URLs, replace
FileMaker Admin API calls
FileMaker Admin API features
The FileMaker Admin API provides a REST API that you can use to automate some routine administrative tasks through scripting instead of using Admin Console.
The FileMaker Admin API keeps track of the state of interactions. You can start with an authentication call, or use other calls for authentication. You can then use the returned access token for subsequent calls.
The token is valid either until it is invalidated using the Invalidate Access Token call or for 15 minutes after the last call that specified the token. (While the token is valid, each call that specifies the token resets the session timeout counter to zero.)
API calls related to databases and schedule API calls except for the create and edit/run schedule calls are asynchronous and do not wait for a response from FileMaker Cloud for AWS or FileMaker Server. You may want to follow an asynchronous call with a GET call to confirm the file status has changed. For example, follow a close database call with a GET databases call to confirm the database is closed. If the status doesn't change immediately, continue checking.
The rest of the API calls are synchronous and wait for a response from FileMaker Cloud for AWS or FileMaker Server.
Authentication for FileMaker Server or FileMaker Cloud for AWS
FileMaker Admin API uses an access token to define a connection to the host. Use the authentication call to request an access token from the host using the root administrator account name and password. Include an Authorization header with the value Basic base64-encoded string. The base64-encoded string should be generated based on username:password. You can also use the Basic Authentication scheme for other calls.
If you use the Basic Authentication scheme for the authentication call, the request returns the access token in the response body. If you use the Basic Authentication scheme for other calls, the request returns the access token in the X-FM-Access-Token field in the response header.
For subsequent API calls, use the Bearer Authentication scheme and include an Authorization header with the value Bearer access token.
- Each time you use the Basic Authentication scheme to get an access token, a new API session is created. To avoid having multiple API sessions, use the same access token with the Bearer Authentication scheme for all API calls.
List of FileMaker Admin API calls
The following table displays the supported FileMaker Admin API calls for FileMaker Server and FileMaker Cloud for AWS.
|API call||Supported for FileMaker Server||Supported for FileMaker Cloud for AWS|
|Request access token||Yes||Yes|
|Invalidate access token||Yes||Yes|
|Get server status||Yes||No|
|Update server status||Yes||No|
|Get server security setting||Yes||No|
|Update server security setting||Yes||No|
|Get server general settings||Yes||No|
|Update server general settings||Yes||No|
|Perform database operations for all databases||Yes||Yes|
|Perform database operations for a database||Yes||Yes|
|Send message to client||Yes||Yes|
|Create backup schedule||Yes||No|
|Create FileMaker script schedule||Yes||Partial
The sendEmail parameter is not supported.
|Create message schedule||Yes||Partial
The sendEmail parameter and the DB_IN_FOLDER value for the resourceType parameter are not supported.
|Create script sequence schedule||Yes||No|
|Create system script schedule||Yes||No|
|Create verify schedule||Yes||No|
The sendEmail parameter is not supported.
|Update PHP settings||Yes||No|
|Update XML settings||Yes||No|
|Update ODBC/JDBC settings||Yes||No|
|FileMaker Data API|
|FileMaker Data API settings||Yes||Yes|
|Update FileMaker Data API settings||Yes||Yes|
|Web Publishing Engine|
|FileMaker WebDirect settings||Yes||No|
|Update FileMaker WebDirect settings||Yes||No|
|WPE settings for all machines||Yes||No|
|WPE settings for a single machine||Yes||No|
|Update WPE settings||Yes||No|
- The startupRestorationLogPath parameter for FileMaker Server Admin API specifies the folder path for saving restoration logs. For best results, change the restoration log folder location to a separate disk drive.
- FileMaker Cloud for AWS uses the UTC time for the startTimeStamp parameter.
- For filemakerScriptType, you need to provide both the fmScriptAccount and the fmScriptPassword parameters for the script to run.
- If the returned value for the status parameter for the List Databases call is Normal, the database is open.