Make the returned endpoints more consistent in the API Quick Start.

Also trigger the build to test a change in Ci infrastructure.

fix bug 1085250

Change-Id: Iabb6c72551be07910de9ec2d5312cee64ec78d82
This commit is contained in:
annegentle
2012-12-04 13:05:00 -06:00
parent 56360dd008
commit 6a14a28c55

View File

@@ -54,14 +54,14 @@
http://hostname:port/v2.0/tokens. You send your
user name, password, and what group or account you
are with (the "tenant" in auth-speak). </para>
<para><programlisting language="bash" role="gutter: false">curl -k -X 'POST' -v https://nova-api.trystack.org:5443/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username": "joecool", "password":"coolword"}, "tenantId":"5"}}' -H 'Content-type: application/json'</programlisting></para>
<para><programlisting language="bash" role="gutter: false">curl -k -X 'POST' -v https://arm.trystack.org:5443/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username": "joecool", "password":"coolword"}, "tenantId":"5"}}' -H 'Content-type: application/json'</programlisting></para>
</listitem>
<listitem>
<para>The server returns a response in which the
24-hours token is contained. Use that token to
send API requests with the X-Auth-Token included
as an header field.</para>
<para><programlisting language="bash" role="gutter: false">curl -k -D - -H "X-Auth-Token: 7d2f63fd-4dcc-4752-8e9b-1d08f989cc00" -X 'GET' -v https://nova-api.trystack.org:9774/v1.1/296/extensions -H 'Content-type: application/json' </programlisting></para>
<para><programlisting language="bash" role="gutter: false">curl -k -D - -H "X-Auth-Token: 7d2f63fd-4dcc-4752-8e9b-1d08f989cc00" -X 'GET' -v https://arm.trystack.org:9774/v1.1/296/extensions -H 'Content-type: application/json' </programlisting></para>
</listitem>
<listitem>
@@ -81,13 +81,14 @@
if you know your
tenantId:<programlisting language="bash" role="gutter: false">
$ curl -X 'POST' -v
https://nova-api.trystack.org:5443/v2.0/tokens -d
https://arm.trystack.org:5443/v2.0/tokens -d
'{"auth":{"passwordCredentials":{"username": "joecool", "password":"coolword"}, "tenantId":"5"}}' -H 'Content-type: application/json'
</programlisting></para>
<para>In return, you should get a 200 OK response with a token
in the form of "id":
"cd427a33-bb4a-4079-a6d7-0ae148bdeda9" and an expiration
date 24 hours from now. Here's what it looks like:</para>
date 24 hours from now. Here's what it looks like, the
exact response may vary from cloud-to-cloud:</para>
<para>
<programlisting language="bash" role="gutter: false">
{
@@ -96,9 +97,9 @@ https://nova-api.trystack.org:5443/v2.0/tokens -d
{
"endpoints": [
{
"adminURL": "https://nova-api.trystack.org:9774/v1.1/1",
"internalURL": "https://nova-api.trystack.org:9774/v1.1/1",
"publicURL": "https://nova-api.trystack.org:9774/v1.1/1",
"adminURL": "https://arm.trystack.org:9774/v1.1/1",
"internalURL": "https://arm.trystack.org:9774/v1.1/1",
"publicURL": "https://arm.trystack.org:9774/v1.1/1",
"region": "RegionOne"
}
],
@@ -120,7 +121,7 @@ https://nova-api.trystack.org:5443/v2.0/tokens -d
{
"endpoints": [
{
"adminURL": "https://nova-api.trystack.org:5443/v2.0",
"adminURL": "https://arm.trystack.org:5443/v2.0",
"internalURL": "https://keystone.trystack.org:5000/v2.0",
"publicURL": "https://keystone.trystack.org:5000/v2.0",
"region": "RegionOne"
@@ -140,7 +141,7 @@ https://nova-api.trystack.org:5443/v2.0/tokens -d
},
"user": {
"id": "14",
"name": "annegentle",
"name": "joecool",
"roles": [
{
"id": "2",
@@ -157,7 +158,7 @@ https://nova-api.trystack.org:5443/v2.0/tokens -d
'{"auth":{"passwordCredentials":{"username": "usern4me", "password":"passwerd"}, "tenantId":""}}'
</programlisting>
<para>Then, with the auth token that returns, fill in a request using the X-Auth-Token header as an authentication to get your tenantId:</para>
<programlisting>curl -H "X-Auth-Token:6de6d45d-d198-4222-9b4c-7a280aa24999" http://arm.trystack.org:5000/v2.0/tenants</programlisting>
<programlisting>curl -H "X-Auth-Token:6de6d45d-d198-4222-9b4c-7a280aa24888" http://arm.trystack.org:5000/v2.0/tenants</programlisting>
<para>In return, you get a list of
tenants:<programlisting language="bash" role="gutter: false">{
"tenants_links": [],