Good morning.
According to this article I should be able to download resources using an URL similar to:
https://fmeserver.example.com/fmerest/v3/resources/connections/FME_SHAREDRESOURCE_TEMP/filesys/testSpreadsheet.xlsx But when I try to do so, instead of getting the file I get information about the file:
http://sigdesafme.dfa.es/fmerest/v3/resources/connections/FME_SHAREDRESOURCE_DATA/filesys/GASTDM01/wrapper.log
What I get in the web explorer is this: {"date":"2024-07-17T13:04:52+02:00","path":"/GASTDM01/","size":153839356,"name":"wrapper.log","type":"FILE"} Am I missing something? I have tried to change filesys for “download” or “downloadzip”, but the ZIP it downloads is empty. The version of FME Server is 2021.1.
Best answer by siennaatsafe
Hi @oscard , Try adding ?accept=contents&disposition=attachment to you URL. Like this
http: //<URL>/fmerest /v3/resources /connections/ FME_SHAREDRESOURCE_DATA /filesys/PublicTrees .csv?accept=contents&disposition=attachment
I think the accept parameter is the key to getting this to work in a URL. I found this in the REST API Docs on a 2021 Flow instance go to http://<YourFlowURLl>/fmerest/apidoc/v3/#!/resources/download_get_10 to access this documentation.
Hopefully that helps!
View original