Generate a download shareable based on a query
Log into Aterm
Open Web Aterm in your browser, and log in.
Construct the query string
If you want to share only the *.txt
 files in your Mediaflux directory: /projects/proj-test-1247.5.1/data
 with some external collaborators. Firstly, you need to construct a Mediaflux query string to select those *.txt
 files. You can execute asset.query
 service in Aterm to validate your query string:
asset.query :action get-path :where namespace>='/projects/proj-test-1247.5.1/data' and name ends with '.txt"
The above command should list all the txt files in /projects/proj-test-1247.5.1/data
Create a download shareable based on the query
Once you have query string ready, you can execute asset.shareable.download.create
 service in Aterm to create a shareable and send the invitation (with the download link) to your collaborators:
asset.shareable.download.create :name "Txt Files" :valid-to today+3day :invitation < :email THE_RECIPIENT@YOUR-COLLABORATORS.ORG :name "THE RECIPIENT" > :where namespace>='/projects/proj-test-1247.5.1/shared-data' and name ends with '.txt'
In the above command,
- it creates a download shareable base on query string "namespace>='/projects/proj-test-1247.5.1/shared-data' and name ends with '.txt'"
- it sends invitation email (with the link) to your collaborator (:invitation < :email THE_RECIPIENT@YOUR-COLLABORATORS.ORG :name "THE RECIPIENT" >)
- the link expires in 3 days. (:valid-to today+3day) You can also specify the exact date, for example,
:valid-to 31-May-2023
More details about asset.shareable.download.create,
run
help asset.shareable.download.create
 in Aterm
help asset.shareable.download.create