Download data from a catalogue query

Every entry in an index of the catalogue can have a link to the data that it describes.
There is a resource location (URL), also called enclosure, that can be associated in the entry metadata.
This URL can be extracted easily using opensearch-client. For instance:

opensearch-client "" enclosure

The resource locations returned by the catalogue point to a data gateway like:

then the download will be performed via the Data Gateway that enables many function such as caching to allow the best download performance of the data requested.
Now you can use the download url with a simple curl command

curl -v -L -o <your_download_path> <enclosure_url>


curl -v -L -o /tmp/

or using one of the ciop-copy tool installed in your sandbox:

ciop-copy -s -U -O <your_download_path> <enclosure_url>


ciop-copy -s -U -O /tmp/

you can even pipe the query and download request

opensearch-client "" enclosure | ciop-copy -s -U -O /tmp/

more information on download in the Data API documentation.