The swift client is the command-line interface (CLI) for the Object Storage service API and its extensions.
This chapter documents swift version 3.0.0.
For help on a specific swift command, enter:
$ swift COMMAND --help
Usage: swift [--version] [--help] [--os-help] [--snet] [--verbose]
[--debug] [--info] [--quiet] [--auth <auth_url>]
[--auth-version <auth_version> |
--os-identity-api-version <auth_version> ]
[--user <username>]
[--key <api_key>] [--retries <num_retries>]
[--os-username <auth-user-name>] [--os-password <auth-password>]
[--os-user-id <auth-user-id>]
[--os-user-domain-id <auth-user-domain-id>]
[--os-user-domain-name <auth-user-domain-name>]
[--os-tenant-id <auth-tenant-id>]
[--os-tenant-name <auth-tenant-name>]
[--os-project-id <auth-project-id>]
[--os-project-name <auth-project-name>]
[--os-project-domain-id <auth-project-domain-id>]
[--os-project-domain-name <auth-project-domain-name>]
[--os-auth-url <auth-url>] [--os-auth-token <auth-token>]
[--os-storage-url <storage-url>] [--os-region-name <region-name>]
[--os-service-type <service-type>]
[--os-endpoint-type <endpoint-type>]
[--os-cacert <ca-certificate>] [--insecure]
[--no-ssl-compression]
<subcommand> [--help] [<subcommand options>]
Subcommands:
swift download --help
swift -A https://auth.api.rackspacecloud.com/v1.0 -U user -K api_key stat -v
swift --os-auth-url https://api.example.com/v2.0 --os-tenant-name tenant \
--os-username user --os-password password list
swift --os-auth-url https://api.example.com/v3 --auth-version 3\
--os-project-name project1 --os-project-domain-name domain1 \
--os-username user --os-user-domain-name domain1 \
--os-password password list
swift --os-auth-url https://api.example.com/v3 --auth-version 3\
--os-project-id 0123456789abcdef0123456789abcdef \
--os-user-id abcdef0123456789abcdef0123456789 \
--os-password password list
swift --os-auth-token 6ee5eb33efad4e45ab46806eac010566 \
--os-storage-url https://10.1.5.2:8080/v1/AUTH_ced809b6a4baea7aeab61a \
list
swift list --lh
-V AUTH_VERSION,
--auth-version=AUTH_VERSION,
Usage: swift capabilities
Retrieve capability of the proxy.
Optional positional arguments:
Usage: swift delete
Delete a container or objects within a container.
Positional arguments:
Optional arguments:
Usage: swift download
Download objects from containers.
Positional arguments:
Optional arguments:
Usage: swift list
Lists the containers for the account or the objects for a container.
Positional arguments:
Optional arguments:
Usage: swift post
Updates meta information for the account, container, or object. If the container is not found, it will be created automatically.
Positional arguments:
Optional arguments:
Usage: swift stat
Displays information for the account, container, or object.
Positional arguments:
Optional arguments:
Usage: swift tempurl
Generates a temporary URL for a Swift object.
Positional arguments:
Optional arguments:
Usage: swift upload
Uploads specified files and directories to the given container.
Positional arguments:
Optional arguments:
Usage: swift auth
Display auth related authentication variables in shell friendly format.
Commands to run to export storage url and auth token into OS_STORAGE_URL and OS_AUTH_TOKEN:
$ swift auth
Commands to append to a runcom file (e.g. ~/.bashrc, /etc/profile) for automatic authentication:
$ swift auth -v -U test:tester -K testing -A http://localhost:8080/auth/v1.0
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.