In this section you will list the databases in the specified database instance.
This operation does not require a request body.
The following examples show the cURL requests for List Databases for Instance:
Example 8.1. cURL List Databases for Instance Request: XML
curl -i \ -H 'X-Auth-Token: your_auth_token' \ -H 'Content-Type: application/xml' \ -H 'Accept: application/xml' \ 'https://ord.databases.api.rackspacecloud.com/v1.0/your_acct_id/instances/instance_id/databases'
Example 8.2. cURL List Databases for Instance Request: JSON
curl -i \ -H 'X-Auth-Token: your_auth_token' \ -H 'Content-Type: application/json' \ 'https://ord.databases.api.rackspacecloud.com/v1.0/your_acct_id/instances/instance_id/databases'
Remember to replace the names in the examples above with their actual respective values:
your_auth_token — as returned in your authentication response (see the examples in Chapter 4, Generate an Authentication Token)
your_acct_id — as returned in your authentication response (see the examples in Chapter 4, Generate an Authentication Token)
instance_id — as returned in your create instance response (see the examples in Chapter 7, Create a Database Instance with a Database and a User)
The following examples show the responses for Create User:
Example 8.3. List Databases for Instance Response: XML
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 109
Date: Thu, 05 Apr 2012 18:20:18 GMT
<databases xmlns="http://docs.openstack.org/database/api/v1.0">
<database name="sampledb"/>
</databases>
Example 8.4. List Databases for Instance Response: JSON
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 37
Date: Thu, 05 Apr 2012 18:13:53 GMT
{
"databases": [
{
"name": "sampledb"
}
]
}You can see that the database sampledb was
successfully created. Next you will list the users.

