In response to valid credentials, your request returns an authentication token and a service catalog with the endpoints to request services.
Do not include explicit API endpoints in your scripts and applications. Instead, find the endpoint for your service and region.
The following output shows a partial authentication response in JSON format:
Example 1.5. Authenticate: JSON Response
{
"access": {
"serviceCatalog": [
{
"endpoints": [
{
"internalURL": "https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_530f8649-324c-499c-a075-2195854d52a7",
"publicURL": "https://storage101.dfw1.clouddrive.com/v1/MossoCloudFS_530f8649-324c-499c-a075-2195854d52a7",
"region": "DFW",
"tenantId": "MossoCloudFS_530f8649-324c-499c-a075-2195854d52a7"
},
{
"internalURL": "https://snet-storage101.ord1.clouddrive.com/v1/MossoCloudFS_530f8649-324c-499c-a075-2195854d52a7",
"publicURL": "https://storage101.ord1.clouddrive.com/v1/MossoCloudFS_530f8649-324c-499c-a075-2195854d52a7",
"region": "ORD",
"tenantId": "MossoCloudFS_530f8649-324c-499c-a075-2195854d52a7"
}
],
"name": "cloudFiles",
"type": "object-store"
},
{
"endpoints": [
{
"publicURL": "https://servers.api.rackspacecloud.com/v1.0/010101",
"tenantId": "010101",
"versionId": "1.0",
"versionInfo": "https://servers.api.rackspacecloud.com/v1.0",
"versionList": "https://servers.api.rackspacecloud.com/"
}
],
"name": "cloudServers",
"type": "compute"
},
...
{
"endpoints": [
{
"publicURL": "https://dfw.servers.api.rackspacecloud.com/v2/010101",
"region": "DFW",
"tenantId": "010101",
"versionId": "2",
"versionInfo": "https://dfw.servers.api.rackspacecloud.com/v2",
"versionList": "https://dfw.servers.api.rackspacecloud.com/"
},
{
"publicURL": "https://ord.servers.api.rackspacecloud.com/v2/010101",
"region": "ORD",
"tenantId": "010101",
"versionId": "2",
"versionInfo": "https://ord.servers.api.rackspacecloud.com/v2",
"versionList": "https://ord.servers.api.rackspacecloud.com/"
}
],
"name": "cloudServersOpenStack",
"type": "compute"
},
...
],
"token": {
"expires": "2012-09-14T15:11:57.585-05:00",
"id": "858fb4c2-bf15-4dac-917d-8ec750ae9baa",
"tenant": {
"id": "010101",
"name": "010101"
}
},
"user": {
"RAX-AUTH:defaultRegion": "DFW",
"id": "170454",
"name": "MyRackspaceAcct",
"roles": [
{
"description": "User Admin Role.",
"id": "3",
"name": "identity:user-admin"
}
]
}
}
}
Successful authentication returns the following information:
| Endpoints to
request Rackspace Cloud
services. Appears in the
Endpoints information includes the public URL, which is the endpoint that you use to access the service, region, tenant ID, and version information. To access the Cloud
Networks or next generation Cloud
Servers service, use the endpoint for
the
|
| Tenant
ID. Appears in the
You include the tenant ID in the endpoint URL when you call a Cloud service. In the following example, you export
the tenant ID,
$ export account="010101"
$ export token="00000000-0000-0000-000000000000"
$ curl -s https://dfw.servers.api.rackspacecloud.com/v2/$account/images/detail \
-H "X-Auth-Token: $token" | python -m json.tool |
| The name of
the service. Appears in
the Locate the correct service name in the service catalog, as follows:
|
| Expiration
date and time for authentication
token. Appears in the
After this date and time, the token is no longer valid. This field predicts the maximum lifespan for a token, but does not guarantee that the token reaches that lifespan. Clients are encouraged to cache a token until it expires. Because the authentication token expires after 24 hours, you must generate a token once a day. |
| Authentication
token. Appears in the
You pass the authentication token in
the In the following example, you export
the tenant ID,
$ export account="010101"
$ export token="00000000-0000-0000-000000000000"
$ curl -s https://dfw.servers.api.rackspacecloud.com/v2/$account/images/detail \
-H "X-Auth-Token: $token" | python -m json.tool |

