CTERA SDK CLI#
The CTERA Python SDK includes a set of built-in executable commands that are installed automatically as part of the SDK package. These commands provide direct access to common SDK functionality through a command-line interface.
The following page describes the supported CLI commands and their usage.
CTERA Direct/IO Download#
The cterasdk.io.direct.download command downloads a file using CTERA Direct I/O.
The download is performed using the file’s unique numeric File ID and stores the file at a specified local path. Authentication can be performed using either an Access/Secret key pair or a Bearer token.
Arguments#
--endpoint/-eCTERA Portal address (for example:
corp.acme.ctera.com).--path/-pLocal destination path where the downloaded file will be saved (for example:
./download.zip).--file-id/-fNumeric identifier of the file to download.
--access/-aAccess key used for authentication (optional).
--secret/-sSecret key used together with the access key (optional).
--bearer/-bBearer authentication token (optional).
--no-verify-ssl/-kDisable SSL certificate verification. Intended for testing or environments using self-signed certificates.
--debug/-dEnable verbose debug logging output.
Examples#
Download a file using access and secret keys:
Bash (Linux / macOS)
cterasdk.io.direct.download \
--endpoint corp.acme.ctera.com \
--file-id 847362915 \
--path "./Statement.pdf" \
--access AKIA7F3K9X2QPLM8D4ZT \
--secret wJalrXUtnFEMI/K7MDENG/bPxRfiCY8zEXAMPLEKEY
Windows Command Prompt (cmd.exe)
cterasdk.io.direct.download ^
--endpoint corp.acme.ctera.com ^
--file-id 847362915 ^
--path ".\Statement.pdf" ^
--access AKIA7F3K9X2QPLM8D4ZT ^
--secret wJalrXUtnFEMI/K7MDENG/bPxRfiCY8zEXAMPLEKEY
CTERA Portal Invitation Browser#
CLI to interact with external shares on CTERA Portal.
cterasdk.io.dav {ls,download,upload} [options]
Commands#
Listing files and folders#
cterasdk.io.dav ls -e ENDPOINT [-s SRC] [-R]
Downloading files and folders#
cterasdk.io.dav download -e ENDPOINT [-s SRC] [-R] [-d DEST] [-z]
Uploading files#
cterasdk.io.dav upload -e ENDPOINT [-d DEST] files [files ...]
User Center#
The cterasdk.platform.export command generates a snapshot of the CTERA
Global File System configuration for import into CTERA User Center.
Usage#
cterasdk.platform.export -a <ADDRESS> -u <USER> -p <PASSWORD> [options]
Arguments#
-a ADDRESSCTERA Portal address.
-u USERSupport or read-only administrator username.
-p PASSWORDSupport or read-only administrator password.
-o, --output OUTPUTPath to write the export file to. By default, the file is written as
<datetime>.<address>.cterasdk.export.json.--no-verifyDisable TLS certificate verification.
--debugEnable verbose debug logging.
--sharedEnable this option if the Portal serves multiple distinct organizations.
Examples#
Generate a configuration export using the default output filename:
cterasdk.platform.export -a portal.example.com -u admin -p password
Specify an output file:
cterasdk.platform.export -a portal.example.com -u admin -p password \
-o platform-export.json
Generate an export for a Portal serving multiple distinct organizations:
cterasdk.platform.export -a portal.example.com -u admin -p password --shared