Skip to main content
Solved

Upload Files with Flow REST API


pflegpet
Contributor
Forum|alt.badge.img+8

Hi, 

is it possible to upload a file to the FME Flow shared resource folder through the Flow REST API? I tried to setup a POST request for fmerest/v3/resources/connections/<resource>/filesys/<path> but get a 415 Unsupported Media Type Response. I used the following parameters in Postman:

In this example I want to upload the text file “test.txt” to the shared resource folder “Test”. 

Is there a problem with the request, or is this the wrong approach for uploading a file via the REST API? The goal would be to provide a means for external applications to upload files that are then processed by FME Flow. Thank you for your help!

Best answer by hkingsbury

The below screenshot is working for me:
 

Using basic auth under the Authorization tab

View original
Did this help you find an answer to your question?

3 replies

hkingsbury
Celebrity
Forum|alt.badge.img+50
  • Celebrity
  • Best Answer
  • July 9, 2024

The below screenshot is working for me:
 

Using basic auth under the Authorization tab


pflegpet
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • July 10, 2024

Hi @hkingsbury, after changing the URL and body the request is working for me as well. Thank you!


johannafalk1
Contributor
Forum|alt.badge.img+7
  • Contributor
  • January 20, 2025

Hi ​@hkingsbury,

I have a similar problem. When I follow the steps above, I get the "message": "Error communicating with FME Flow host XXX \nContact your FME Flow administrator who can investigate the log files for further details.\nAlso see: http://fme.ly/e100007#error-communicating-with-fme-server-hostConnection refused: connect"

Unfortunately, the link provided there, doesn’t seem to exist anymore. 

Just for testing, I also tried to upload through the api v4 - using this POST request: 

fmeapiv4/resources/connections/{connection}/upload?overwrite=false&path=%2FTest%2F

 

Then I get this "message": "The required parameter \"files\" was not found in the request."

Could you help me? 

 

Best regards,

Johanna


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings