Skip to main content
Solved

Download files that have names that will keep changing

  • December 21, 2022
  • 1 reply
  • 8 views

gisgeek
Contributor
Forum|alt.badge.img+9

I would like to download all shakemap files. I can download one based on event ID but how do I download all of them. I have specified a folder for them to download to but I have tried a few combinations to get all of the files to download however no success. So the 2022p955929 could change and there are many zip files to http://shakinglayer.geonet.org.nz/api/v1/events/2022p955929/latest.zip

 

I have tried this and the $ sign but they don't work

http://shakinglayer.geonet.org.nz/api/v1/events/*/latest.zip

Best answer by nielsgerrits

When you visit https://shakinglayer.geonet.org.nz/api/v1/events/ it will return a json with the event id's:

["2022p936056""2022p931987""2022p923741""2022p922237""2022p913620""2022p906843""2022p905983""2022p904574""2022p903728""2022p903670""2022p903371""2022p902801""2022p901755""2022p901313""2022p901243""2022p901223""2022p901222""2022p901216""2022p900633""2022p898911""2022p897670""2022p894243""2022p879484""2022p879273""2022p879228""2022p878661"]

So what you can do is use a HTTPCaller to get this response, fragment the response to features and use a second HTTPCaller to do the request for each event.

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

1 reply

nielsgerrits
VIP
  • Best Answer
  • December 21, 2022

When you visit https://shakinglayer.geonet.org.nz/api/v1/events/ it will return a json with the event id's:

["2022p936056""2022p931987""2022p923741""2022p922237""2022p913620""2022p906843""2022p905983""2022p904574""2022p903728""2022p903670""2022p903371""2022p902801""2022p901755""2022p901313""2022p901243""2022p901223""2022p901222""2022p901216""2022p900633""2022p898911""2022p897670""2022p894243""2022p879484""2022p879273""2022p879228""2022p878661"]

So what you can do is use a HTTPCaller to get this response, fragment the response to features and use a second HTTPCaller to do the request for each event.


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