Use the OpenStack APIs and extensions to launch server instances, create images, assign metadata to instances and images, create containers and objects, and complete other actions in your OpenStack cloud.
The API
You must install the packages for each API separately. You can use the APIs and extensions after you authenticate through the Identity API:
The Identity API is a RESTful web service. It is the entry point to all service APIs. To access the Identity API, you must know its URL.
Each REST request against Identity requires the X-Auth-Token header. Clients obtain this token, along with the URL to other service APIs, by first authenticating against Identity with valid credentials.
To authenticate, you must provide either a user ID and password or a token.
If the authentication token has expired, this call returns the
HTTP 401
status code.
If the token specified in the request has expired, this call
returns the HTTP 404
status code.
The Identity API treats expired tokens as no longer valid tokens.
The deployment determines how long expired tokens are stored.
Parameter | Style | Type | Description |
---|---|---|---|
tenantName (Optional) | plain | xsd:string |
The tenant name. Both the
|
tenantId (Optional) | plain | capi:UUID |
The tenant ID. Both the
|
passwordCredentials (Optional) | plain | xsd:string |
A
|
username (Optional) | plain | xsd:string |
The user name. Required if
you include the |
password (Optional) | plain | xsd:string |
The password of the user.
Required if you include the |
token (Optional) | plain | xsd:string |
A |
id (Optional) | plain | xsd:string |
The token ID. This is a
required field in the |
Parameter | Style | Type | Description |
---|---|---|---|
access | plain | xsd:string |
An |
token | plain | xsd:string |
A |
issued_at | plain | xsd:string |
A timestamp that indicates when the token was issued. |
expires | plain | xsd:string |
A timestamp that indicates when the token expires. |
id | plain | xsd:string |
The authentication token.
In the example, the token is |
tenant | plain | xsd:string |
A |
description | plain | xsd:string |
The description of the
tenant. If not set, this value is |
enabled | plain | xsd:boolean |
Indicates whether the tenant is enabled or disabled. |
id | plain | xsd:string |
The tenant ID. |
name | plain | xsd:string |
The tenant name. |
serviceCatalog | plain | xsd:string |
A
|
endpoints | plain | xsd:string |
One or more
|
endpoints_links | plain | xsd:string |
Links for the endpoint. |
type | plain | xsd:string |
Endpoint type. |
name | plain | xsd:string |
Endpoint name. |
user | plain | xsd:string |
A |
metadata | plain | xsd:string |
A |
{ "auth": { "tenantName": "demo", "passwordCredentials": { "username": "demo", "password": "secretsecret" } } }
{ "auth": { "tenantName": "demo", "token": { "id": "cbc36478b0bd8e67e89469c7749d4127" } } }
<?xml version="1.0" encoding="UTF-8"?> <auth xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://docs.openstack.org/identity/api/v2.0" tenantName="demo"> <passwordCredentials username="demo" password="secretsecret"/> </auth>
{ "access": { "token": { "issued_at": "2014-01-30T15:30:58.819584", "expires": "2014-01-31T15:30:58Z", "id": "aaaaa-bbbbb-ccccc-dddd", "tenant": { "description": null, "enabled": true, "id": "fc394f2ab2df4114bde39905f800dc57", "name": "demo" } }, "serviceCatalog": [ { "endpoints": [ { "adminURL": "http://23.253.72.207:8774/v2/fc394f2ab2df4114bde39905f800dc57", "region": "RegionOne", "internalURL": "http://23.253.72.207:8774/v2/fc394f2ab2df4114bde39905f800dc57", "id": "2dad48f09e2a447a9bf852bcd93548ef", "publicURL": "http://23.253.72.207:8774/v2/fc394f2ab2df4114bde39905f800dc57" } ], "endpoints_links": [], "type": "compute", "name": "nova" }, { "endpoints": [ { "adminURL": "http://23.253.72.207:9696/", "region": "RegionOne", "internalURL": "http://23.253.72.207:9696/", "id": "97c526db8d7a4c88bbb8d68db1bdcdb8", "publicURL": "http://23.253.72.207:9696/" } ], "endpoints_links": [], "type": "network", "name": "neutron" }, { "endpoints": [ { "adminURL": "http://23.253.72.207:8776/v2/fc394f2ab2df4114bde39905f800dc57", "region": "RegionOne", "internalURL": "http://23.253.72.207:8776/v2/fc394f2ab2df4114bde39905f800dc57", "id": "93f86dfcbba143a39a33d0c2cd424870", "publicURL": "http://23.253.72.207:8776/v2/fc394f2ab2df4114bde39905f800dc57" } ], "endpoints_links": [], "type": "volumev2", "name": "cinder" }, { "endpoints": [ { "adminURL": "http://23.253.72.207:8774/v3", "region": "RegionOne", "internalURL": "http://23.253.72.207:8774/v3", "id": "3eb274b12b1d47b2abc536038d87339e", "publicURL": "http://23.253.72.207:8774/v3" } ], "endpoints_links": [], "type": "computev3", "name": "nova" }, { "endpoints": [ { "adminURL": "http://23.253.72.207:3333", "region": "RegionOne", "internalURL": "http://23.253.72.207:3333", "id": "957f1e54afc64d33a62099faa5e980a2", "publicURL": "http://23.253.72.207:3333" } ], "endpoints_links": [], "type": "s3", "name": "s3" }, { "endpoints": [ { "adminURL": "http://23.253.72.207:9292", "region": "RegionOne", "internalURL": "http://23.253.72.207:9292", "id": "27d5749f36864c7d96bebf84a5ec9767", "publicURL": "http://23.253.72.207:9292" } ], "endpoints_links": [], "type": "image", "name": "glance" }, { "endpoints": [ { "adminURL": "http://23.253.72.207:8776/v1/fc394f2ab2df4114bde39905f800dc57", "region": "RegionOne", "internalURL": "http://23.253.72.207:8776/v1/fc394f2ab2df4114bde39905f800dc57", "id": "37c83a2157f944f1972e74658aa0b139", "publicURL": "http://23.253.72.207:8776/v1/fc394f2ab2df4114bde39905f800dc57" } ], "endpoints_links": [], "type": "volume", "name": "cinder" }, { "endpoints": [ { "adminURL": "http://23.253.72.207:8773/services/Admin", "region": "RegionOne", "internalURL": "http://23.253.72.207:8773/services/Cloud", "id": "289b59289d6048e2912b327e5d3240ca", "publicURL": "http://23.253.72.207:8773/services/Cloud" } ], "endpoints_links": [], "type": "ec2", "name": "ec2" }, { "endpoints": [ { "adminURL": "http://23.253.72.207:8080", "region": "RegionOne", "internalURL": "http://23.253.72.207:8080/v1/AUTH_fc394f2ab2df4114bde39905f800dc57", "id": "16b76b5e5b7d48039a6e4cc3129545f3", "publicURL": "http://23.253.72.207:8080/v1/AUTH_fc394f2ab2df4114bde39905f800dc57" } ], "endpoints_links": [], "type": "object-store", "name": "swift" }, { "endpoints": [ { "adminURL": "http://23.253.72.207:35357/v2.0", "region": "RegionOne", "internalURL": "http://23.253.72.207:5000/v2.0", "id": "26af053673df4ef3a2340c4239e21ea2", "publicURL": "http://23.253.72.207:5000/v2.0" } ], "endpoints_links": [], "type": "identity", "name": "keystone" } ], "user": { "username": "demo", "roles_links": [], "id": "9a6590b2ab024747bc2167c4e064d00d", "roles": [ { "name": "Member" }, { "name": "anotherrole" } ], "name": "demo" }, "metadata": { "is_admin": 0, "roles": [ "7598ac3c634d4c3da4b9126a5f67ca2b", "f95c0ab82d6045d9805033ee1fbc80d4" ] } } }
<?xml version="1.0" encoding="UTF-8"?> <access xmlns="http://docs.openstack.org/identity/api/v2.0"> <token issued_at="2014-01-30T15:49:11.054709" expires="2014-01-31T15:49:11Z" id="aaaaa-bbbbb-ccccc-dddd"> <tenant enabled="true" name="demo" id="fc394f2ab2df4114bde39905f800dc57"/> </token> <serviceCatalog> <service type="compute" name="nova"> <endpoints_links/> <endpoint adminURL="http://23.253.72.207:8774/v2/fc394f2ab2df4114bde39905f800dc57" region="RegionOne" publicURL="http://23.253.72.207:8774/v2/fc394f2ab2df4114bde39905f800dc57" internalURL="http://23.253.72.207:8774/v2/fc394f2ab2df4114bde39905f800dc57" id="2dad48f09e2a447a9bf852bcd93548ef" /> </service> <service type="network" name="neutron"> <endpoints_links/> <endpoint adminURL="http://23.253.72.207:9696/" region="RegionOne" publicURL="http://23.253.72.207:9696/" internalURL="http://23.253.72.207:9696/" id="97c526db8d7a4c88bbb8d68db1bdcdb8" /> </service> <service type="volumev2" name="cinder"> <endpoints_links/> <endpoint adminURL="http://23.253.72.207:8776/v2/fc394f2ab2df4114bde39905f800dc57" region="RegionOne" publicURL="http://23.253.72.207:8776/v2/fc394f2ab2df4114bde39905f800dc57" internalURL="http://23.253.72.207:8776/v2/fc394f2ab2df4114bde39905f800dc57" id="93f86dfcbba143a39a33d0c2cd424870" /> </service> <service type="computev3" name="nova"> <endpoints_links/> <endpoint adminURL="http://23.253.72.207:8774/v3" region="RegionOne" publicURL="http://23.253.72.207:8774/v3" internalURL="http://23.253.72.207:8774/v3" id="3eb274b12b1d47b2abc536038d87339e" /> </service> <service type="s3" name="s3"> <endpoints_links/> <endpoint adminURL="http://23.253.72.207:3333" region="RegionOne" publicURL="http://23.253.72.207:3333" internalURL="http://23.253.72.207:3333" id="957f1e54afc64d33a62099faa5e980a2" /> </service> <service type="image" name="glance"> <endpoints_links/> <endpoint adminURL="http://23.253.72.207:9292" region="RegionOne" publicURL="http://23.253.72.207:9292" internalURL="http://23.253.72.207:9292" id="27d5749f36864c7d96bebf84a5ec9767" /> </service> <service type="volume" name="cinder"> <endpoints_links/> <endpoint adminURL="http://23.253.72.207:8776/v1/fc394f2ab2df4114bde39905f800dc57" region="RegionOne" publicURL="http://23.253.72.207:8776/v1/fc394f2ab2df4114bde39905f800dc57" internalURL="http://23.253.72.207:8776/v1/fc394f2ab2df4114bde39905f800dc57" id="37c83a2157f944f1972e74658aa0b139" /> </service> <service type="ec2" name="ec2"> <endpoints_links/> <endpoint adminURL="http://23.253.72.207:8773/services/Admin" region="RegionOne" publicURL="http://23.253.72.207:8773/services/Cloud" internalURL="http://23.253.72.207:8773/services/Cloud" id="289b59289d6048e2912b327e5d3240ca" /> </service> <service type="object-store" name="swift"> <endpoints_links/> <endpoint adminURL="http://23.253.72.207:8080" region="RegionOne" publicURL="http://23.253.72.207:8080/v1/AUTH_fc394f2ab2df4114bde39905f800dc57" internalURL="http://23.253.72.207:8080/v1/AUTH_fc394f2ab2df4114bde39905f800dc57" id="16b76b5e5b7d48039a6e4cc3129545f3" /> </service> <service type="identity" name="keystone"> <endpoints_links/> <endpoint adminURL="http://23.253.72.207:35357/v2.0" region="RegionOne" publicURL="http://23.253.72.207:5000/v2.0" internalURL="http://23.253.72.207:5000/v2.0" id="26af053673df4ef3a2340c4239e21ea2" /> </service> </serviceCatalog> <user username="demo" id="9a6590b2ab024747bc2167c4e064d00d" name="demo"> <roles_links/> <role name="Member"/> <role name="anotherrole"/> </user> <metadata is_admin="0"> <roles> <role>7598ac3c634d4c3da4b9126a5f67ca2b</role> <role>f95c0ab82d6045d9805033ee1fbc80d4</role> </roles> </metadata> </access>
To get started with the APIs, see the OpenStack API Quick Start.