swift: meta data of all objects in a container

asked 2014-05-13 07:35:24 -0500

Robin Winslow gravatar image

updated 2014-08-19 12:43:04 -0500

briancline gravatar image

I can list all objects in a container1 with:

http GET https://swift.example.com/v1/AUTH_ID/myfiles?format=json

Which might return:

        hash: "52f5fd7b187da7afa4551bee7a128e73",
        last_modified: "2014-05-13T11:32:16.159130",
        bytes: 6959708,
        name: "header.jpg",
        content_type: "image/jpeg"
    }, ..

I can also set arbitrary meta tags2 against an object:

http POST https://swift.example.com/v1/AUTH_ID/myfiles/header.jpg X-Object-Meta-Author:robin

I can now retrieve this meta data again for the individual object:

http HEAD https://swift.example.com/v1/AUTH_ID/myfiles/header.jpg

HTTP/1.1 200 OK
Content-Length: 6942401
Content-Type: image/jpeg
X-Object-Meta-Author: robin

But is there any way to retrieve all objects in the container along with their metadata?


1: http://docs.openstack.org/api/openstack-object-storage/1.0/content/GET_showContainerDetails__v1__account___container__storage_container_services.html
2: http://docs.openstack.org/api/openstack-object-storage/1.0/content/POST_updateObjectMeta__v1__account___container___object__storage_object_services.html
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-13 17:48:33 -0500

torgomatic gravatar image

Swift does not support that. The only things stored in the container DB, and hence the only things available in the container listing, are what you see above.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-05-13 07:35:24 -0500

Seen: 878 times

Last updated: May 13 '14