openstack-manuals/doc/user-guide/section_object-api-env-vars.xml
Erik Wilson 1b49fe3f2c Adds serialized response formats to End User Guide
With the moving of the Object Storage API content from a
long-form dev guide to a specification, some topics needed
to be added to the End User Guide. Also included linked
environment variables topic.

Change-Id: I6b8cee64e0bb7ea8ba7291aea31b4b7853f214a3
Partial-bug: 1392382
2014-12-12 10:14:13 -06:00

45 lines
1.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<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="env-vars">
<title>Environment variables required to run examples</title>
<para>To run the cURL command examples for the Object Storage API
requests, set these environment variables:</para>
<variablelist>
<varlistentry>
<term><literal>publicURL</literal></term>
<listitem>
<para>The public URL that is the HTTP endpoint from
where you can access Object Storage. It includes
the Object Storage API version number and your
account name. For example,
<code>https://23.253.72.207/v1/my_account</code>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>token</literal></term>
<listitem>
<para>The authentication token for Object
Storage.</para>
</listitem>
</varlistentry>
</variablelist>
<para>To obtain these values, run the <command>swift stat
-v</command> command.</para>
<para>As shown in this example, the public URL appears in the
<literal>StorageURL</literal> field, and the token appears
in the <literal>Auth Token</literal> field:</para>
<programlisting>StorageURL: https://23.253.72.207/v1/my_account
Auth Token: {token}
Account: my_account
Containers: 2
Objects: 3
Bytes: 47
Meta Book: MobyDick
X-Timestamp: 1389453423.35964
X-Trans-Id: txee55498935404a2caad89-0052dd3b77
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes</programlisting>
</section>