Solved

API Call to download a file from my shared resource folder in the FME server

  • 4 November 2022
  • 5 replies
  • 10 views

Hello, 

 

I would like to download a jpg file from my FME server and save it to my local drive with an API call. 

 

Using FME desktop, I am not sure which transformer/writer to use, and I can't seem to find my REST API call to work. There are a few API documentations in the web, but what I tried was a GET call, but it doesn't seem to download anything.

https://<fmeserver.example.com>/fmerest/v3/resources/connections/<MY_SHARED_SOURCE>/filessys/<file_directory/filename.jpg>

I am pretty sure my auth and permission is file.

 

Can someone please guide me how to achieve my goal?

 

Kind regards,

Tae

icon

Best answer by david_r 8 November 2022, 10:16

View original

5 replies

Userlevel 4

You can use the FMEServerResourceConnector transformer to e.g. download resource files from FME Server.

See https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/fmeserverresourceconnector.htm

Badge

Try using:

 

https://<fmeserver.example.com>/fmerest/v3/resources/connections/<Resource>/filessys/<Path>

Thank you for replying. I have tried the exact path, but it doesn't seem to return my file. Can you please explain a bit further?

Userlevel 4

Thank you for replying. I have tried the exact path, but it doesn't seem to return my file. Can you please explain a bit further?

Did you look in the API documentation? There's a concrete example of how to use the endpoint:

https://docs.safe.com/fme/html/FME_REST/apidoc/v3/#!/resources/postDownload_post_9

Thank you for replying. I have tried the exact path, but it doesn't seem to return my file. Can you please explain a bit further?

Thank you very much. It seems the API point is working now. I think the header needs to be set as per the documentation. My apologies... I didn't think I can expand each section to look thoroughly...

Reply