Aspera on Cloud Examples
List workspaces
List the Aspera on Cloud workspaces.
# aspera files send -a -u user_email@example.com -o organization_name
Note: When you use the -a option to list workspaces, the only other required arguments
are -u and -o.
Send a package
Send a package containing a file called test_file. When the recipient receives the
notification email, Package name will appear in the subject line.
# aspera files send -f /tmp/test_file --organization test_org -n "Package name" -r recipient_email@example.com -u user_email@example.com -w workspace_name --message "This is the body of the email message."
Send to a shared inbox
Send a package to a Aspera on Cloud dropbox.
# aspera files send -d dropbox_name -f /tmp/test_file --organization test_org -n "Package name" -u user_email@example.com -w workspace_name --message "This is the body of the email message."
Send to a shared inbox that requires metadata
If the shared inbox has been configured to require metadata, the Aspera CLI's response to
the above command is to output a template for the required metadata. For example:
Creating bearer token... done
Dropbox dropbox_name requires metadata. Please provide a filename containing metadata with -s option in the following format:
{"metadata_values" :
[
{ "name" : "Hello?",
"input_type" : "single-text",
"values" : ["input_text"]
},
{ "name" : "Date?",
"input_type" : "date",
"values" : ["input_text"]
},
{ "name" : "Textbox-R",
"input_type" : "textbox",
"values" : ["input_text"]
},
{ "name" : "single-dropdown",
"input_type" : "single-dropdown",
"values" : ["What?","No","Yes"]
},
{ "name" : "?",
"input_type" : "multiple-checkbox",
"values" : ["OKAY","two","one"]
}
]
}
Note: Aspera on Cloud shared inboxes can be configured for up to five metadata fields. If the
given shared inbox has not been configured to use all five, the template that the Aspera CLI
displays will not include the unused fields.
Note: The template that the Aspera CLI displays is not itself valid JSON, but is meant to show
the basic framework for your metadata file. To create your metadata file, adjust the
template's values to fit the metadata fields and values defined for your shared inbox. In
particular, note that while the template shows multiple values for fields where
input_type is single-dropdown, your metadata file must contain only one
value.
With the help of this template, create the metadata file in JSON format. Then include it
in the send command:
# aspera files send -d dropbox_name -s metadata_file -f /tmp/test_file --organization test_org -n "Package name" -u user_email@example.com -w workspace_name --message "This is the body of the email message."