Skip to main content
Solved

Upload Files with Flow REST API

  • July 9, 2024
  • 3 replies
  • 270 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

hkingsbury
Celebrity
Forum|alt.badge.img+63
  • Celebrity
  • 1632 replies
  • 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
  • 62 replies
  • 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+19
  • Contributor
  • 11 replies
  • 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