@@ -5,6 +5,7 @@ Show details for an object
5
5
--------------------------
6
6
7
7
.. sample :: object_store/v1/objects/get.php
8
+ .. refdoc :: OpenStack/ObjectStore/v1/Models/Container.html#method_getObject
8
9
9
10
At this point, the object returned is *empty * because we did not execute a HTTP request to receive the state of the
10
11
container from the API. This is in accordance with one of the SDK's general policies of not assuming too much at the
@@ -26,6 +27,7 @@ Download an object
26
27
------------------
27
28
28
29
.. sample :: object_store/v1/objects/download.php
30
+ .. refdoc :: OpenStack/ObjectStore/v1/Models/Object.html#method_download
29
31
30
32
As you will notice, a Stream _ object is returned by this call. For more information about dealing with streams, please
31
33
consult `Guzzle's docs `_.
@@ -37,6 +39,7 @@ List objects
37
39
------------
38
40
39
41
.. sample :: object_store/v1/objects/list.php
42
+ .. refdoc :: OpenStack/ObjectStore/v1/Models/Container.html#method_listObjects
40
43
41
44
When listing objects, you must be aware that not *all * information about a container is returned in a collection.
42
45
Very often only the MD5 hash, last modified date, bytes used, content type and object name will be
@@ -51,12 +54,15 @@ returned. If you would like to access all of the remote state of a collection it
51
54
52
55
If you have a large collection of $object, this will slow things down because you're issuing a HEAD request per object.
53
56
57
+ .. include :: /common/generators.rst
58
+
54
59
Create an object
55
60
----------------
56
61
57
62
When creating an object, you can upload its content according to a string representation:
58
63
59
64
.. sample :: object_store/v1/objects/create.php
65
+ .. refdoc :: OpenStack/ObjectStore/v1/Models/Container.html#method_createObject
60
66
61
67
If that is not optimal or convenient, you can use a stream instead. Any instance of ``\Psr\Http\Message\StreamInterface ``
62
68
is acceptable. For example, to use a normal Guzzle stream:
@@ -76,21 +82,25 @@ uploading, this is what happens under the hood:
76
82
To upload a DLO, you need to call:
77
83
78
84
.. sample :: object_store/v1/objects/create_large_object.php
85
+ .. refdoc :: OpenStack/ObjectStore/v1/Models/Container.html#method_createLargeObject
79
86
80
87
Copy object
81
88
-----------
82
89
83
90
.. sample :: object_store/v1/objects/copy.php
91
+ .. refdoc :: OpenStack/ObjectStore/v1/Models/Object.html#method_copy
84
92
85
93
Delete object
86
94
-------------
87
95
88
96
.. sample :: object_store/v1/objects/delete.php
97
+ .. refdoc :: OpenStack/ObjectStore/v1/Models/Object.html#method_delete
89
98
90
99
Get metadata
91
100
------------
92
101
93
102
.. sample :: object_store/v1/objects/get_metadata.php
103
+ .. refdoc :: OpenStack/ObjectStore/v1/Models/Object.html#method_getMetadata
94
104
95
105
The returned value will be a standard associative array, or hash, containing arbitrary key/value pairs. These will
96
106
correspond to the values set either when the object was created, or when a previous ``mergeMetadata `` or
@@ -100,6 +110,7 @@ Replace all metadata with new values
100
110
------------------------------------
101
111
102
112
.. sample :: object_store/v1/objects/reset_metadata.php
113
+ .. refdoc :: OpenStack/ObjectStore/v1/Models/Object.html#method_resetMetadata
103
114
104
115
In order to replace all existing metadata with a set of new values, you can use this operation. Any existing metadata
105
116
items which not specified in the new set will be removed. For example, say an account has the following metadata
@@ -129,6 +140,7 @@ Merge new metadata values with existing
129
140
---------------------------------------
130
141
131
142
.. sample :: object_store/v1/objects/merge_metadata.php
143
+ .. refdoc :: OpenStack/ObjectStore/v1/Models/Object.html#method_mergeMetadata
132
144
133
145
In order to merge a set of new metadata values with the existing metadata set, you can use this operation. Any existing
134
146
metadata items which are not specified in the new set will be preserved. For example, say an account has the following
0 commit comments