Skip to main content
Question

How to download images from API?


Forum|alt.badge.img

 

I have to download images which are made accessible using a password protected api interface.

 

 

Using the following URL I can retrieve an xml dokument showing the element id´s which contain image data:

 

 https://www.THESERVICE.com/api/media-get.php?&user=?????&pw=?????&crs=EPSG:4236&version=current&bbox=9.3131,52.5912,10.2535,53.2265&type=1
 

 

From the list, I can then call the images using the following query:

 

 

 https://www.THESERVICE.com/api/medium-file.php?&id=73298&user=?????&pw=?????
 

 

 

Could anyone offer a way to enable me to download all the images to a given directory and rename then according to the id?

 

 

 

2 replies

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • July 25, 2014
U can use a HTTPFetcher (thats a transformer)

 

You can parametrizethe variables or link them to attributes.

 

 

This one colects tiles form dutch heightdata (AHN2) on demand

 

 

 

 

For the output

 

You can make a variable like "filename" and compose its name from attributes like your id. Then use fanout on this "filename" attribute.

 

Directory can be controled in same way, but you need to use the fanout in the nvigator section under advanced. (there are few posts about this not very far down)

david_r
Evangelist
  • July 28, 2014
Hi,

 

 

the ImageFetcher might be what you're looking for.

 

 

David

Reply


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