filesoft.Discuss a project
← Practical FileMaker guides

APIS

Prepare an API request in FileMaker.

Turn a simple GET request into FileMaker URL and cURL calculations, then inspect errors, response headers and JSON.

Filesoft ·

Before connecting FileMaker to a service, separate the request into its parts: where it goes, what it asks for, and what you expect back. Start with a read-only GET request in the service’s sandbox.

This walkthrough prepares a fictional contact search. It does not call a live API. You will replace the example address with a test endpoint you control when you are ready to run it in FileMaker.

1. Describe the request.

Suppose a service accepts a name query parameter and returns JSON. These are our practice settings, not a specification for an existing service:

Practice request

Method: GET
URL: https://api.example.com/contacts
Query parameter: name = Maya Chen
Header: Accept = application/json
Authentication: None
Body: None

For your actual service, read its API documentation first. Confirm the endpoint, permitted method, query names and authentication. A GET request usually retrieves information, but only the service documentation can establish its behavior.

2. Enter the settings in the builder.

Open the cURL builder. Enter the URL without the query, add the name parameter with the unencoded value Maya Chen, and add the Accept header. Leave the body empty.

The generated URL should contain name=Maya%20Chen. Entering Maya%20Chen as a new parameter value would encode the percent sign again. Existing escapes in the URL itself are preserved by the builder.

Set a connection timeout and total timeout appropriate for your service; 10 and 30 seconds are reasonable practice values. Leave redirects off for this exercise. Generate the calculations. The builder prepares text locally and sends no API request.

3. Put each output in the right place.

Open a working copy of your FileMaker file. Recreate the generated setup guide in Script Workspace: the text guide cannot be pasted as a native script.

  1. Use the generated URL calculation for the URL value.
  2. Use the cURL calculation for Specify cURL options.
  3. Use the response variable named in the guide as the target.
  4. Keep Select entire contents and Verify SSL Certificates on, and Automatically encode URL off for the builder’s encoded URL.
  5. Keep the generated error-capture step immediately after Insert from URL.

Do not paste a whole terminal curl command into Specify cURL options. FileMaker accepts a supported set of options as a calculation. See Insert from URL and supported cURL options.

4. Check three things after the request.

Replace the fictional address with your controlled test endpoint before running. If authentication is required, use the builder’s FileMaker-variable mode and set the variable securely in your own file. Never publish a real token in an example or screenshot.

  • FileMaker error information: inspect the captured code and detail before another step obscures them.
  • HTTP response: enable response-header capture in the builder and inspect the status returned by the service. A zero FileMaker error does not, by itself, prove application success.
  • Response body: check the service’s expected structure. If it is JSON, copy a fictional or redacted response into the JSON formatter.

Use the captured status and body together: a response that formats as valid JSON can still be an API error message. Do not create or update FileMaker records until your script has confirmed the expected result.

If the request does not work

For an authentication failure, check token scope and expiration in the service’s documentation. For a missing endpoint, check the URL and API version. For a timeout, check connectivity and the endpoint before increasing the limit. Keep certificate verification enabled when investigating TLS errors.

The builder cannot verify credentials, runtime variable values or the remote service. Its generated guide uses Get ( LastErrorDetail ) alongside Get ( LastError ). Review the generated steps in your installed version and test in each target environment before deployment.

PUT IT INTO PRACTICE

Try it with Filesoft.

Open the cURL builder

Want a guided learning path? Explore the free FileMaker courses.

Continue reading

Reference: Insert from URL · Supported cURL options. Examples are learning aids; check them in your own FileMaker working copy.