Download data from TSD via API

To view guides on all topics, in the command line, type

tacl --guide topics

To view instructions on how to register, type

tacl --guide config

This displays the guide:

To use tacl, you first need to register with the TSD API:

    tacl --register

A registration lasts one year, after which you need to register
again. If you are a member of different TSD projects, you need to
register separately for each project.

For an overview of current registrations:

    tacl --config-show

To delete all existing config:

    tacl --config-delete

Type

tacl --register

gives

Choose the API environment by typing one of the following numbers:
1 - for normal production usage
2 - for use over fx03 network
3 - for testing
4 - for Educloud normal production usage
5 - for Educloud testing

Choose 1.

If choosing 4 or 5, see the information on the technical details of Fox HPC. See also job types and max wall time.

To see guide on downloads, type

tacl --guide downloads

This gives

To view files and folders available for download:

    tacl p11 --download-list

Download a file:

    tacl p11 --download anonymised-sensitive-data.txt

If something goes wrong during the download, resume it:

    tacl p11 --download anonymised-sensitive-data.txt --download-id 869b432d7703e62134fcca775c98ba38

To download a directory (resumable):

    tacl p11 --download mydir --ignore-prefixes mydir/.git

To delete a downloadable resource:

    tacl p11 --download-delete myfile

To view and manage the directory download cache:

    tacl p11 --download-cache-show
    tacl p11 --download-cache-delete mydir
    tacl p11 --download-cache-delete-all

Using on-the-fly encryption, with automatic decryption:

    tacl p11 --download data.txt --encrypt

When downloading you can specify a remote path to download from:

    tacl p11 --download data.txt --remote-path /path/to/remote

This will download the file from the remote path if it exists as well as list remote directories.

    tacl p11 --download-list /path/to/remote

To see the guide for uploading, use

tacl --guide upload

This gives

Upload a single file:

    tacl p11 --upload myfile.txt

Files larger than 1GB are resumable if something goes wrong:

    tacl p11 --upload myfile.txt --upload-id 52928fed-8c29-4135-88e9-27f2c0bec526

To browse and manage resumables:

    tacl p11 --resume-list
    tacl p11 --resume-delete 52928fed-8c29-4135-88e9-27f2c0bec526
    tacl p11 --resume-delete-all

Uploading directories (automatically resumable for the whole directory):

    tacl p11 --upload mydirectory

To control which folders and files are included:

    tacl p11 --upload mydirectory --ignore-prefixes .git,build,dist --ignore-suffixes .pyc,.db

To disable the resume functionality for a directory:

    tacl p11 --upload mydirectory --cache-disable

To view and manage directory upload cache:

    tacl p11 --upload-cache-show
    tacl p11 --upload-cache-delete mydirectory
    tacl p11 --upload-cache-delete-all

Using on-the-fly encryption, with automatic server-side decryption:

 tacl p11 --upload myfile.txt --encrypt
 tacl p11 --upload mydirectory --encrypt

When uploading you can specify a remote path to upload to:

 tacl p11 --upload myfile.txt --remote-path /path/to/remote    

This will create a directory structure in the remote path if it does not exist.


Discover more from Science Comics

Subscribe to get the latest posts sent to your email.

Leave a Reply

error: Content is protected !!