• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (Swift)
  4. Operations on Objects
  5. Create/Update/Delete Object Metadata
  6. Examples

Examples

Create Object Metadata

Create object metadata Author with the value set to other:

curl -i http://172.28.54.12:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/marketwain/goodbye -H "X-Auth-Token:74565091b56b4783818430cecb283e7f"  -XPOST  -H "X-Object-Meta-author:other"
HTTP/1.1 202 Accepted
X-Trans-Id: tx000001513cba7176370c1-adee95a013
Content-Type: text/html;charset=UTF-8
Date: Wed, 25 Nov 2015 03:40:30 GMT
Content-Length: 76

<html><h1>Accepted</h1><p>The request is accepted for processing.</p></html>

Update Object Metadata

Update object metadata Author with the value set to marktwain:

curl -i http://172.28.54.12:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/marketwain/goodbye -H "X-Auth-Token:74565091b56b4783818430cecb283e7f"  -XPOST  -H "X-Object-Meta-author:marktwain"
HTTP/1.1 202 Accepted
X-Trans-Id: tx000001513cbfbf2f370c2-f9e7f1cf40
Content-Type: text/html;charset=UTF-8
Date: Wed, 25 Nov 2015 03:46:18 GMT
Content-Length: 76

<html><h1>Accepted</h1><p>The request is accepted for processing.</p></html>

Delete Object Metadata

Delete the metadata author, and leave the value blank.

curl -i http://172.28.54.12:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/marketwain/goodbye -H "X-Auth-Token:74565091b56b4783818430cecb283e7f"  -XPOST  -H "X-Object-Meta-author:"
HTTP/1.1 202 Accepted
X-Trans-Id: tx000001513cc10d85370c2-cddc60cba5
Content-Type: text/html;charset=UTF-8
Date: Wed, 25 Nov 2015 03:47:43 GMT
Content-Length: 76

<html><h1>Accepted</h1><p>The request is accepted for processing.</p></html>