Changed bulk-delete to DELETE from POST
Also, moved information about auto-archive to that chapter. Made some small edits to reduce redundancy and improve clarity. Closes-Bug: #1288327 Change-Id: I53731cf895e3e28aa19d92be27d3d4f9c81678e1 author: diane fleming (diane.fleming@rackspace.com)
This commit is contained in:
parent
befcd430c3
commit
9aaf74f0e4
|
@ -7,16 +7,17 @@
|
|||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
|
||||
xml:id="archive-auto-extract">
|
||||
<?dbhtml stop-chunking?>
|
||||
<title>Auto-extract archive files</title>
|
||||
<para>To discover whether your Object Storage system supports
|
||||
this feature, see <xref linkend="discoverability"
|
||||
/>. Alternatively, check with your service provider.</para>
|
||||
<para>To discover whether your Object Storage system supports this
|
||||
feature, see <xref linkend="discoverability"/>. Alternatively,
|
||||
check with your service provider.</para>
|
||||
<para>Use the auto-extract archive feature to upload a tar(1)
|
||||
archive file.</para>
|
||||
<para>The Object Storage system extracts files from the archive
|
||||
file and creates an object.</para>
|
||||
<section xml:id="archive-auto-extract-put">
|
||||
<title>Auto-extract archive PUT request</title>
|
||||
<title>Auto-extract archive request</title>
|
||||
<para>To upload an archive file, you make a &PUT; request. Add
|
||||
the
|
||||
<parameter>extract-archive=<replaceable>format</replaceable></parameter>
|
||||
|
@ -74,22 +75,25 @@
|
|||
archive.</para>
|
||||
<para>Use the <parameter>extract-archive</parameter>
|
||||
query parameter to specify the format. Valid
|
||||
values for this parameter are <literal>tar</literal>,
|
||||
values for this parameter are
|
||||
<literal>tar</literal>,
|
||||
<literal>tar.gz</literal>, or
|
||||
<literal>tar.bz2</literal>.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<section xml:id="archive-auto-extract-response">
|
||||
<title>Auto-extract archive response: JSON</title>
|
||||
<title>Auto-extract archive response</title>
|
||||
<para>When Object Storage processes the request, it performs
|
||||
multiple sub-operations. Even if all sub-operations fail,
|
||||
the operation returns a <returnvalue>201</returnvalue>
|
||||
<literal>Created</literal> status. You must examine the
|
||||
response body to determine which members failed to result
|
||||
in an object creation.</para>
|
||||
<literal>Created</literal> status. Some sub-operations
|
||||
might succeed while others fail: Examine the response body
|
||||
to determine the results of each auto-extract archive
|
||||
sub-operation.</para>
|
||||
<para>You can set the <literal>Accept</literal> request header
|
||||
to one of these values, which defines the response format:</para>
|
||||
to one of these values to define the response
|
||||
format:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><literal>text/plain</literal>. Formats response
|
||||
|
@ -108,7 +112,36 @@
|
|||
as XML.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>For more information, see <xref
|
||||
linkend="archive-auto-extract-response"/>.</para>
|
||||
<para>The following auto-extract archive files example shows a
|
||||
<literal>text/plain</literal> response body where no
|
||||
failures occurred:</para>
|
||||
<screen><computeroutput>Number Files Created: 10
|
||||
Errors:</computeroutput></screen>
|
||||
<para>The following auto-extract archive files example shows a
|
||||
<literal>text/plain</literal> response where some
|
||||
failures occurred. In this example, the Object Storage
|
||||
system is configured to reject certain character strings
|
||||
so that the <errorcode>400</errorcode>
|
||||
<errortext>Bad Request</errortext> error occurs for any
|
||||
objects that use the restricted strings.</para>
|
||||
<screen><computeroutput>Number Files Created: 8
|
||||
Errors:
|
||||
/v1/12345678912345/mycontainer/home/xx%3Cyy, 400 Bad Request
|
||||
/v1/12345678912345/mycontainer/../image.gif, 400 Bad Request</computeroutput></screen>
|
||||
<para>The following example shows the failure response in
|
||||
<literal>application/json</literal> format.</para>
|
||||
<programlisting language="json">{
|
||||
"Number Files Created":1,
|
||||
"Errors":[
|
||||
[
|
||||
"/v1/12345678912345/mycontainer/home/xx%3Cyy",
|
||||
"400 Bad Request"
|
||||
],
|
||||
[
|
||||
"/v1/12345678912345/mycontainer/../image.gif",
|
||||
"400 Bad Request"
|
||||
]
|
||||
]
|
||||
}</programlisting>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
@ -2,59 +2,58 @@
|
|||
<!DOCTYPE section [
|
||||
<!-- Useful for describing APIs -->
|
||||
<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'>
|
||||
<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'>
|
||||
<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'>
|
||||
]>
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
|
||||
xml:id="bulk-delete">
|
||||
<?dbhtml stop-chunking?>
|
||||
<title>Bulk delete</title>
|
||||
<para>To discover whether your Object Storage system supports
|
||||
this feature, see <xref linkend="discoverability"
|
||||
/>. Alternatively, check with your service provider.</para>
|
||||
<para>With bulk delete, you can delete up to 10,000 (configurable)
|
||||
objects or containers in one request. The objects to be
|
||||
deleted are listed in the body of a &POST; operation. Use
|
||||
the <parameter>bulk-delete</parameter> query parameter to
|
||||
indicate that you are performing a bulk delete operation
|
||||
instead of a normal delete.</para>
|
||||
<para>To discover whether your Object Storage system supports this
|
||||
feature, see <xref linkend="discoverability"/>. Alternatively,
|
||||
check with your service provider.</para>
|
||||
<para>With bulk delete, you can delete up to 10,000 objects or
|
||||
containers (configurable) in one request.</para>
|
||||
<section xml:id="bulk-delete-request">
|
||||
<title>Bulk delete request body</title>
|
||||
<title>Bulk delete request</title>
|
||||
<para>To perform a bulk delete operation, add the
|
||||
<parameter>bulk-delete</parameter> query parameter to
|
||||
the path. The path should be the account, such as
|
||||
<literal>/v1/12345678912345</literal>), that contains
|
||||
the objects and containers. You must set the
|
||||
<literal>Content-Type</literal> request header to
|
||||
<literal>text/plain</literal>.</para>
|
||||
<para>In the request body, specify a list of objects or
|
||||
containers names that are separated by a newline
|
||||
character.</para>
|
||||
<para>In addition:</para>
|
||||
the path of a &POST; or &DELETE; operation.</para>
|
||||
<note>
|
||||
<para>The &DELETE; operation is supported for backwards
|
||||
compatibility.</para>
|
||||
</note>
|
||||
<para>The path is the account, such as
|
||||
<literal>/v1/12345678912345</literal>, that contains
|
||||
the objects and containers.</para>
|
||||
<para>In the request body of the &POST; or &DELETE; operation,
|
||||
list the objects or containers to be deleted. Separate
|
||||
each name with a newline character. You can include a
|
||||
maximum of 10,000 items (configurable) in the list.</para>
|
||||
<para>In addition, you must:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>You must UTF-8-encode and then URL-encode the
|
||||
<para>UTF-8-encode and then URL-encode the
|
||||
names.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>To indicate an object, specify the container and
|
||||
object name as:
|
||||
<literal><replaceable>CONTAINER_NAME</replaceable>/<replaceable>OBJECT_NAME</replaceable></literal></para>
|
||||
<literal><replaceable>CONTAINER_NAME</replaceable>/<replaceable>OBJECT_NAME</replaceable></literal>.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>To indicate a container, specify the container
|
||||
name as:
|
||||
<literal><replaceable>CONTAINER_NAME</replaceable></literal></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>A container must be empty. If it contains
|
||||
objects, Object Storage does not delete the
|
||||
<literal><replaceable>CONTAINER_NAME</replaceable></literal>.
|
||||
Ensure that the container is empty. If it contains
|
||||
objects, Object Storage cannot delete the
|
||||
container.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>You can include a maximum of 10,000 items in the
|
||||
list. You can configure the maximum number of
|
||||
items value.</para>
|
||||
<para>Set the <literal>Content-Type</literal> request
|
||||
header to <literal>text/plain</literal>.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
@ -63,11 +62,13 @@
|
|||
<para>When Object Storage processes the request, it performs
|
||||
multiple sub-operations. Even if all sub-operations fail,
|
||||
the operation returns a <returnvalue>200</returnvalue>
|
||||
status. You must examine the response body to determine
|
||||
which members failed to result in an object
|
||||
deletion.</para>
|
||||
status. The bulk operation returns a response body that
|
||||
contains details that indicate which sub-operations have
|
||||
succeeded and failed. Some sub-operations might succeed
|
||||
while others fail: Examine the response body to determine
|
||||
the results of each delete sub-operation.</para>
|
||||
<para>You can set the <literal>Accept</literal> request header
|
||||
to one of these values, which defines the response
|
||||
to one of these values to define the response
|
||||
format:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
|
@ -87,73 +88,24 @@
|
|||
as XML.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>For more information, see <xref
|
||||
linkend="response-body-bulk-delete"/>.</para>
|
||||
</section>
|
||||
<section xml:id="response-body-bulk-delete">
|
||||
<title>Response body for bulk operations</title>
|
||||
<para>Some bulk operations, such as bulk delete and
|
||||
auto-extract archive files, perform multiple
|
||||
sub-operations. Some sub-operations might succeed while
|
||||
others fail. The bulk operation returns a response body
|
||||
that contains details that indicate which sub-operations
|
||||
have succeeded and failed.</para>
|
||||
<para>You can set the <literal>Accept</literal> request header
|
||||
to define the response format.</para>
|
||||
<para>The response body contains the following
|
||||
information:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>The number of files actually deleted or created,
|
||||
depending on context.</para>
|
||||
<para>The number of files actually deleted.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>The number of not found objects. For bulk delete
|
||||
only.</para>
|
||||
<para>The number of not found objects.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Errors. A list of object names and associated
|
||||
error statuses for the objects that failed to
|
||||
create or delete. The format depends on the value
|
||||
you set in the <literal>Accept</literal>
|
||||
delete. The format depends on the value that you
|
||||
set in the <literal>Accept</literal>
|
||||
header.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>The following auto-extract archive files example shows a
|
||||
<literal>text/plain</literal> response body where no
|
||||
failures occurred:</para>
|
||||
<screen><computeroutput>Number Files Created: 10
|
||||
Errors:</computeroutput></screen>
|
||||
<para>The following auto-extract archive files example shows a
|
||||
<literal>text/plain</literal> response where some
|
||||
failures occurred. In this example, the Object Storage
|
||||
system is configured to reject certain character strings
|
||||
so that the <errorcode>400</errorcode>
|
||||
<errortext>Bad Request</errortext> error occurs for any
|
||||
objects that use the restricted strings.</para>
|
||||
<screen><computeroutput>Number Files Created: 8
|
||||
Errors:
|
||||
/v1/12345678912345/mycontainer/home/xx%3Cyy, 400 Bad Request
|
||||
/v1/12345678912345/mycontainer/../image.gif, 400 Bad Request</computeroutput></screen>
|
||||
<para>The following example shows the failure response in
|
||||
<literal>application/json</literal> format. This
|
||||
example output has been reformatted with whitespace to
|
||||
make it easier to read. The actual response has no such
|
||||
whitespace.</para>
|
||||
<programlisting language="json">{
|
||||
"Number Files Created":1,
|
||||
"Errors":[
|
||||
[
|
||||
"/v1/12345678912345/mycontainer/home/xx%3Cyy",
|
||||
"400 Bad Request"
|
||||
],
|
||||
[
|
||||
"/v1/12345678912345/mycontainer/../image.gif",
|
||||
"400 Bad Request"
|
||||
]
|
||||
]
|
||||
}</programlisting>
|
||||
<para>The following bulk delete example response is in
|
||||
<para>The following bulk delete response is in
|
||||
<literal>application/xml</literal> format. In this
|
||||
example, the <literal>mycontainer</literal> container is
|
||||
not empty, so it cannot be deleted.</para>
|
||||
|
|
Loading…
Reference in New Issue