Is there a list of Swift commands I can use with my cluster?

Amanda -

Sure! If you want to get information about accounts, containers and objects in your cluster or just upload, download or delete files (objects), you can install the Swift Command Line Client on your computer.

Alternatively, you can use curl; Swift’s API reference has a chapter on how to use cURL with Swift.

See our technical docs on python-swiftclient for how to install the Swift Command Line Client.

Once you have the Swift Command Line Client installed, you can use it to connect to your cluster.

In the examples below, Cluster API IP address is, the User is user and the Key is password.

Check status of cluster (need to be superuser):

$ swift -A -U user -K password stat

List all items in a container called photos:

$ swift -A -U user -K password list photos

List available containers in an account:

$ swift -A -U user -K password list

Create a container called ‘documents’:

$ swift -A -U user -K password post documents

Upload the file ‘test.txt’ to the ‘documents’ container:

$ swift -A -U user -K password upload documents test.txt

Download the ‘image.jpg’ file from the ‘photos’ container:

$ swift -A -U user -K password download photos image.jpg

Delete the file ‘test.txt’ from a container called ‘documents’:

$ swift -A -U user -K password delete documents test.tx
Have more questions? Submit a request


Powered by Zendesk