Ask Your Question
0

swift: meta data of all objects in a container

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

Robin Winslow gravatar image

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

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?

References

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
0

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 821 times

Last updated: May 13 '14