Solved

How to download a zip file from an API using HTTPCaller


Badge +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 🙂

 

 

icon

Best answer by redgeographics 19 May 2022, 09:54

View original

2 replies

Userlevel 4
Badge +25

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.

Badge +3

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!

Reply