Skip to main content
Solved

How to download a zip file from an API using HTTPCaller


a_ericsson
Contributor
Forum|alt.badge.img+3

Hi! I'm trying to download a .zip-file using HTTPCaller. The zip-file is accessed via API by an order number generated when I placed the order for the data.

 

The response body looks like this: [{"href":"https://download-geotorget.lantmateriet.se/download/99d120aa-9532-43a9-a5a7-6128b333bc88/files/root/anlaggningsomrade_kn0125.zip?q=_9yzl22V_4v728pM........"}] (shortened down, was way to long to post here).

 

The 'anlaggningsomrade_kn0125.zip' is what I'm after. Is this possible? Any help is much appreciated 🙂

 

 

Best answer by redgeographics

First you use a HTTPCaller to make that API call that gives you the URL of the zip file. Then a second HTTPCaller to retrieve the file and save it.

 

Depending on what you want to do with it, you can also plug the URL directly in a FeatureReader and have FME process the data that's in the zip file.

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

2 replies

redgeographics
Celebrity
Forum|alt.badge.img+49
  • Celebrity
  • Best Answer
  • May 19, 2022

First you use a HTTPCaller to make that API call that gives you the URL of the zip file. Then a second HTTPCaller to retrieve the file and save it.

 

Depending on what you want to do with it, you can also plug the URL directly in a FeatureReader and have FME process the data that's in the zip file.


a_ericsson
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • May 19, 2022
redgeographics wrote:

First you use a HTTPCaller to make that API call that gives you the URL of the zip file. Then a second HTTPCaller to retrieve the file and save it.

 

Depending on what you want to do with it, you can also plug the URL directly in a FeatureReader and have FME process the data that's in the zip file.

Great, thanks!


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