Swift is a reliable, distributed, massively scalable blob storage service that can be used for storage and archival of objects. Swift provides a REST interface. You can use Swift commandline which is an interface for the OpenStack object store service.
To get the information about swift account, container and objects.
$ swift -v -V 2.0 -A http://127.0.0.1:5000/v2.0/ -U service:swiftuser -K swiftpasswd stat Account: AUTH_43b42dae-dc0b-4a4b-ac55-97de614d6e6e Containers: 1 Objects: 1 Bytes: 1124 Accept-Ranges: bytes X-Trans-Id: txb21186a9eef64ed295a1e95896a0fc72
To get information about a particular container (mycontainer):
$ swift -v -V 2.0 -A http://127.0.0.1:5000/v2.0/ -U service:swiftuser -K swiftpasswd stat mycontainer
To get information about an object (abc123.txt) within container (mycontainer):
$ swift -v -V 2.0 -A http://127.0.0.1:5000/v2.0/ -U service:swiftuser -K swiftpasswd stat mycontainer abc123.txt
To list available containers in account:
$ swift -v -V 2.0 -A http://127.0.0.1:5000/v2.0/ -U service:swiftuser -K swiftpasswd list
To list all containers whose names begin with 'my':
$ swift -v -V 2.0 -A http://127.0.0.1:5000/v2.0/ -U service:swiftuser -K swiftpasswd --prefix=my list
To list all objects within container 'mycontainer':
$ swift -v -V 2.0 -A http://127.0.0.1:5000/v2.0/ -U service:swiftuser -K swiftpasswd --prefix=my list mycontainer
To upload files 'abc.txt' and 'xyz.txt' to 'mycontainer':
$ swift -v -V 2.0 -A http://127.0.0.1:5000/v2.0/ -U service:swiftuser -K swiftpasswd upload mycontainer /path/abc.txt /path/xyz.txt
To download all the objects from all containers:
$ swift -v -V 2.0 -A http://127.0.0.1:5000/v2.0/ -U service:swiftuser -K swiftpasswd --all download
To download all objects from container 'mycontainer':
$ swift -v -V 2.0 -A http://127.0.0.1:5000/v2.0/ -U service:swiftuser -K swiftpasswd download mycontainer
To download 'abc.txt' and 'xyz.txt' from container 'mycontainer':
$ swift -v -V 2.0 -A http://127.0.0.1:5000/v2.0/ -U service:swiftuser -K swiftpasswd download mycontainer abc.txt xyz.txt
To delete all objects in all containers:
$ swift -v -V 2.0 -A http://127.0.0.1:5000/v2.0/ -U service:swiftuser -K swiftpasswd --all delete
To delete all objects in container 'mycontainer':
$ swift -v -V 2.0 -A http://127.0.0.1:5000/v2.0/ -U service:swiftuser -K swiftpasswd delete mycontainer
To delete files 'abc.txt' and 'xyz.txt' from container 'mycontainer':
$ swift -v -V 2.0 -A http://127.0.0.1:5000/v2.0/ -U service:swiftuser -K swiftpasswd delete mycontainer abc.txt xyz.txt
