TAGS

There are no tags associated with this article.

How to download EOData products using EOFinder API?

1. Enter the CREODIAS Finder web page.

https://finder.creodias.eu/www/

2. If you want to download EOData product, please search for the desired product by providing sufficient parameters in the form. After that, verify the results and locate the REST query that has been generated.

a) Using filters in order to find a desired product:

b) Checking the results and locating REST query:

3. Copy and paste REST query in the we browser address bar. Run this query.

4. Press Ctrl + F in order to find a "download" paragraph. Look at the prepared zipper link and copy it.

5. Add "?token=" sequence at the end of the URL.

https://zipper.creodias.eu/download/db0c8ef3-8ec0-5185-a537-812dad3c58f8?token=

6. Generate your keycloak token (remember to source your OpenRC file first)

export KEYCLOAK_TOKEN=$(curl -d 'client_id=CLOUDFERRO_PUBLIC' \
                             -d "username=${OS_USERNAME}" \
                             -d "password=${OS_PASSWORD}" \
                             -d 'grant_type=password' \
                             'https://auth.creodias.eu/auth/realms/DIAS/protocol/openid-connect/token' | \
                             python -m json.tool | grep "access_token" | awk -F\" '{print $4}')

7. Execute wget command:

wget -cO - https://zipper.creodias.eu/download/db0c8ef3-8ec0-5185-a537-812dad3c58f8?token=(paste token here) > myproduct.zip

8. After finished operation make sure that the product has been downloaded properly.

2019-02-18 16:21:08 (37,7 MB/s) - written to stdout [432095955]


[eouser@CREODIAS_MACHINE ~]$ ll | grep myproduct.zip

-rw-rw-r-- 1 eouser eouser 432095955 lut 18 16:21 myproduct.zip

[eouser@CREODIAS_MACHINE ~]