Revision 82482e2c docs/source/devguide.rst
b/docs/source/devguide.rst | ||
---|---|---|
27 | 27 |
========================= ================================ |
28 | 28 |
Revision Description |
29 | 29 |
========================= ================================ |
30 |
0.9 (Feb 15, 2012) Change permissions model. |
|
30 |
0.9 (Feb 17, 2012) Change permissions model. |
|
31 |
\ Do not include user-defined metadata in account/container/object listings. |
|
31 | 32 |
0.8 (Jan 24, 2012) Update allowed versioning values. |
32 | 33 |
\ Change policy/meta formatting in JSON/XML replies. |
33 | 34 |
\ Document that all non-ASCII characters in headers should be URL-encoded. |
... | ... | |
277 | 278 |
Cross-user requests are not allowed to use ``until`` and only include the account/container modification dates in the reply. |
278 | 279 |
|
279 | 280 |
If a ``format=xml`` or ``format=json`` argument is given, extended information on the containers will be returned, serialized in the chosen format. |
280 |
For each container, the information will include all container metadata (names will be in lower case and with hyphens replaced with underscores): |
|
281 |
For each container, the information will include all container metadata, except user-defined (names will be in lower case and with hyphens replaced with underscores):
|
|
281 | 282 |
|
282 | 283 |
=========================== ============================ |
283 | 284 |
Name Description |
... | ... | |
287 | 288 |
bytes The total size of the objects inside the container |
288 | 289 |
last_modified The last container modification date (regardless of ``until``) |
289 | 290 |
x_container_until_timestamp The last container modification date until the timestamp provided |
290 |
x_container_policy_* Container behavior and limits |
|
291 |
x_container_meta_* Optional user defined metadata |
|
291 |
x_container_policy Container behavior and limits |
|
292 | 292 |
=========================== ============================ |
293 | 293 |
|
294 | 294 |
Example ``format=json`` reply: |
... | ... | |
299 | 299 |
"bytes": 62452, |
300 | 300 |
"count": 8374, |
301 | 301 |
"last_modified": "2011-12-02T08:10:41.565891+00:00", |
302 |
"x_container_policy": {"quota": "53687091200", "versioning": "auto"}, |
|
303 |
"x_container_meta": {"a": "b", "1": "2"}}, ...] |
|
302 |
"x_container_policy": {"quota": "53687091200", "versioning": "auto"}}, ...] |
|
304 | 303 |
|
305 | 304 |
Example ``format=xml`` reply: |
306 | 305 |
|
... | ... | |
317 | 316 |
<key>quota</key><value>53687091200</value> |
318 | 317 |
<key>versioning</key><value>auto</value> |
319 | 318 |
</x_container_policy> |
320 |
<x_container_meta> |
|
321 |
<key>a</key><value>b</value> |
|
322 |
<key>1</key><value>2</value> |
|
323 |
</x_container_meta> |
|
324 | 319 |
</container> |
325 | 320 |
<container>...</container> |
326 | 321 |
</account> |
327 | 322 |
|
328 |
For more examples of container details returned in JSON/XML formats refer to the OOS API documentation. In addition to the OOS API, Pithos returns all fields. Policy and metadata values are grouped and returned as key-value pairs.
|
|
323 |
For more examples of container details returned in JSON/XML formats refer to the OOS API documentation. In addition to the OOS API, Pithos returns policy fields, grouped as key-value pairs.
|
|
329 | 324 |
|
330 | 325 |
=========================== ===================== |
331 | 326 |
Return Code Description |
... | ... | |
471 | 466 |
=========================== =============================== |
472 | 467 |
|
473 | 468 |
If a ``format=xml`` or ``format=json`` argument is given, extended information on the objects will be returned, serialized in the chosen format. |
474 |
For each object, the information will include all object metadata (names will be in lower case and with hyphens replaced with underscores):
|
|
469 |
For each object, the information will include all object metadata, except user-defined (names will be in lower case and with hyphens replaced with underscores). User-defined metadata includes ``X-Object-Meta-*``, ``X-Object-Manifest``, ``Content-Disposition`` and ``Content-Encoding`` keys. Also, sharing directives will only be included with the actual shared objects (inherited permissions are not calculated):
|
|
475 | 470 |
|
476 | 471 |
========================== ====================================== |
477 | 472 |
Name Description |
... | ... | |
480 | 475 |
hash The ETag of the object |
481 | 476 |
bytes The size of the object |
482 | 477 |
content_type The MIME content type of the object |
483 |
content_encoding The encoding of the object (optional) |
|
484 |
content-disposition The presentation style of the object (optional) |
|
485 | 478 |
last_modified The last object modification date (regardless of version) |
486 | 479 |
x_object_hash The Merkle hash |
487 | 480 |
x_object_uuid The object's UUID |
488 | 481 |
x_object_version The object's version identifier |
489 | 482 |
x_object_version_timestamp The object's version timestamp |
490 | 483 |
x_object_modified_by The user that committed the object's version |
491 |
x_object_manifest Object parts prefix in ``<container>/<object>`` form (optional) |
|
492 | 484 |
x_object_sharing Object permissions (optional) |
493 |
x_object_shared_by Object inheriting permissions (optional) |
|
494 | 485 |
x_object_allowed_to Allowed actions on object (optional) |
495 | 486 |
x_object_public Object's publicly accessible URI (optional) |
496 |
x_object_meta_* Optional user defined metadata |
|
497 | 487 |
========================== ====================================== |
498 | 488 |
|
499 |
Sharing metadata will only be returned if there is no ``until`` parameter defined. |
|
489 |
Sharing metadata and last modification timestamp will only be returned if there is no ``until`` parameter defined.
|
|
500 | 490 |
|
501 | 491 |
Extended replies may also include virtual directory markers in separate sections of the ``json`` or ``xml`` results. |
502 | 492 |
Virtual directory markers are only included when ``delimiter`` is explicitly set. They correspond to the substrings up to and including the first occurrence of the delimiter. |
... | ... | |
512 | 502 |
"hash": "d41d8cd98f00b204e9800998ecf8427e", |
513 | 503 |
"content_type": "application/octet-stream", |
514 | 504 |
"last_modified": "2011-12-02T08:10:41.565891+00:00", |
515 |
"x_object_meta": {"asdf": "qwerty"}, |
|
516 | 505 |
"x_object_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", |
517 | 506 |
"x_object_uuid": "8ed9af1b-c948-4bb6-82b0-48344f5c822c", |
518 | 507 |
"x_object_version": 98, |
... | ... | |
531 | 520 |
<hash>d41d8cd98f00b204e9800998ecf8427e</hash> |
532 | 521 |
<content_type>application/octet-stream</content_type> |
533 | 522 |
<last_modified>2011-12-02T08:10:41.565891+00:00</last_modified> |
534 |
<x_object_meta> |
|
535 |
<key>asdf</key><value>qwerty</value> |
|
536 |
</x_object_meta> |
|
537 | 523 |
<x_object_hash>e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</x_object_hash> |
538 | 524 |
<x_object_uuid>8ed9af1b-c948-4bb6-82b0-48344f5c822c</x_object_uuid> |
539 | 525 |
<x_object_version>98</x_object_version> |
... | ... | |
543 | 529 |
<object>...</object> |
544 | 530 |
</container> |
545 | 531 |
|
546 |
For more examples of container details returned in JSON/XML formats refer to the OOS API documentation. In addition to the OOS API, Pithos returns all fields. Metadata values are grouped and returned as key-value pairs.
|
|
532 |
For more examples of container details returned in JSON/XML formats refer to the OOS API documentation. In addition to the OOS API, Pithos returns more fields that should help with synchronization.
|
|
547 | 533 |
|
548 | 534 |
=========================== =============================== |
549 | 535 |
Return Code Description |
... | ... | |
1076 | 1062 |
* Headers ``X-Container-Block-*`` at the container level, exposing the underlying storage characteristics. |
1077 | 1063 |
* All metadata replies, at all levels, include latest modification information. |
1078 | 1064 |
* At all levels, a ``HEAD`` or ``GET`` request may use ``If-Modified-Since`` and ``If-Unmodified-Since`` headers. |
1079 |
* Container/object lists include all associated metadata if the reply is of type JSON/XML. Some names are kept to their OOS API equivalents for compatibility.
|
|
1065 |
* Container/object lists include more fields if the reply is of type JSON/XML. Some names are kept to their OOS API equivalents for compatibility.
|
|
1080 | 1066 |
* Option to include only shared containers/objects in listings. |
1081 | 1067 |
* Object metadata allowed, in addition to ``X-Object-Meta-*``: ``Content-Encoding``, ``Content-Disposition``, ``X-Object-Manifest``. These are all replaced with every update operation, except if using the ``update`` parameter (in which case individual keys can also be deleted). Deleting meta by providing empty values also works when copying/moving an object. |
1082 | 1068 |
* Multi-range object ``GET`` support as outlined in RFC2616. |
Also available in: Unified diff