
Point to WADL files that generate the API Reference page so that the method descriptions and request and response parameters are consistent between these two docs: http://api.openstack.org/api-ref-objectstorage.html (API Reference page for Object Storage) http://docs.openstack.org/api/openstack-object-storage/1.0/ (API Reference (or spec) for Object Storage) Add descriptions of ACLs, FormPOST, TempURLs, StaticWeb, Bulk Upload, Bulk Delete, the OPTIONS operation (though this is implicit in CORS support) Validate all code examples Remove duplication. Co-Author: Donagh McCabe Closes-Bug: #1187119 Closes-Bug: #1214139 Closes-Bug: #1074198 Partial-Bug: #1255770 Change-Id: I94054b046a94260ba8825bdb42439adfcaf9fdce author: diane fleming
62 lines
3.3 KiB
XML
62 lines
3.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE section [
|
|
<!-- Useful for describing APIs -->
|
|
<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</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="expire-objects">
|
|
<title>Schedule objects for deletion</title>
|
|
<para>To discover whether your Object Storage system supports this
|
|
feature, see <xref linkend="discoverability"/>. Alternatively,
|
|
check with your service provider.</para>
|
|
<para>Scheduling an object for deletion is helpful for objects
|
|
that you do not want to permanently store, such as log files,
|
|
recurring full backups of a dataset, or documents or images
|
|
that become outdated at a specified future time.</para>
|
|
<para>To schedule an object for deletion, include one of these
|
|
headers with the &PUT; or &POST; request on the object:</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para><literal>X-Delete-After</literal></para>
|
|
<para>An integer value. Specifies the number of seconds in
|
|
the future when you want to delete the object.</para>
|
|
<para>This header is converted to an
|
|
<literal>X-Delete-At</literal> header that is set
|
|
to the sum of the <literal>X-Delete-After</literal>
|
|
value plus the current time, in seconds.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para><literal>X-Delete-At</literal></para>
|
|
<para>A UNIX Epoch timestamp, in integer form. For
|
|
example, <literal>1348691905</literal> represents
|
|
<literal>Wed, 26 Sep 2012 20:38:25 GMT</literal>.
|
|
Specifies the time when you want the object to expire,
|
|
not be served, and be deleted completely from the
|
|
object store.</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<para>Use the &POST; method to assign expiration headers to
|
|
existing objects that you want expire.</para>
|
|
<simplesect>
|
|
<title>Delete object at specified time request: HTTP</title>
|
|
<para>In the example, the <code>X-Delete-At</code> header is
|
|
assigned a UNIX Epoch timestamp in integer form for Mon,
|
|
11 Jun 2012 15:38:25 GMT. Use <link
|
|
xlink:href="http://www.epochconverter.com/"
|
|
>http://www.epochconverter.com/</link> for example
|
|
timestamps and a batch converter.</para>
|
|
<screen><prompt>#</prompt> <userinput>curl -i $publicURL/marktwain/goodbye -X PUT -H "X-Auth-Token: $token" -H "X-Delete-At: 1390581073" -H "Content-Length: 14" -H "Content-Type: application/octet-stream"</userinput></screen>
|
|
</simplesect>
|
|
<simplesect>
|
|
<title>Delete object after specified interval request:
|
|
HTTP</title>
|
|
<para>This example sets the <code>X-Delete-After</code> header
|
|
to a value in seconds that is equivalent to 10 days. After
|
|
this time, the object expires.</para>
|
|
<literallayout class="monospaced"><xi:include href="samples/object-delete-after-req.txt" parse="text"/></literallayout>
|
|
</simplesect>
|
|
</section>
|