Lists information about all versions of the API. This operation lists information about all versions of the API. The following examples show the List Versions requests: List Versions Request: XML GET / HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Versions Request: JSON GET / HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List Versions responses: List Versions Response: XML HTTP/1.1 200 OK Content-Type: application/xml Content-Length: 261 Date: Wed, 25 Jan 2012 21:53:04 GMT <versions xmlns="http://docs.openstack.org/database/api/v1.0"> <version id="v1.0" status="CURRENT" updated="2012-01-01T00:00:00Z"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/" rel="self"/> </links> </version> </versions> List Versions Response: JSON HTTP/1.1 200 OK Content-Type: application/json Content-Length: 153 Date: Wed, 25 Jan 2012 21:53:04 GMT { "versions": [ { "id": "v1.0", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/", "rel": "self" } ], "status": "CURRENT", "updated": "2012-01-01T00:00:00Z" } ] } Returns detailed information about the specified version of the API. This operation returns detailed information about the specified version of the API. The following examples show the List Version Details requests: List Version Details Request: XML GET /v1.0/ HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Version Details Request: JSON GET /v1.0/ HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List Version Details responses: List Version Details Response: XML HTTP/1.1 200 OK Content-Type: application/xml Content-Length: 218 Date: Wed, 25 Jan 2012 21:53:04 GMT <version id="v1.0" status="CURRENT" updated="2012-01-01T00:00:00Z" xmlns="http://docs.openstack.org/database/api/v1.0"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/" rel="self"/> </links> </version> List Version Details Response: JSON HTTP/1.1 200 OK Content-Type: application/json Content-Length: 150 Date: Wed, 25 Jan 2012 21:53:04 GMT { "version": { "id": "v1.0", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/", "rel": "self" } ], "status": "CURRENT", "updated": "2012-01-01T00:00:00Z" } } The account ID of the owner of the specified instance. Creates a new database instance. This operation asynchronously provisions a new database instance. This call requires the user to specify a flavor and a volume size. The service then provisions the instance with the requested flavor and sets up a volume of the specified size, which is the storage for the database instance. Notes You can create only one database instance per POST request. You can create a database instance with one or more databases, and users associated to those databases. The default binding for the MySQL instance is port 3306. The following table lists the required and optional attributes for Create Instance:
Required and Optional Attributes for Create Instance
Applies To Name Description Required
Instance flavorRef Reference (href) to a flavor as specified in the response from the List Flavors API call. This is the actual URI as specified by the href field in the link. Refer to the List Flavors response examples that follow for an example of the flavorRef. Rather than the flavor URI, you can also pass the flavor id (integer) as the value for flavorRef. Refer to for details. Yes
(volume) size Specifies the volume size in gigabytes (GB). The value specified must be between 1 and 50. Yes
name Name of the instance to create. The length of the name is limited to 255 characters and any characters are permitted. No
Database name Specifies database names for creating databases on instance creation. Refer to for the required xml/json format. No
character_set Set of symbols and encodings. The default character set is utf8. No
collate Set of rules for comparing characters in a character set. The default value for collate is utf8_general_ci. No
User name Specifies user name for the database on instance creation. Refer to for the required xml/json format. No
password Specifies password for those users on instance creation. Refer to for the required xml/json format. No
(database) name Specifies names of databases that those users can access on instance creation. Refer to for the required xml/json format. No
Refer to for a list of possible database instance statuses that may be returned.
The following examples show the Create Database Instance requests and responses: Create Database Instance Request: XML POST /v1.0/1234/instances HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml <instance xmlns="http://docs.openstack.org/database/api/v1.0" flavorRef="1" name="xml_rack_instance"> <volume size="2"/> <users> <user password="demopassword" name="demouser"> <databases> <database name="sampledb"/> </databases> </user> </users> <databases> <database collate="utf8_general_ci" name="sampledb" character_set="utf8"/> <database name="nextround"/> </databases> </instance> Create Database Instance Request: JSON POST /v1.0/1234/instances HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json { "instance": { "databases": [ { "character_set": "utf8", "collate": "utf8_general_ci", "name": "sampledb" }, { "name": "nextround" } ], "flavorRef": 1, "name": "json_rack_instance", "users": [ { "databases": [ { "name": "sampledb" } ], "name": "demouser", "password": "demopassword" } ], "volume": { "size": 2 } } } Create Database Instance Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 724 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <instance created="2013-03-18 19:09:17.441489" id="098653ba-218b-47ce-936a-e0b749101f81" name="xml_rack_instance" status="BUILD" updated="2013-03-18 19:09:17.441606" xmlns="http://docs.openstack.org/database/api/v1.0"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/instances/098653ba-218b-47ce-936a-e0b749101f81" rel="bookmark"/> </links> <volume size="2"/> <flavor id="1"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/1" rel="bookmark"/> </links> </flavor> </instance> Create Database Instance Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 591 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "instance": { "created": "2013-03-18T19:09:17", "flavor": { "id": "1", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/1", "rel": "bookmark" } ] }, "id": "44b277eb-39be-4921-be31-3d61b43651d7", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/instances/44b277eb-39be-4921-be31-3d61b43651d7", "rel": "bookmark" } ], "name": "json_rack_instance", "status": "BUILD", "updated": "2013-03-18T19:09:17", "volume": { "size": 2 } } } For convenience, notice in the response examples above that resources contain links to themselves. This allows a client to easily obtain resource URIs rather than to construct them. There are two kinds of link relations associated with resources. A self link contains a versioned link to the resource. These links should be used in cases where the link will be followed immediately. A bookmark link provides a permanent link to a resource that is appropriate for long term storage.
Lists the status and information for all database instances. This operation lists the status and information for all database instances. Refer to for a list of possible database instance statuses that may be returned. The following examples show the List All Database Instances Detail requests: List All Database Instances Request: XML GET /v1.0/1234/instances HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List All Database Instances Request: JSON GET /v1.0/1234/instances HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List All Database Instances responses: List All Database Instances Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 1380 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <instances xmlns="http://docs.openstack.org/database/api/v1.0"> <instance id="098653ba-218b-47ce-936a-e0b749101f81" name="xml_rack_instance" status="ACTIVE"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/instances/098653ba-218b-47ce-936a-e0b749101f81" rel="bookmark"/> </links> <volume size="2"/> <flavor id="1"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/1" rel="bookmark"/> </links> </flavor> </instance> <instance id="44b277eb-39be-4921-be31-3d61b43651d7" name="json_rack_instance" status="ACTIVE"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/instances/44b277eb-39be-4921-be31-3d61b43651d7" rel="bookmark"/> </links> <volume size="2"/> <flavor id="1"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/1" rel="bookmark"/> </links> </flavor> </instance> </instances> List All Database Instances Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 1038 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "instances": [ { "flavor": { "id": "1", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/1", "rel": "bookmark" } ] }, "id": "098653ba-218b-47ce-936a-e0b749101f81", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/instances/098653ba-218b-47ce-936a-e0b749101f81", "rel": "bookmark" } ], "name": "xml_rack_instance", "status": "ACTIVE", "volume": { "size": 2 } }, { "flavor": { "id": "1", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/1", "rel": "bookmark" } ] }, "id": "44b277eb-39be-4921-be31-3d61b43651d7", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/instances/44b277eb-39be-4921-be31-3d61b43651d7", "rel": "bookmark" } ], "name": "json_rack_instance", "status": "ACTIVE", "volume": { "size": 2 } } ] } The instance ID for the specified database instance. Lists status and details for a specified database instance. This operation lists the status and details of the specified database instance. This operation lists the volume size in gigabytes (GB) and the approximate GB used. After instance creation, the used size of your volume will be greater than 0. This is expected and due to the automatic creation of non-empty transaction logs for mysql optimization. The used attribute is not returned in the response when the status for the instance is BUILD, REBOOT, RESIZE, or ERROR. Refer to for a list of possible database instance statuses that may be returned. The list operations return a DNS-resolvable hostname associated with the database instance instead of an IP address. Since the hostname always resolves to the correct IP address of the database instance, this relieves the user from the task of maintaining the mapping. Note that although the IP address may likely change on resizing, migrating, and so forth, the hostname always resolves to the correct database instance. The following examples show the List Database Instance Status and Details requests: List Database Instance Status and Details Request: XML GET /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Database Instance Status and Details Request: JSON GET /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml The following examples show the List Database Instance Status and Details responses: List Database Instance Status and Details Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 747 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <instance created="2013-03-18 19:09:17.441489" id="098653ba-218b-47ce-936a-e0b749101f81" name="xml_rack_instance" status="ACTIVE" updated="2013-03-18 19:09:17.513134" xmlns="http://docs.openstack.org/database/api/v1.0"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/instances/098653ba-218b-47ce-936a-e0b749101f81" rel="bookmark"/> </links> <volume size="2" used="0.163685983978"/> <flavor id="1"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/1" rel="bookmark"/> </links> </flavor> </instance> List Database Instance Status and Details Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 621 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "instance": { "created": "2013-03-18T19:09:17", "flavor": { "id": "1", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/1", "rel": "bookmark" } ] }, "id": "44b277eb-39be-4921-be31-3d61b43651d7", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/instances/44b277eb-39be-4921-be31-3d61b43651d7", "rel": "bookmark" } ], "name": "json_rack_instance", "status": "ACTIVE", "updated": "2013-03-18T19:09:17", "volume": { "size": 2, "used": 0.16368598397821188 } } } Deletes the specified database instance. This operation deletes the specified database instance, including any associated data. Refer to for a list of possible database instance statuses that may be returned. This operation is not allowed when the instance status is BUILD. The following examples show the Delete Database Instance requests: Delete Database Instance Request: XML DELETE /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml Delete Database Instance Request: JSON DELETE /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the Delete Database Instance responses: Delete Database Instance Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:18 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Delete Database Instance Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:18 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Resize the memory of the instance. This operation changes the memory size of the instance, assuming a valid flavorRef is provided. Restarts MySQL in the process. The following examples show the Resize Instance requests: Resize the Instance Request: XML POST /v1.0/1234/instances/5d891bb6-6c61-4b0a-8b85-26f4ee461c9d/action HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 2eeb3252-0164-40f5-8fb7-85df5faa2698 Accept: application/xml Content-Type: application/xml <?xml version="1.0" ?> <resize xmlns="http://docs.openstack.org/database/api/v1.0"> <flavorRef>https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/2</flavorRef> </resize> Resize the Instance Request: JSON POST /v1.0/1234/instances/23a3d4fb-3731-497b-afd4-bf25bde2b5fc/action HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 2eeb3252-0164-40f5-8fb7-85df5faa2698 Accept: application/json Content-Type: application/json { "resize": { "flavorRef": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/2" } } The following examples show the Resize Instance responses: Resize the Instance Response: XML HTTP/1.1 202 Accepted Content-Type: text/plain; charset=UTF-8 Content-Length: 58 Date: Mon, 06 Feb 2012 21:28:11 GMT Resize the Instance Response: JSON HTTP/1.1 202 Accepted Content-Type: text/plain; charset=UTF-8 Content-Length: 58 Date: Mon, 06 Feb 2012 21:28:10 GMT Resize the volume attached to the Instance. This operation supports resizing the attached volume for an instance. It supports only increasing the volume size and does not support decreasing the size. The volume size is in gigabytes (GB) and must be an integer. You cannot increase the volume to a size larger than the API volume size limit specifies. This operation returns a 202 Accepted response. The following examples show the Resize Instance Volume requests: Resize the Instance Volume Request: XML POST /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/action HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml <resize xmlns="http://docs.openstack.org/database/api/v1.0"> <volume size="4"/> </resize> Resize the Instance Volume Request: JSON POST /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/action HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json { "resize": { "volume": { "size": 4 } } } The following examples show the Resize Instance Volume responses: Resize the Instance Volume Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:18 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Resize the Instance Volume Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:18 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Restart the database service on the instance. The restart operation will restart only the MySQL Instance. Restarting MySQL will erase any dynamic configuration settings that you have made within MySQL. The MySQL service will be unavailable until the instance restarts. This operation returns a 202 Accepted response. The following examples show the Restart Instance requests: Restart Instance Request: XML POST /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/action HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml <restart xmlns="http://docs.openstack.org/database/api/v1.0"/> Restart Instance Request: JSON POST /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/action HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json { "restart": {} } The following examples show the Restart Instance responses: Restart Instance Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:18 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Restart Instance Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:18 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Creates a new database within the specified instance. This operation creates a new database within the specified instance. The name of the database is a required attribute. The following additional attributes can be specified for each database: collate and character_set.
Required and Optional Attributes for Create Database
Name Description Required
name Specifies the database name for creating the database. Refer to the request examples for the required xml/json format. Yes
character_set Set of symbols and encodings. The default character set is utf8. No
collate Set of rules for comparing characters in a character set. The default value for collate is utf8_general_ci. No
See the MySQL documentation for information about supported character sets and collations at http://dev.mysql.com/doc/refman/5.1/en/charset-mysql.html. The following database names are reserved and cannot be used for creating databases: lost+found, information_schema, and mysql. Refer to the following tables for information about characters that are valid/invalid for creating database names.
Valid Characters That Can Be Used in a Database Name
Character
Letters (upper and lower cases allowed)
Numbers
'@', '?', '#', and spaces are allowed, but not at the beginning and end of the database name
'_' is allowed anywhere in the database name
Characters That Cannot Be Used in a Database Name
Character
Single quotes
Double quotes
Back quotes
Semicolons
Commas
Backslashes
Forwardslashes
Length Restrictions for Database Name
Restriction Value
Database-name maximum length 64
The following examples show the Create Database requests: Create Database Request: XML POST /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/databases HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml <databases xmlns="http://docs.openstack.org/database/api/v1.0"> <database collate="utf8_general_ci" name="testingdb" character_set="utf8"/> <database name="anotherdb"/> <database name="oneMoreDB"/> </databases> Create Database Request: JSON POST /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/databases HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json { "databases": [ { "character_set": "utf8", "collate": "utf8_general_ci", "name": "testingdb" }, { "name": "anotherdb" }, { "name": "oneMoreDB" } ] } The following examples show the Create Database responses: Create Database Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Create Database Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT)
Lists databases for the specified instance. This operation lists the databases for the specified instance. This operation returns only the user-defined databases, not the system databases. The system databases (mysql, information_schema, lost+found) can only be viewed by a database administrator. The following examples show the List Databases for Instance requests: List Databases for Instance Request: XML GET /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/databases HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Databases for Instance Request: JSON GET /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/databases HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the paginated List Databases for Instance requests: List Databases for Instance Paged Request: XML GET /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/databases?limit=2 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Databases for Instance Paged Request: JSON GET /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/databases?limit=1 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List Databases for Instance responses: List Databases for Instance Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 241 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <databases xmlns="http://docs.openstack.org/database/api/v1.0"> <database name="anotherdb"/> <database name="nextround"/> <database name="oneMoreDB"/> <database name="sampledb"/> <database name="testingdb"/> </databases> List Databases for Instance Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 129 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "databases": [ { "name": "anotherdb" }, { "name": "nextround" }, { "name": "oneMoreDB" }, { "name": "sampledb" }, { "name": "testingdb" } ] } The following examples show the paginated List Databases for Instance responses: List Databases for Instance Paged Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 321 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <databases xmlns="http://docs.openstack.org/database/api/v1.0"> <database name="anotherdb"/> <database name="nextround"/> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/databases?marker=nextround&amp;limit=2" rel="next"/> </links> </databases> List Databases for Instance Paged Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 192 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "databases": [ { "name": "anotherdb" } ], "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/databases?marker=anotherdb&limit=1", "rel": "next" } ] } The name for the specified database. Deletes the specified database. This operation deletes the requested database within the specified database instance. Note that all data associated with the database is also deleted. The following examples show the Delete Database requests: Delete Database Request: XML DELETE /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/databases/oneMoreDB HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml Delete Database Request: JSON DELETE /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/databases/testingdb HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the Delete Database responses: Delete Database Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Delete Database Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT)
Creates a user for the specified database instance. This operation asynchronously provisions a new user for the specified database instance based on the configuration defined in the request object. Once the request is validated and progress has started on the provisioning process, a 202 Accepted response object is returned. Writer: please add the following note back into the doc once the List User Details call is added back into the API: Using the identifier, the caller can check on the progress of the operation by performing a GET on users/name (for more details on this operation see the "List User Details" section of this document). If the corresponding request cannot be fulfilled due to insufficient or invalid data, an HTTP 400 "Bad Request" error response is returned with information regarding the nature of the failure. Failures in the validation process are non-recoverable and require the caller to correct the cause of the failure and POST the request again. The following table lists the required attributes for Create User. Refer to the request examples for the required xml/json format:
Required Attributes for Create User
Applies To Name Description Required
User name Name of the user for the database. Yes
password User password for database access. Yes
(database) name Name of the database that the user can access. One or more database names must be specified. No
Notes A user is granted all privileges on the specified databases. The following user name is reserved and cannot be used for creating users: root. Refer to the following tables for information about characters that are valid/invalid for creating database names, user names, and passwords.
Valid Characters That Can Be Used in a Database Name, User Name, and Password
Character
Letters (upper and lower cases allowed)
Numbers
'@', '?', '#', and spaces are allowed, but not at the beginning and end of the database name, user name, and password
"_" is allowed anywhere in the database name, user name, and password
Characters That Cannot Be Used in a Database Name, User Name, and Password
Character
Single quotes
Double quotes
Back quotes
Semicolons
Commas
Backslashes
Forwardslashes
Spaces at the front or end of the user name or password
Length Restrictions for Database Name, User Name, and Password
Restriction Value
Database name maximum length 64
User name maximum length 16
Password maximum length unlimited (no restrictions)
The following examples show the Create User requests: Create User Request: XML POST /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/users HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml <users xmlns="http://docs.openstack.org/database/api/v1.0"> <user password="password" name="dbuser1" database="databaseA"/> <user password="password" name="dbuser2"> <databases> <database name="databaseB"/> <database name="databaseC"/> </databases> </user> <user password="password" name="dbuser3" database="databaseD"/> </users> Create User Request: JSON POST /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/users HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json { "users": [ { "database": "databaseA", "name": "dbuser1", "password": "password" }, { "databases": [ { "name": "databaseB" }, { "name": "databaseC" } ], "name": "dbuser2", "password": "password" }, { "database": "databaseD", "name": "dbuser3", "password": "password" } ] } The following examples show the Create User responses: Create User Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Create User Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT)
Lists the users in the specified database instance. This operation lists the users in the specified database instance, along with the associated databases for that user. This operation does not return the system users (database administrators that administer the health of the database). Also, this operation returns the "root" user only if "root" user has been enabled. The following notes apply to MySQL users: User names can be up to 16 characters long. When you create accounts with INSERT, you must use FLUSH PRIVILEGES to tell the server to reload the grant tables. For additional information, refer to: http://dev.mysql.com/doc/refman/5.1/en/user-account-management.html The following examples show the List Users in Database Instance requests: List Users in Database Instance Request: XML GET /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/users HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Users in Database Instance Request: JSON GET /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/users HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the paginated List Users in Database Instance requests: List Users in Database Instance Paged Request: XML GET /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/users?limit=2 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Users in Database Instance Paged Request: JSON GET /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/users?limit=2 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List Users in Database Instance responses: List Users in Database Instance Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 468 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <users xmlns="http://docs.openstack.org/database/api/v1.0"> <user name="dbuser1"> <databases/> </user> <user name="dbuser2"> <databases> <database name="databaseB"/> <database name="databaseC"/> </databases> </user> <user name="dbuser3"> <databases/> </user> <user name="demouser"> <databases> <database name="sampledb"/> </databases> </user> </users> List Users in Database Instance Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 228 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "users": [ { "databases": [], "name": "dbuser1" }, { "databases": [ { "name": "databaseB" }, { "name": "databaseC" } ], "name": "dbuser2" }, { "databases": [], "name": "dbuser3" }, { "databases": [ { "name": "sampledb" } ], "name": "demouser" } ] } The following examples show the paginated List Users in Database Instance responses: List Users in Database Instance Paged Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 461 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <users xmlns="http://docs.openstack.org/database/api/v1.0"> <user name="dbuser1"> <databases/> </user> <user name="dbuser2"> <databases> <database name="databaseB"/> <database name="databaseC"/> </databases> </user> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/users?marker=dbuser2&amp;limit=2" rel="next"/> </links> </users> List Users in Database Instance Paged Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 279 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/users?marker=dbuser2&limit=2", "rel": "next" } ], "users": [ { "databases": [], "name": "dbuser1" }, { "databases": [ { "name": "databaseB" }, { "name": "databaseC" } ], "name": "dbuser2" } ] } Changes the MySQL password of one or more users. This operation changes the MySQL password of one or more users. For information about choosing a valid password, please refer to for details. The following examples show the Change User(s) Password requests: Change User(s) Password Request: XML PUT /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml <users xmlns="http://docs.openstack.org/database/api/v1.0"> <user password="5" name="exampleuser"/> </users> Change User(s) Password Request: JSON PUT /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json { "users": [ { "name": "dbuser1", "password": "newpassword" }, { "name": "dbuser2", "password": "anotherpassword" } ] } The following examples show the Change User(s) Password responses: Change User(s) Password Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Content-Length: 501 Date: Wed, 27 Jun 2012 21:56:06 GMT Change User(s) Password Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Content-Length: 152 Date: Wed, 21 Mar 2012 17:46:46 GMT The name for the specified user. Deletes the user identified by {name} for the specified database instance. This operation deletes the specified user for the specified database instance. There is a bug in a python library that development is using that may cause incorrect user deletions to occur if a period (.) is used in the user name. In this case, the user name is truncated to remove the portion of the name from the period to the end, leaving only the portion from the beginning up to the period. For example, for a user named "my.userA", the bug would truncate the user name to "my", and if the user "my" exists, that user will be incorrectly deleted. To avoid the problem, do not use periods in user names. The following examples show the Delete User requests: Delete User Request: XML DELETE /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/users/testuser HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml Delete User Request: JSON DELETE /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/users/testuser HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the Delete User responses: Delete User Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Delete User Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Lists the specified user's name and a list of databases that the user can access. This operation lists the specified user's name and a list of databases that the user can access. The following examples show the List User requests: List User Request: XML GET /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/testuser HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List User Request: JSON GET /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/exampleuser HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List User responses: List User Response: XML HTTP/1.1 200 OK Content-Type: application/xml Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT <user name="testuser" xmlns="http://docs.openstack.org/database/api/v1.0"> <databases> <database name="exampledb"/> </databases> </user> List User Response: JSON HTTP/1.1 200 OK Content-Type: application/json Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT { "user": { "name": "exampleuser", "databases": [ { "name": "databaseA" }, { "name": "databaseB" } ] } } Shows a list of all databases a user has access to. This operation shows a list of all databases a user has access to. The following examples show the List User Access requests: List User Access Request: XML GET /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/testuser/databases HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List User Access Request: JSON GET /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/exampleuser/databases HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List User Access responses: List User Access Response: XML HTTP/1.1 200 OK Content-Type: application/xml Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT <databases xmlns="http://docs.openstack.org/database/api/v1.0"> <database name="exampledb"/> </databases> List User Access Response: JSON HTTP/1.1 200 OK Content-Type: application/json Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT { "databases": [ { "name": "databaseA" }, { "name": "databaseB" } ] } Grant access for the specified user to one or more databases for the specified instance. This operation grants access for the specified user to one or more databases for the specified instance. The user is granted ALL privileges on the database. Refer to the information at the beginning of for more details on access. The following examples show the Grant User Access requests: Grant User Access Request: XML PUT /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/testuser/databases HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml <databases xmlns="http://docs.openstack.org/database/api/v1.0"> <database name="extradb"/> </databases> Grant User Access Request: JSON PUT /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/exampleuser/databases HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json { "databases": [ { "name": "databaseC" }, { "name": "databaseD" } ] } The following examples show the Grant User Access responses: Grant User Access Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT Grant User Access Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT The name for the specified database. Remove access to the specified database for the specified user. This operation removes access to the specified database for the specified user. The following examples show the Revoke User Access requests: Revoke User Access Request: XML DELETE /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/testuser/databases/extradb HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml Revoke User Access Request: JSON DELETE /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/exampleuser/databases/databaseC HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the Revoke User Access responses: Revoke User Access Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT Revoke User Access Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT
Enables the root user for the specified database instance and returns the root password. This operation enables login from any host for the root user and provides the user with a generated root password. Changes you make as a root user may cause detrimental effects to the database instance and unpredictable behavior for API operations. When you enable the root user, you accept the possibility that we will not be able to support your database instance. While enabling root does not prevent us from a “best effort” approach to helping you if something goes wrong with your instance, we cannot ensure that we will be able to assist you if you change core MySQL settings. These changes can be (but are not limited to) turning off binlogs, removing users that we use to access your instance, and so forth. The following examples show the Enable Root User requests: Enable Root User Request: XML POST /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/root HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml Enable Root User Request: JSON POST /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/root HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the Enable Root User responses: Enable Root User Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 89 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <user name="root" password="12345" xmlns="http://docs.openstack.org/database/api/v1.0"/> Enable Root User Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 47 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "user": { "name": "root", "password": "12345" } } Returns true if root user is enabled for the specified database instance or false otherwise. This operation checks an active specified database instance to see if root access is enabled. It returns True if root user is enabled for the specified database instance or False otherwise. The following examples show the Check Root User Access requests: List Root-Enabled Status Request: XML GET /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/root HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Root-Enabled Status Request: JSON GET /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/root HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the Check Root User Access responses: List Root-Enabled Status Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 90 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <rootEnabled xmlns="http://docs.openstack.org/database/api/v1.0"> True </rootEnabled> List Root-Enabled Status Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 21 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "rootEnabled": true }
Lists information for all available flavors. This operation lists information for all available flavors. This resource is identical to the flavors found in the OpenStack Nova API, but without the disk property. The following examples show the List Flavors requests: List Flavors Request: XML GET /v1.0/1234/flavors HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Flavors Request: JSON GET /v1.0/1234/flavors HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List Flavors responses: List Flavors Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 1600 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <flavors xmlns="http://docs.openstack.org/database/api/v1.0"> <flavor id="1" name="512MB Instance" ram="512"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/1" rel="bookmark"/> </links> </flavor> <flavor id="2" name="1GB Instance" ram="1024"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/2" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/2" rel="bookmark"/> </links> </flavor> <flavor id="3" name="2GB Instance" ram="2048"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/3" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/3" rel="bookmark"/> </links> </flavor> <flavor id="4" name="4GB Instance" ram="4096"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/4" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/4" rel="bookmark"/> </links> </flavor> <flavor id="5" name="8GB Instance" ram="8192"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/5" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/5" rel="bookmark"/> </links> </flavor> <flavor id="6" name="16GB Instance" ram="16384"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/6" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/6" rel="bookmark"/> </links> </flavor> </flavors> List Flavors Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 1186 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "flavors": [ { "id": 1, "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/1", "rel": "bookmark" } ], "name": "512MB Instance", "ram": 512 }, { "id": 2, "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/2", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/2", "rel": "bookmark" } ], "name": "1GB Instance", "ram": 1024 }, { "id": 3, "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/3", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/3", "rel": "bookmark" } ], "name": "2GB Instance", "ram": 2048 }, { "id": 4, "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/4", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/4", "rel": "bookmark" } ], "name": "4GB Instance", "ram": 4096 }, { "id": 5, "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/5", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/5", "rel": "bookmark" } ], "name": "8GB Instance", "ram": 8192 }, { "id": 6, "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/6", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/6", "rel": "bookmark" } ], "name": "16GB Instance", "ram": 16384 } ] } The flavor ID for the specified flavor. Lists all flavor information about the specified flavor ID. This operation lists all information for the specified flavor ID with details of the RAM. This resource is identical to the flavors found in the OpenStack Nova API, but without the disk property. The flavorId parameter should be an integer. If a floating point value is used for the flavorId parameter, the decimal portion is truncated and the integer portion is used as the value of the flavorId. Reviewer / Writer: need to confirm that this behavior is not changed in subsequent releases, and if it is prevented, remove the Note above. The following examples show the List Flavor By ID requests: List Flavor By ID Request: XML GET /v1.0/1234/flavors/1 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Flavor By ID Request: JSON GET /v1.0/1234/flavors/1 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List Flavor By ID responses: List Flavor By ID Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 283 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <flavor id="1" name="512MB Instance" ram="512" xmlns="http://docs.openstack.org/database/api/v1.0"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/1" rel="bookmark"/> </links> </flavor> List Flavor By ID Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 206 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "flavor": { "id": 1, "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/1", "rel": "bookmark" } ], "name": "512MB Instance", "ram": 512 } }
Returns detailed information about the specified version of the API. This operation returns detailed information about the specified version of the API. The following examples show the List Version Details requests: List Version Details Request: XML GET /v1.0/ HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Version Details Request: JSON GET /v1.0/ HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List Version Details responses: List Version Details Response: XML HTTP/1.1 200 OK Content-Type: application/xml Content-Length: 218 Date: Wed, 25 Jan 2012 21:53:04 GMT <version id="v1.0" status="CURRENT" updated="2012-01-01T00:00:00Z" xmlns="http://docs.openstack.org/database/api/v1.0"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/" rel="self"/> </links> </version> List Version Details Response: JSON HTTP/1.1 200 OK Content-Type: application/json Content-Length: 150 Date: Wed, 25 Jan 2012 21:53:04 GMT { "version": { "id": "v1.0", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/", "rel": "self" } ], "status": "CURRENT", "updated": "2012-01-01T00:00:00Z" } } Lists information about all versions of the API. This operation lists information about all versions of the API. The following examples show the List Versions requests: List Versions Request: XML GET / HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Versions Request: JSON GET / HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List Versions responses: List Versions Response: XML HTTP/1.1 200 OK Content-Type: application/xml Content-Length: 261 Date: Wed, 25 Jan 2012 21:53:04 GMT <versions xmlns="http://docs.openstack.org/database/api/v1.0"> <version id="v1.0" status="CURRENT" updated="2012-01-01T00:00:00Z"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/" rel="self"/> </links> </version> </versions> List Versions Response: JSON HTTP/1.1 200 OK Content-Type: application/json Content-Length: 153 Date: Wed, 25 Jan 2012 21:53:04 GMT { "versions": [ { "id": "v1.0", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/", "rel": "self" } ], "status": "CURRENT", "updated": "2012-01-01T00:00:00Z" } ] } Creates a new database instance. This operation asynchronously provisions a new database instance. This call requires the user to specify a flavor and a volume size. The service then provisions the instance with the requested flavor and sets up a volume of the specified size, which is the storage for the database instance. Notes You can create only one database instance per POST request. You can create a database instance with one or more databases, and users associated to those databases. The default binding for the MySQL instance is port 3306. The following table lists the required and optional attributes for Create Instance:
Required and Optional Attributes for Create Instance
Applies To Name Description Required
Instance flavorRef Reference (href) to a flavor as specified in the response from the List Flavors API call. This is the actual URI as specified by the href field in the link. Refer to the List Flavors response examples that follow for an example of the flavorRef. Rather than the flavor URI, you can also pass the flavor id (integer) as the value for flavorRef. Refer to for details. Yes
(volume) size Specifies the volume size in gigabytes (GB). The value specified must be between 1 and 50. Yes
name Name of the instance to create. The length of the name is limited to 255 characters and any characters are permitted. No
Database name Specifies database names for creating databases on instance creation. Refer to for the required xml/json format. No
character_set Set of symbols and encodings. The default character set is utf8. No
collate Set of rules for comparing characters in a character set. The default value for collate is utf8_general_ci. No
User name Specifies user name for the database on instance creation. Refer to for the required xml/json format. No
password Specifies password for those users on instance creation. Refer to for the required xml/json format. No
(database) name Specifies names of databases that those users can access on instance creation. Refer to for the required xml/json format. No
Refer to for a list of possible database instance statuses that may be returned.
The following examples show the Create Database Instance requests and responses: Create Database Instance Request: XML POST /v1.0/1234/instances HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml <instance xmlns="http://docs.openstack.org/database/api/v1.0" flavorRef="1" name="xml_rack_instance"> <volume size="2"/> <users> <user password="demopassword" name="demouser"> <databases> <database name="sampledb"/> </databases> </user> </users> <databases> <database collate="utf8_general_ci" name="sampledb" character_set="utf8"/> <database name="nextround"/> </databases> </instance> Create Database Instance Request: JSON POST /v1.0/1234/instances HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json { "instance": { "databases": [ { "character_set": "utf8", "collate": "utf8_general_ci", "name": "sampledb" }, { "name": "nextround" } ], "flavorRef": 1, "name": "json_rack_instance", "users": [ { "databases": [ { "name": "sampledb" } ], "name": "demouser", "password": "demopassword" } ], "volume": { "size": 2 } } } Create Database Instance Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 724 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <instance created="2013-03-18 19:09:17.441489" id="098653ba-218b-47ce-936a-e0b749101f81" name="xml_rack_instance" status="BUILD" updated="2013-03-18 19:09:17.441606" xmlns="http://docs.openstack.org/database/api/v1.0"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/instances/098653ba-218b-47ce-936a-e0b749101f81" rel="bookmark"/> </links> <volume size="2"/> <flavor id="1"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/1" rel="bookmark"/> </links> </flavor> </instance> Create Database Instance Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 591 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "instance": { "created": "2013-03-18T19:09:17", "flavor": { "id": "1", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/1", "rel": "bookmark" } ] }, "id": "44b277eb-39be-4921-be31-3d61b43651d7", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/instances/44b277eb-39be-4921-be31-3d61b43651d7", "rel": "bookmark" } ], "name": "json_rack_instance", "status": "BUILD", "updated": "2013-03-18T19:09:17", "volume": { "size": 2 } } } For convenience, notice in the response examples above that resources contain links to themselves. This allows a client to easily obtain resource URIs rather than to construct them. There are two kinds of link relations associated with resources. A self link contains a versioned link to the resource. These links should be used in cases where the link will be followed immediately. A bookmark link provides a permanent link to a resource that is appropriate for long term storage.
Deletes the specified database instance. This operation deletes the specified database instance, including any associated data. Refer to for a list of possible database instance statuses that may be returned. This operation is not allowed when the instance status is BUILD. The following examples show the Delete Database Instance requests: Delete Database Instance Request: XML DELETE /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml Delete Database Instance Request: JSON DELETE /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the Delete Database Instance responses: Delete Database Instance Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:18 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Delete Database Instance Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:18 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Lists the status and information for all database instances. This operation lists the status and information for all database instances. Refer to for a list of possible database instance statuses that may be returned. The following examples show the List All Database Instances Detail requests: List All Database Instances Request: XML GET /v1.0/1234/instances HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List All Database Instances Request: JSON GET /v1.0/1234/instances HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List All Database Instances responses: List All Database Instances Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 1380 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <instances xmlns="http://docs.openstack.org/database/api/v1.0"> <instance id="098653ba-218b-47ce-936a-e0b749101f81" name="xml_rack_instance" status="ACTIVE"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/instances/098653ba-218b-47ce-936a-e0b749101f81" rel="bookmark"/> </links> <volume size="2"/> <flavor id="1"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/1" rel="bookmark"/> </links> </flavor> </instance> <instance id="44b277eb-39be-4921-be31-3d61b43651d7" name="json_rack_instance" status="ACTIVE"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/instances/44b277eb-39be-4921-be31-3d61b43651d7" rel="bookmark"/> </links> <volume size="2"/> <flavor id="1"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/1" rel="bookmark"/> </links> </flavor> </instance> </instances> List All Database Instances Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 1038 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "instances": [ { "flavor": { "id": "1", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/1", "rel": "bookmark" } ] }, "id": "098653ba-218b-47ce-936a-e0b749101f81", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/instances/098653ba-218b-47ce-936a-e0b749101f81", "rel": "bookmark" } ], "name": "xml_rack_instance", "status": "ACTIVE", "volume": { "size": 2 } }, { "flavor": { "id": "1", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/1", "rel": "bookmark" } ] }, "id": "44b277eb-39be-4921-be31-3d61b43651d7", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/instances/44b277eb-39be-4921-be31-3d61b43651d7", "rel": "bookmark" } ], "name": "json_rack_instance", "status": "ACTIVE", "volume": { "size": 2 } } ] } Lists status and details for a specified database instance. This operation lists the status and details of the specified database instance. This operation lists the volume size in gigabytes (GB) and the approximate GB used. After instance creation, the used size of your volume will be greater than 0. This is expected and due to the automatic creation of non-empty transaction logs for mysql optimization. The used attribute is not returned in the response when the status for the instance is BUILD, REBOOT, RESIZE, or ERROR. Refer to for a list of possible database instance statuses that may be returned. The list operations return a DNS-resolvable hostname associated with the database instance instead of an IP address. Since the hostname always resolves to the correct IP address of the database instance, this relieves the user from the task of maintaining the mapping. Note that although the IP address may likely change on resizing, migrating, and so forth, the hostname always resolves to the correct database instance. The following examples show the List Database Instance Status and Details requests: List Database Instance Status and Details Request: XML GET /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Database Instance Status and Details Request: JSON GET /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml The following examples show the List Database Instance Status and Details responses: List Database Instance Status and Details Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 747 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <instance created="2013-03-18 19:09:17.441489" id="098653ba-218b-47ce-936a-e0b749101f81" name="xml_rack_instance" status="ACTIVE" updated="2013-03-18 19:09:17.513134" xmlns="http://docs.openstack.org/database/api/v1.0"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/instances/098653ba-218b-47ce-936a-e0b749101f81" rel="bookmark"/> </links> <volume size="2" used="0.163685983978"/> <flavor id="1"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/1" rel="bookmark"/> </links> </flavor> </instance> List Database Instance Status and Details Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 621 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "instance": { "created": "2013-03-18T19:09:17", "flavor": { "id": "1", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/1", "rel": "bookmark" } ] }, "id": "44b277eb-39be-4921-be31-3d61b43651d7", "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/instances/44b277eb-39be-4921-be31-3d61b43651d7", "rel": "bookmark" } ], "name": "json_rack_instance", "status": "ACTIVE", "updated": "2013-03-18T19:09:17", "volume": { "size": 2, "used": 0.16368598397821188 } } } Restart the database service on the instance. The restart operation will restart only the MySQL Instance. Restarting MySQL will erase any dynamic configuration settings that you have made within MySQL. The MySQL service will be unavailable until the instance restarts. This operation returns a 202 Accepted response. The following examples show the Restart Instance requests: Restart Instance Request: XML POST /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/action HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml <restart xmlns="http://docs.openstack.org/database/api/v1.0"/> Restart Instance Request: JSON POST /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/action HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json { "restart": {} } The following examples show the Restart Instance responses: Restart Instance Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:18 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Restart Instance Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:18 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Resize the memory of the instance. This operation changes the memory size of the instance, assuming a valid flavorRef is provided. Restarts MySQL in the process. The following examples show the Resize Instance requests: Resize the Instance Request: XML POST /v1.0/1234/instances/5d891bb6-6c61-4b0a-8b85-26f4ee461c9d/action HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 2eeb3252-0164-40f5-8fb7-85df5faa2698 Accept: application/xml Content-Type: application/xml <?xml version="1.0" ?> <resize xmlns="http://docs.openstack.org/database/api/v1.0"> <flavorRef>https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/2</flavorRef> </resize> Resize the Instance Request: JSON POST /v1.0/1234/instances/23a3d4fb-3731-497b-afd4-bf25bde2b5fc/action HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 2eeb3252-0164-40f5-8fb7-85df5faa2698 Accept: application/json Content-Type: application/json { "resize": { "flavorRef": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/2" } } The following examples show the Resize Instance responses: Resize the Instance Response: XML HTTP/1.1 202 Accepted Content-Type: text/plain; charset=UTF-8 Content-Length: 58 Date: Mon, 06 Feb 2012 21:28:11 GMT Resize the Instance Response: JSON HTTP/1.1 202 Accepted Content-Type: text/plain; charset=UTF-8 Content-Length: 58 Date: Mon, 06 Feb 2012 21:28:10 GMT Resize the volume attached to the Instance. This operation supports resizing the attached volume for an instance. It supports only increasing the volume size and does not support decreasing the size. The volume size is in gigabytes (GB) and must be an integer. You cannot increase the volume to a size larger than the API volume size limit specifies. This operation returns a 202 Accepted response. The following examples show the Resize Instance Volume requests: Resize the Instance Volume Request: XML POST /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/action HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml <resize xmlns="http://docs.openstack.org/database/api/v1.0"> <volume size="4"/> </resize> Resize the Instance Volume Request: JSON POST /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/action HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json { "resize": { "volume": { "size": 4 } } } The following examples show the Resize Instance Volume responses: Resize the Instance Volume Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:18 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Resize the Instance Volume Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:18 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Creates a new database within the specified instance. This operation creates a new database within the specified instance. The name of the database is a required attribute. The following additional attributes can be specified for each database: collate and character_set.
Required and Optional Attributes for Create Database
Name Description Required
name Specifies the database name for creating the database. Refer to the request examples for the required xml/json format. Yes
character_set Set of symbols and encodings. The default character set is utf8. No
collate Set of rules for comparing characters in a character set. The default value for collate is utf8_general_ci. No
See the MySQL documentation for information about supported character sets and collations at http://dev.mysql.com/doc/refman/5.1/en/charset-mysql.html. The following database names are reserved and cannot be used for creating databases: lost+found, information_schema, and mysql. Refer to the following tables for information about characters that are valid/invalid for creating database names.
Valid Characters That Can Be Used in a Database Name
Character
Letters (upper and lower cases allowed)
Numbers
'@', '?', '#', and spaces are allowed, but not at the beginning and end of the database name
'_' is allowed anywhere in the database name
Characters That Cannot Be Used in a Database Name
Character
Single quotes
Double quotes
Back quotes
Semicolons
Commas
Backslashes
Forwardslashes
Length Restrictions for Database Name
Restriction Value
Database-name maximum length 64
The following examples show the Create Database requests: Create Database Request: XML POST /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/databases HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml <databases xmlns="http://docs.openstack.org/database/api/v1.0"> <database collate="utf8_general_ci" name="testingdb" character_set="utf8"/> <database name="anotherdb"/> <database name="oneMoreDB"/> </databases> Create Database Request: JSON POST /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/databases HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json { "databases": [ { "character_set": "utf8", "collate": "utf8_general_ci", "name": "testingdb" }, { "name": "anotherdb" }, { "name": "oneMoreDB" } ] } The following examples show the Create Database responses: Create Database Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Create Database Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT)
Lists databases for the specified instance. This operation lists the databases for the specified instance. This operation returns only the user-defined databases, not the system databases. The system databases (mysql, information_schema, lost+found) can only be viewed by a database administrator. The following examples show the List Databases for Instance requests: List Databases for Instance Request: XML GET /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/databases HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Databases for Instance Request: JSON GET /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/databases HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the paginated List Databases for Instance requests: List Databases for Instance Paged Request: XML GET /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/databases?limit=2 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Databases for Instance Paged Request: JSON GET /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/databases?limit=1 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List Databases for Instance responses: List Databases for Instance Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 241 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <databases xmlns="http://docs.openstack.org/database/api/v1.0"> <database name="anotherdb"/> <database name="nextround"/> <database name="oneMoreDB"/> <database name="sampledb"/> <database name="testingdb"/> </databases> List Databases for Instance Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 129 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "databases": [ { "name": "anotherdb" }, { "name": "nextround" }, { "name": "oneMoreDB" }, { "name": "sampledb" }, { "name": "testingdb" } ] } The following examples show the paginated List Databases for Instance responses: List Databases for Instance Paged Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 321 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <databases xmlns="http://docs.openstack.org/database/api/v1.0"> <database name="anotherdb"/> <database name="nextround"/> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/databases?marker=nextround&amp;limit=2" rel="next"/> </links> </databases> List Databases for Instance Paged Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 192 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "databases": [ { "name": "anotherdb" } ], "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/databases?marker=anotherdb&limit=1", "rel": "next" } ] } Deletes the specified database. This operation deletes the requested database within the specified database instance. Note that all data associated with the database is also deleted. The following examples show the Delete Database requests: Delete Database Request: XML DELETE /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/databases/oneMoreDB HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml Delete Database Request: JSON DELETE /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/databases/testingdb HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the Delete Database responses: Delete Database Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Delete Database Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Creates a user for the specified database instance. This operation asynchronously provisions a new user for the specified database instance based on the configuration defined in the request object. Once the request is validated and progress has started on the provisioning process, a 202 Accepted response object is returned. Writer: please add the following note back into the doc once the List User Details call is added back into the API: Using the identifier, the caller can check on the progress of the operation by performing a GET on users/name (for more details on this operation see the "List User Details" section of this document). If the corresponding request cannot be fulfilled due to insufficient or invalid data, an HTTP 400 "Bad Request" error response is returned with information regarding the nature of the failure. Failures in the validation process are non-recoverable and require the caller to correct the cause of the failure and POST the request again. The following table lists the required attributes for Create User. Refer to the request examples for the required xml/json format:
Required Attributes for Create User
Applies To Name Description Required
User name Name of the user for the database. Yes
password User password for database access. Yes
(database) name Name of the database that the user can access. One or more database names must be specified. No
Notes A user is granted all privileges on the specified databases. The following user name is reserved and cannot be used for creating users: root. Refer to the following tables for information about characters that are valid/invalid for creating database names, user names, and passwords.
Valid Characters That Can Be Used in a Database Name, User Name, and Password
Character
Letters (upper and lower cases allowed)
Numbers
'@', '?', '#', and spaces are allowed, but not at the beginning and end of the database name, user name, and password
"_" is allowed anywhere in the database name, user name, and password
Characters That Cannot Be Used in a Database Name, User Name, and Password
Character
Single quotes
Double quotes
Back quotes
Semicolons
Commas
Backslashes
Forwardslashes
Spaces at the front or end of the user name or password
Length Restrictions for Database Name, User Name, and Password
Restriction Value
Database name maximum length 64
User name maximum length 16
Password maximum length unlimited (no restrictions)
The following examples show the Create User requests: Create User Request: XML POST /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/users HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml <users xmlns="http://docs.openstack.org/database/api/v1.0"> <user password="password" name="dbuser1" database="databaseA"/> <user password="password" name="dbuser2"> <databases> <database name="databaseB"/> <database name="databaseC"/> </databases> </user> <user password="password" name="dbuser3" database="databaseD"/> </users> Create User Request: JSON POST /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/users HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json { "users": [ { "database": "databaseA", "name": "dbuser1", "password": "password" }, { "databases": [ { "name": "databaseB" }, { "name": "databaseC" } ], "name": "dbuser2", "password": "password" }, { "database": "databaseD", "name": "dbuser3", "password": "password" } ] } The following examples show the Create User responses: Create User Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Create User Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT)
Lists the users in the specified database instance. This operation lists the users in the specified database instance, along with the associated databases for that user. This operation does not return the system users (database administrators that administer the health of the database). Also, this operation returns the "root" user only if "root" user has been enabled. The following notes apply to MySQL users: User names can be up to 16 characters long. When you create accounts with INSERT, you must use FLUSH PRIVILEGES to tell the server to reload the grant tables. For additional information, refer to: http://dev.mysql.com/doc/refman/5.1/en/user-account-management.html The following examples show the List Users in Database Instance requests: List Users in Database Instance Request: XML GET /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/users HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Users in Database Instance Request: JSON GET /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/users HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the paginated List Users in Database Instance requests: List Users in Database Instance Paged Request: XML GET /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/users?limit=2 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Users in Database Instance Paged Request: JSON GET /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/users?limit=2 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List Users in Database Instance responses: List Users in Database Instance Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 468 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <users xmlns="http://docs.openstack.org/database/api/v1.0"> <user name="dbuser1"> <databases/> </user> <user name="dbuser2"> <databases> <database name="databaseB"/> <database name="databaseC"/> </databases> </user> <user name="dbuser3"> <databases/> </user> <user name="demouser"> <databases> <database name="sampledb"/> </databases> </user> </users> List Users in Database Instance Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 228 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "users": [ { "databases": [], "name": "dbuser1" }, { "databases": [ { "name": "databaseB" }, { "name": "databaseC" } ], "name": "dbuser2" }, { "databases": [], "name": "dbuser3" }, { "databases": [ { "name": "sampledb" } ], "name": "demouser" } ] } The following examples show the paginated List Users in Database Instance responses: List Users in Database Instance Paged Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 461 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <users xmlns="http://docs.openstack.org/database/api/v1.0"> <user name="dbuser1"> <databases/> </user> <user name="dbuser2"> <databases> <database name="databaseB"/> <database name="databaseC"/> </databases> </user> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/users?marker=dbuser2&amp;limit=2" rel="next"/> </links> </users> List Users in Database Instance Paged Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 279 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/users?marker=dbuser2&limit=2", "rel": "next" } ], "users": [ { "databases": [], "name": "dbuser1" }, { "databases": [ { "name": "databaseB" }, { "name": "databaseC" } ], "name": "dbuser2" } ] } Changes the MySQL password of one or more users. This operation changes the MySQL password of one or more users. For information about choosing a valid password, please refer to for details. The following examples show the Change User(s) Password requests: Change User(s) Password Request: XML PUT /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml <users xmlns="http://docs.openstack.org/database/api/v1.0"> <user password="5" name="exampleuser"/> </users> Change User(s) Password Request: JSON PUT /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json { "users": [ { "name": "dbuser1", "password": "newpassword" }, { "name": "dbuser2", "password": "anotherpassword" } ] } The following examples show the Change User(s) Password responses: Change User(s) Password Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Content-Length: 501 Date: Wed, 27 Jun 2012 21:56:06 GMT Change User(s) Password Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Content-Length: 152 Date: Wed, 21 Mar 2012 17:46:46 GMT Deletes the user identified by {name} for the specified database instance. This operation deletes the specified user for the specified database instance. There is a bug in a python library that development is using that may cause incorrect user deletions to occur if a period (.) is used in the user name. In this case, the user name is truncated to remove the portion of the name from the period to the end, leaving only the portion from the beginning up to the period. For example, for a user named "my.userA", the bug would truncate the user name to "my", and if the user "my" exists, that user will be incorrectly deleted. To avoid the problem, do not use periods in user names. The following examples show the Delete User requests: Delete User Request: XML DELETE /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/users/testuser HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml Delete User Request: JSON DELETE /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/users/testuser HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the Delete User responses: Delete User Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Delete User Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 0 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) Lists the specified user's name and a list of databases that the user can access. This operation lists the specified user's name and a list of databases that the user can access. The following examples show the List User requests: List User Request: XML GET /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/testuser HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List User Request: JSON GET /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/exampleuser HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List User responses: List User Response: XML HTTP/1.1 200 OK Content-Type: application/xml Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT <user name="testuser" xmlns="http://docs.openstack.org/database/api/v1.0"> <databases> <database name="exampledb"/> </databases> </user> List User Response: JSON HTTP/1.1 200 OK Content-Type: application/json Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT { "user": { "name": "exampleuser", "databases": [ { "name": "databaseA" }, { "name": "databaseB" } ] } } Shows a list of all databases a user has access to. This operation shows a list of all databases a user has access to. The following examples show the List User Access requests: List User Access Request: XML GET /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/testuser/databases HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List User Access Request: JSON GET /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/exampleuser/databases HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List User Access responses: List User Access Response: XML HTTP/1.1 200 OK Content-Type: application/xml Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT <databases xmlns="http://docs.openstack.org/database/api/v1.0"> <database name="exampledb"/> </databases> List User Access Response: JSON HTTP/1.1 200 OK Content-Type: application/json Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT { "databases": [ { "name": "databaseA" }, { "name": "databaseB" } ] } Grant access for the specified user to one or more databases for the specified instance. This operation grants access for the specified user to one or more databases for the specified instance. The user is granted ALL privileges on the database. Refer to the information at the beginning of for more details on access. The following examples show the Grant User Access requests: Grant User Access Request: XML PUT /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/testuser/databases HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml <databases xmlns="http://docs.openstack.org/database/api/v1.0"> <database name="extradb"/> </databases> Grant User Access Request: JSON PUT /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/exampleuser/databases HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json { "databases": [ { "name": "databaseC" }, { "name": "databaseD" } ] } The following examples show the Grant User Access responses: Grant User Access Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT Grant User Access Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT Remove access to the specified database for the specified user. This operation removes access to the specified database for the specified user. The following examples show the Revoke User Access requests: Revoke User Access Request: XML DELETE /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/testuser/databases/extradb HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml Revoke User Access Request: JSON DELETE /v1.0/1234/instances/692d8418-7a8f-47f1-8060-59846c6e024f/users/exampleuser/databases/databaseC HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the Revoke User Access responses: Revoke User Access Response: XML HTTP/1.1 202 Accepted Content-Type: application/xml Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT Revoke User Access Response: JSON HTTP/1.1 202 Accepted Content-Type: application/json Content-Length: 0 Date: Wed, 27 Jun 2012 23:11:19 GMT Enables the root user for the specified database instance and returns the root password. This operation enables login from any host for the root user and provides the user with a generated root password. Changes you make as a root user may cause detrimental effects to the database instance and unpredictable behavior for API operations. When you enable the root user, you accept the possibility that we will not be able to support your database instance. While enabling root does not prevent us from a “best effort” approach to helping you if something goes wrong with your instance, we cannot ensure that we will be able to assist you if you change core MySQL settings. These changes can be (but are not limited to) turning off binlogs, removing users that we use to access your instance, and so forth. The following examples show the Enable Root User requests: Enable Root User Request: XML POST /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/root HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml Enable Root User Request: JSON POST /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/root HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the Enable Root User responses: Enable Root User Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 89 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <user name="root" password="12345" xmlns="http://docs.openstack.org/database/api/v1.0"/> Enable Root User Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 47 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "user": { "name": "root", "password": "12345" } } Returns true if root user is enabled for the specified database instance or false otherwise. This operation checks an active specified database instance to see if root access is enabled. It returns True if root user is enabled for the specified database instance or False otherwise. The following examples show the Check Root User Access requests: List Root-Enabled Status Request: XML GET /v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81/root HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Root-Enabled Status Request: JSON GET /v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7/root HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the Check Root User Access responses: List Root-Enabled Status Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 90 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <rootEnabled xmlns="http://docs.openstack.org/database/api/v1.0"> True </rootEnabled> List Root-Enabled Status Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 21 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "rootEnabled": true } Lists information for all available flavors. This operation lists information for all available flavors. This resource is identical to the flavors found in the OpenStack Nova API, but without the disk property. The following examples show the List Flavors requests: List Flavors Request: XML GET /v1.0/1234/flavors HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Flavors Request: JSON GET /v1.0/1234/flavors HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List Flavors responses: List Flavors Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 1600 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <flavors xmlns="http://docs.openstack.org/database/api/v1.0"> <flavor id="1" name="512MB Instance" ram="512"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/1" rel="bookmark"/> </links> </flavor> <flavor id="2" name="1GB Instance" ram="1024"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/2" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/2" rel="bookmark"/> </links> </flavor> <flavor id="3" name="2GB Instance" ram="2048"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/3" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/3" rel="bookmark"/> </links> </flavor> <flavor id="4" name="4GB Instance" ram="4096"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/4" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/4" rel="bookmark"/> </links> </flavor> <flavor id="5" name="8GB Instance" ram="8192"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/5" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/5" rel="bookmark"/> </links> </flavor> <flavor id="6" name="16GB Instance" ram="16384"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/6" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/6" rel="bookmark"/> </links> </flavor> </flavors> List Flavors Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 1186 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "flavors": [ { "id": 1, "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/1", "rel": "bookmark" } ], "name": "512MB Instance", "ram": 512 }, { "id": 2, "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/2", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/2", "rel": "bookmark" } ], "name": "1GB Instance", "ram": 1024 }, { "id": 3, "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/3", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/3", "rel": "bookmark" } ], "name": "2GB Instance", "ram": 2048 }, { "id": 4, "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/4", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/4", "rel": "bookmark" } ], "name": "4GB Instance", "ram": 4096 }, { "id": 5, "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/5", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/5", "rel": "bookmark" } ], "name": "8GB Instance", "ram": 8192 }, { "id": 6, "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/6", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/6", "rel": "bookmark" } ], "name": "16GB Instance", "ram": 16384 } ] } Lists all flavor information about the specified flavor ID. This operation lists all information for the specified flavor ID with details of the RAM. This resource is identical to the flavors found in the OpenStack Nova API, but without the disk property. The flavorId parameter should be an integer. If a floating point value is used for the flavorId parameter, the decimal portion is truncated and the integer portion is used as the value of the flavorId. Reviewer / Writer: need to confirm that this behavior is not changed in subsequent releases, and if it is prevented, remove the Note above. The following examples show the List Flavor By ID requests: List Flavor By ID Request: XML GET /v1.0/1234/flavors/1 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/xml Content-Type: application/xml List Flavor By ID Request: JSON GET /v1.0/1234/flavors/1 HTTP/1.1 User-Agent: python-reddwarfclient Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7 Accept: application/json Content-Type: application/json The following examples show the List Flavor By ID responses: List Flavor By ID Response: XML HTTP/1.1 200 OK Content-Type: application/xml Via: 1.1 Repose (Repose/2.6.7) Content-Length: 283 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) <flavor id="1" name="512MB Instance" ram="512" xmlns="http://docs.openstack.org/database/api/v1.0"> <links> <link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1" rel="self"/> <link href="https://ord.databases.api.rackspacecloud.com/flavors/1" rel="bookmark"/> </links> </flavor> List Flavor By ID Response: JSON HTTP/1.1 200 OK Content-Type: application/json Via: 1.1 Repose (Repose/2.6.7) Content-Length: 206 Date: Mon, 18 Mar 2013 19:09:17 GMT Server: Jetty(8.0.y.z-SNAPSHOT) { "flavor": { "id": 1, "links": [ { "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1", "rel": "self" }, { "href": "https://ord.databases.api.rackspacecloud.com/flavors/1", "rel": "bookmark" } ], "name": "512MB Instance", "ram": 512 } }