Atom feed of this document
 
 
 

 4.2.4. Set or Edit Container Metadata

You may set any custom or arbitrary metadata headers as you find useful. They must, however, take the format X-Container-Meta-XXXX, where XXXX is the name of your custom header.

To set or edit the arbitrary container metadata, do a POST request to the container URL. Subsequent POSTs to the header overwrite the previous value.

To view your metadata changes, do a HEAD request on the container URL. Do not try to send the metadata in your HEAD request.

To remove previously-set container metadata, do a POST request to the container with X-Remove-Container-Meta-XXXX: foo, where XXXX is the name of your custom header. Foo is any term, and it will not be used; you must, however, send some value with the request, otherwise it will be ignored.

 

Example 4.22. Update Container Metadata Request

  POST /<api version>/<account>/<container> HTTP/1.1
  Host: storage.clouddrive.com
  X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
  X-Container-Meta-Book: MobyDick
  X-Container-Meta-Subject: Whaling
                      

No response body is returned. A status code of 204 (No Content) indicates success; status 404 (Not Found) is returned when the requested container does not exist.

 

Example 4.23. Update Container Metadata Response

  HTTP/1.1 204 No Content
  Date: Thu, 07 Mar 2012 20:42:51 GMT
  Content-Length: 0
  Content-Type: text/plain; charset=UTF-8
                    

 

Example 4.24. View Container Metadata Request

  HEAD /<api version>/<account>/<container> HTTP/1.1
  Host: storage.clouddrive.com
  X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
                       

 

Example 4.25. View Container Metadata Response

  HTTP/1.1 204 No Content
  X-Container-Object-Count: 0
  X-Trans-Id: tx028b40d228534c759f4d5fa69f8cf7fd
  X-Container-Meta-Book: MobyDick
  X-Container-Meta-Subject: Whaling
  Accept-Ranges: bytes
  Date: Mon, 12 Mar 2012 16:40:20 GMT
  Content-Length: 0
  X-Container-Bytes-Used: 0
                    



loading table of contents...