Ask Your Question
0

What is the swift object metadata? Is X-Object-Meta-<key>: <value> or all of the metadata responses?

asked 2017-05-18 07:09:58 -0500

Yifei Liu gravatar image

I use the RESTful API to get the swift object metadata, as follows:

curl $publicURL/marktwain/goodbye --head -H "X-Auth-Token: $token"

It can response many attributes:

HTTP/1.1 200 OK
Content-Length: 14
Accept-Ranges: bytes
Last-Modified: Thu, 16 Jan 2014 21:12:31 GMT
Etag: 451e372e48e0f6b1114fa0724aa79fa1
X-Timestamp: 1389906751.73463
X-Object-Meta-Book: GoodbyeColumbus
Content-Type: application/octet-stream
X-Trans-Id: tx37ea34dcd1ed48ca9bc7d-0052d84b6f
X-Openstack-Request-Id: tx37ea34dcd1ed48ca9bc7d-0052d84b6f
Date: Thu, 16 Jan 2014 21:13:19 GMT

There are many attributes: Content-Length, Accept-Ranges, Last-Modified, Etag, X-Timestamp, X-Object-Meta-Book, Content-Type, X-Trans-Id, X-Openstack-Request-Id, Date.

I have a question - whether all of these above attributes are the metadata of the object or only X-Object-Meta-Book: GoodbyeColumbus is the object metadata(key: Book, value: GoodbyeColumbus).

Thanks in advance! Really appreciate your help!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-05-18 18:44:35 -0500

Bernd Bausch gravatar image

See the API documentation at https://developer.openstack.org/api-r.... Indeed, X-object-meta-whatever contains the value for the metadata key whatever. The other headers aren't metadata in the narrow sense of the word.

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: 2017-05-18 07:09:58 -0500

Seen: 33 times

Last updated: May 18