Introduction
The FMEFlowResourceConnector transformer was deprecated in FME 2025.0. This tutorial demonstrates how to use the HTTPCaller transformer with the FME Flow REST API as an alternative to the FMEFlowResourceConnector.
About the FMEFlowResourceConnector
It is commonly used for:
- Access data stored on FME Flow file storage without using FME Flow
- Manage datasets on FME Flow:
- uploading, downloading, and deleting
- transfer a file's contents, such as XML or raster, into or out of an attribute in FME
- Read downloaded data using the FeatureReader, or upload data written by the FeatureWriter to FME Flow.
Requirements
- FME Form 2025.1+
- FME Flow 2025.1+
- An FME Flow API Token with the necessary permissions (explained below)
- Download ElectricCarTrack.json
As of FME Flow 2025.1, the V3 REST API has been deprecated. The current API will remain accessible, but no new features or general bug fixes will be implemented. Starting with FME Flow 2026.1, the V3 API will be removed. We encourage all users to prepare their systems for this change.
The V4 REST API offers enhanced security and usability, including new and reorganized endpoints, as well as the removal of certain endpoints. For information on migrating from V3 to V4, please see the FME Flow REST API V4 documentation and click on the heading Migrating from REST API V4.
Step-by-Step Instructions
The goal of this tutorial is to retrieve JSON data from FME Flow Resources using REST API calls, process and format it in FME Workbench into a CSV file, and then upload the updated data back to FME Flow, removing the original data.
It contains 5 parts:
Part 1: Obtain the token and prepare the data.
Part 2a: Download and read a data file using FeatureReader.
Part 2b: Alternative to Part 2a - Download and read the data by parsing the JSON response (i.e., the file content) into an attribute.
Part 3: Format and write the data using FeatureWriter, then upload the updated data back to FME Flow.
Part 4: Delete the data in FME Flow.
Part 1: Get Token and Prepare Data
1. Create an API Token
To begin, we will need an API token that grants us the necessary permissions to access the required resource data. From your FME Flow home page, navigate to User Settings in the top-right corner, and select Manage Tokens. Ensure the API Tokens tab is selected, then select Create.
Give your new token a name (e.g., ‘Flow Resources Access API Token’), a description, and set an appropriate expiration date. Under Permissions, navigate to Resources, and select the Create permissions option. Click Save, and then be sure to download your token and save it in a safe location, as this will be your only opportunity to do so.
2. Place Data File in FME Flow Resources
Before we can download data using the HTTPCaller transformer, the data must first be available in FME Flow Resources.
First, download the ElectricCarTrack.json file attached to this article.
Then, in the FME Flow web interface, navigate to Resources > Data. Create a new folder named "Input", then upload the ElectricCarTrack.json file into that folder.
Finally, create another folder named "Output" to write our formatted data here later.
Part 2a: Download and Read Data
1. Create an Attribute for File Path
Create a new workspace in FME Workbench.
If you are using FME 2025.1 and older, please add a Creator transformer to the canvas first.
As of FME 2025.2, many transformers have been updated to not require input from the creator transformer. For a list of all the transformers with this improvement, please see Transformers with an Optional Input Port
Then, add the AttributeCreator transformer and connect it.
Open AttributeCreator and input a new attribute, which will be referenced later in our API request:
- Output Attribute: filepath
- Value: Input/ElectricCarTrack.json
2. Construct an API Request to Download Data from FME Flow Resources
Add an HTTPCaller to the workspace, rename it to HTTPCaller_Download. Connect AttributeCreator to HTTPCaller_Download.
Configure HTTPCaller_Download as follows:
-
Request URL: http://<Your_Flow_URL>/fmeapiv4/resources/connections/FME_SHAREDRESOURCE_DATA/download
- Replace ‘<Your_Flow_URL>’ with the URL for your Flow environment.
- Note that you may need to modify the above request to use HTTPS based on your configuration.
- HTTP Method: GET
-
Query String Parameters:
-
Name: path
-
Value: filepath
- Click the dropdown arrow in the Value field > Select Attribute Value > Choose 'filepath', which is the attribute we created in the last step.
-
Value: filepath
-
Name: path
-
Headers:
-
Name: Authorization
- Value: fmetoken token=<Your_API_Token>
-
Name: Authorization
-
Response Handling:
- Save Response Body To: File
-
Output Filename: <path>\ElectricCarTrack_temp
- Click the ellipsis to choose a temp location for this file
Once you have configured all the necessary parameters, we can test that our HTTP request is working properly by clicking the Send Test Request button. Enter the file path value: Input/ElectricCarTrack.json at the top of the window, then click Send Test Request. The preview window should then display the data.
Once you have confirmed that the request is working, click OK in the request preview window and then click OK again in the parameters window to close it. If your request is not working, double-check that your request URL and token permissions are correct.
3. Read the Temp Data File with FeatureReader
Add a FeatureReader transformer and connect its input port to the HTTPCaller_Download output port. We will use this FeatureReader to read the previously downloaded JSON data from our HTTPCaller into a temporary file.
Configure FeatureReader as follows:
- Format: JSON (JavaScript Object Notation)
-
Dataset: <path>\ElectricCarTrack_temp
- Copy the file path from the Output Filename in the HTTPCaller_Download transformer.
- Feature Type to Read: JSONFeature
Run the workspace up to this point with Data Caching enabled. This allows you to preview the JSON data in a tabular format. This data will be sent back to FME Flow as a CSV file after being formatted.
Part 2b: Download Data and Parse JSON Response into Attribute
This is an alternative approach to Part 2a, where we will download the data into an attribute instead of a temp file. We continue with our workflow after configuring the AttributeCreator.
1. Construct an API Request to Download Data from FME Flow Resources into an Attribute
Since this API call is similar to Part 2a, copy the existing HTTPCaller and rename it to HTTPCaller_DownloadtoAttribute. Connect its input port to the AttributeCreator output port.
Configure HTTPCaller_DownloadtoAttribute as follows:
- Save Response Body To: Attribute
-
Response Body Attribute: _response_body
Click OK.
2. Parse JSON Response
The contents of ElectricCarTrack.json are now stored in the _response_body attribute. Next, we’ll break this JSON response into individual features in FME.
To do this, add a JSONFragmenter transformer to the workspace and connect it to the HTTPCaller output.
Configure JSONFragmenter as follows:
- Input Source: JSON Attribute
- JSON Attribute: _response_body
- Flatten Query Result into Attributes: Yes
- Recursively Flatten Objects/Arrays: Yes
Click OK.
Next, add an AttributeExposer to expose all attributes for downstream use. Connect it to the Fragments port of the JSONFragmenter.
In the AttributeExposer Parameters, click Import (bottom right), then choose From Data Cache. Import all attributes selected by default. Click OK.
Finally, add an AttributeManager transformer to remove any attributes you don’t want included in the final CSV output. Connect this transformer to the workflow.
Inside AttributeManager, remove the following attributes: filepath, _creation_instance, _response_body, _htttp_status_code, json_type, json_index.
Click OK. Run the workspace and inspect the output data.
Part 3: Write Formatted Data Back to FME Flow
You can continue this step from either Part 2a or Part 2b. For this demonstration, we’ll proceed from Part 2a.
1. Filter Data with Tester
In this step, we’ll use a sample attribute: battery_current to filter out any records where the value is less than or equal to 0.
Add a Tester transformer, connect it to the FeatureReader's JSONFeature port from Part 2a.
Configure the parameters as follows:
-
Left Value: battery_current
- Click the drop-down > Attribute Value > select battery_current
- Operator: <=
- Right Value: 0
Click OK.
2. Write Formatted Data with FeatureWriter
The purpose of this step is to write the filtered data to a CSV file.
Add a FeatureWriter transformer and connect its Input port to the Passed port of the Tester.
Configure FeatureWriter as follows:
- Format: CSV (Comma Separated Value)
-
Dataset: provide a name
- Click on the ellipses to select a location to save the file.
- Feature/CSV Type Name: ElectricCarTrack_Passed
Click OK. Run the workspace and inspect the result.
3. Construct an API Request to Upload Formatted Data to FME Flow Resources
In this step, we will add another HTTPCaller transformer to establish an API call to upload data. Name this HTTPCaller_Upload and connect its Input port to the ElectricCarTrack_Passed port of the FeatureWriter.
Configure HTTPCaller_Upload as follows:
- Request URL: http://<Your_Flow_URL>/fmeapiv4/resources/connections/FME_SHAREDRESOURCE_DATA/upload
- HTTP Method: POST
-
Query String Parameters:
-
Name: path
- Value: Output (name of the folder created in Part 1)
-
Name: overwrite
- Value: true
-
Name: path
-
Headers:
-
Name: Authorization
- Value: fmetoken token=<Your_API_Token>
-
Name: Authorization
-
Body
- Upload Data: Multipart
-
Multipart Upload
- Content Type: multipart/form-data
- Name: files
- Upload Type: File Upload
-
Value: Click the [...] ellipsis,
- Local File: browse to and select the ElectricCarTrack_Passed file from previous step.
-
MIME Type: application/octet-stream
Click OK. The workspace should now look like this:
Run the workspace and inspect the output CSV file in FME Flow.
Part 4: Remove Data from FME Flow
The purpose of this step is to remove the original data from FME Flow after it has been downloaded and read into FME Workbench.
1. Construct an API Request to Delete the Original JSON File from FME Flow
Add another HTTPCaller transformer to make an API call that deletes the original data. Name it HTTPCaller_Delete and connect its Input port to the <Schema> port of the FeatureReader.
Configure HTTPCaller_Delete as follows:
- Request URL: http://<Your_Flow_URL>/fmeapiv4/resources/connections/FME_SHAREDRESOURCE_DATA/item
- HTTP Method: DELETE
-
Query String Parameters:
-
Name: path
- Value: filepath
-
Name: path
-
Headers:
-
Name: Authorization
- Value: fmetoken token=<Your_API_Token>
-
Name: Authorization
Click OK.
This example illustrates a scenario where data is temporarily stored in FME Flow Resources and requires immediate processing in FME Workbench. The formatted data is then returned to FME Flow (or another system or database) for the next step in the data pipeline.
For additional API call examples and parameters, please see the FME Flow REST API v4 documentation.
Additional Resources
HTTP Requests with the HTTPCaller