Database API

Database API

API versions

Lists information for all Database Service API versions and shows Database Service v1.0 details.

GET
/

List versions

Lists information about all Database Service API versions.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Response Example

{
    "versions": [
        {
            "id": "v1.0",
            "links": [
                {
                    "href": "https://ord.databases.api.rackspacecloud.com/v1.0/",
                    "rel": "self"
                }
            ],
            "status": "CURRENT",
            "updated": "2012-01-01T00:00:00Z"
        }
    ]
}
GET
/v1.0

Show version details

Shows details for the Database Service API v1.0.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Response Example

{
    "version": {
        "id": "v1.0",
        "links": [
            {
                "href": "https://ord.databases.api.rackspacecloud.com/v1.0/",
                "rel": "self"
            }
        ],
        "status": "CURRENT",
        "updated": "2012-01-01T00:00:00Z"
    }
}

Database instances (instances)

Creates, lists, shows details for, attaches a configuration group to, detaches a configuration group from, deletes, lists configuration defaults, creates root, and determines whether root is enabled for instances.

DELETE
/v1.0/{accountId}/instances/{instanceId}

Delete database instance

Deletes a database instance, including any associated data.

This operation does not delete any read slaves.

You cannot complete this operation when the instance state is either REBUILDING or BUILDING.

Error response codes:202,413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.
GET
/v1.0/{accountId}/instances/{instanceId}

Show database instance details

Shows database instance details.

Lists the status and details of the database instance.

Lists the volume size in gigabytes (GB) and the approximate GB used.

After instance creation, the used value is greater than 0, which is expected as databases may create some basic (non empty) files to represent an empty schema. The response does not include the used attribute when the instance status is BUILD, REBOOT, RESIZE, or ERROR.

The list operations return a DNS-resolvable host name for the database instance rather than an IP address. Because the host name always resolves to the correct IP address for the database instance, you do not need to maintain the mapping. Although the IP address might change when you resize, migrate, or perform other operations, the host name always resolves to the correct database instance.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Response Example

{
    "instance": {
        "created": "2014-10-30T12:30:00",
        "datastore": {
            "type": "mysql",
            "version": "5.5"
        },
        "flavor": {
            "id": "1",
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/flavors/1",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/flavors/1",
                    "rel": "bookmark"
                }
            ]
        },
        "hostname": "e09ad9a3f73309469cf1f43d11e79549caf9acf2.troveexampledb.com",
        "id": "44b277eb-39be-4921-be31-3d61b43651d7",
        "links": [
            {
                "href": "https://troveapi.org/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7",
                "rel": "self"
            },
            {
                "href": "https://troveapi.org/instances/44b277eb-39be-4921-be31-3d61b43651d7",
                "rel": "bookmark"
            }
        ],
        "name": "json_rack_instance",
        "region": "RegionOne",
        "status": "ACTIVE",
        "updated": "2014-10-30T12:30:00",
        "volume": {
            "size": 2,
            "used": 0.16
        }
    }
}
PUT
/v1.0/{accountId}/instances/{instanceId}

Attach configuration group

Attaches a configuration group to an instance.

Error response codes:202,413,415,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
configuration body string ID of the configuration group that you want to attach to the instance.
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Request Example

{
    "instance": {
        "configuration": "2aa51628-5c42-4086-8682-137caffd2ba6"
    }
}
PUT
/v1.0/{accountId}/instances/{instanceId}

Detach configuration group

Detaches a configuration group from an instance.

When you pass in only an instance ID and omit the configuration ID, this operation detaches any configuration group that was attached to the instance.

Error response codes:202,413,415,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
configuration body string ID of the configuration group that you want to attach to the instance.
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Request Example

{
    "instance": {}
}
PATCH
/v1.0/{accountId}/instances/{instanceId}

Detach replica

Detaches a replica from its replication source.

If you created an instance that is a replica of a source instance, you can detach the replica from the source. This can be useful if the source becomes unavailable. In this case, you can detach the replica from the source, making the replica a standalone database instance. You can then take the new standalone instance and create a new replica of that instance.

Error response codes:202,413,415,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
replica_of (Optional) body string ID or name of an existing instance to replicate from.
slave_of body string To detach a replica, set slave_of to null.
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Request Example

{
    "instance": {
        "replica_of": null,
        "slave_of": null
    }
}
POST
/v1.0/{accountId}/instances

Create database instance

Creates a database instance.

Asynchronously provisions a database instance. You must specify a flavor and a volume size. The service provisions the instance with a volume of the requested size, which serves as 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. You associate users with each database.
  • The port on which the database instance is listening is database specific.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
users body array A users object.
password (Optional) body string The password for those users on instance creation.
datastore_version (Optional) body string Name of the datastore version to use when creating the instance.
name body string Name of the configuration group you are creating.
flavorRef body string Reference (href), which is the actual URI to a flavor as it appears in the list flavors response. Rather than the flavor URI, you can also pass the flavor ID (integer) as the flavorRef value. For example, 1.
characterSet (Optional) body string A set of symbols and encodings. Default is utf8. For information about supported character sets and collations, see Character Sets and Collations in MySQL.
replica_count (Optional) body integer Number of replicas to create (defaults to 1).
instance body object An instance object.
collate (Optional) body string A set of rules for comparing characters in a character set. Default is utf8_general_ci. For information about supported character sets and collations, see Character Sets and Collations in MySQL.
databases (Optional) body array A databases object.
datastore body string Data store assigned to the configuration group. Required if you did not configure the default data store.
configuration body string ID of the configuration group that you want to attach to the instance.
type (Optional) body string The volume type to use. You can list the available volume types on your system by using the cinder type- list command. If you want to specify a volume type, you must also specify a volume size.
replica_of (Optional) body string ID or name of an existing instance to replicate from.
size body integer The volume size, in gigabytes (GB). A valid value is from 1 to 50.
accountId (Optional) path string The account ID of the owner of the instance.

Request Example

{
    "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
        }
    }
}

Response Parameters

Name In Type Description
updated body string

The date and time when the resource was updated.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

The ±hh:mm value, if included, is the time zone as an offset from UTC.

For example, 2015-08-27T09:49:58-05:00.

The UTC time zone is assumed.

name body string Name of the configuration group you are creating.
created body string

The date and time when the resource was created.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00.

The ±hh:mm value, if included, is the time zone as an offset from UTC. In the previous example, the offset value is -05:00.

characterSet (Optional) body string A set of symbols and encodings. Default is utf8. For information about supported character sets and collations, see Character Sets and Collations in MySQL.
instance body object An instance object.
collate (Optional) body string A set of rules for comparing characters in a character set. Default is utf8_general_ci. For information about supported character sets and collations, see Character Sets and Collations in MySQL.
databases (Optional) body array A databases object.
flavor body object A flavor object, which includes the flavor ID (integer) and flavor relative links.
users body array A users object.

Response Example

{
    "instance": {
        "created": "2014-10-30T12:30:00",
        "datastore": {
            "type": "mysql",
            "version": "5.5"
        },
        "flavor": {
            "id": "1",
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/flavors/1",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/flavors/1",
                    "rel": "bookmark"
                }
            ]
        },
        "hostname": "e09ad9a3f73309469cf1f43d11e79549caf9acf2.troveexampledb.com",
        "id": "44b277eb-39be-4921-be31-3d61b43651d7",
        "links": [
            {
                "href": "https://troveapi.org/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7",
                "rel": "self"
            },
            {
                "href": "https://troveapi.org/instances/44b277eb-39be-4921-be31-3d61b43651d7",
                "rel": "bookmark"
            }
        ],
        "name": "json_rack_instance",
        "region": "RegionOne",
        "status": "BUILD",
        "updated": "2014-10-30T12:30:00",
        "volume": {
            "size": 2
        }
    }
}
GET
/v1.0/{accountId}/instances

List database instances

Lists information, including status, for all database instances.

Lists status and information for all database instances.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
accountId (Optional) path string The account ID of the owner of the instance.

Response Example

{
    "instances": [
        {
            "datastore": {
                "type": "mysql",
                "version": "5.5"
            },
            "flavor": {
                "id": "1",
                "links": [
                    {
                        "href": "https://troveapi.org/v1.0/1234/flavors/1",
                        "rel": "self"
                    },
                    {
                        "href": "https://troveapi.org/flavors/1",
                        "rel": "bookmark"
                    }
                ]
            },
            "hostname": "e09ad9a3f73309469cf1f43d11e79549caf9acf2.troveexampledb.com",
            "id": "44b277eb-39be-4921-be31-3d61b43651d7",
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/instances/44b277eb-39be-4921-be31-3d61b43651d7",
                    "rel": "bookmark"
                }
            ],
            "name": "json_rack_instance",
            "region": "RegionOne",
            "status": "ACTIVE",
            "volume": {
                "size": 2
            }
        }
    ]
}
GET
/v1.0/{accountId}/instances/{instanceId}/configuration

List configuration defaults

Lists the configuration defaults for an instance.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Response Example

{
    "instance": {
        "configuration": {
            "basedir": "/usr",
            "connect_timeout": 15,
            "datadir": "/var/lib/mysql/data",
            "default_storage_engine": "innodb",
            "innodb_buffer_pool_size": "150M",
            "innodb_data_file_path": "ibdata1:10M:autoextend",
            "innodb_file_per_table": 1,
            "innodb_log_buffer_size": "25M",
            "innodb_log_file_size": "50M",
            "innodb_log_files_in_group": 2,
            "join_buffer_size": "1M",
            "key_buffer_size": "50M",
            "local-infile": 0,
            "max_allowed_packet": "1024K",
            "max_connections": 100,
            "max_heap_table_size": "16M",
            "max_user_connections": 100,
            "myisam-recover-options": "BACKUP,FORCE",
            "open_files_limit": 512,
            "performance_schema": "ON",
            "pid_file": "/var/run/mysqld/mysqld.pid",
            "socket": "/var/run/mysqld/mysqld.sock",
            "port": "3306",
            "query_cache_limit": "1M",
            "query_cache_size": "8M",
            "query_cache_type": 1,
            "read_buffer_size": "512K",
            "read_rnd_buffer_size": "512K",
            "server_id": 271898715,
            "skip-external-locking": 1,
            "sort_buffer_size": "1M",
            "table_definition_cache": 256,
            "table_open_cache": 256,
            "thread_cache_size": "4",
            "thread_stack": "192K",
            "tmp_table_size": "16M",
            "tmpdir": "/var/tmp",
            "user": "mysql",
            "wait_timeout": "120"
        }
    }
}

Database instance actions (action)

Resizes instances and volumes and restarts instances.

POST
/v1.0/{accountId}/instances/{instanceId}/action

Restart instance

Restarts the database service for an instance.

The restart operation restarts only the database instance. Restarting the database erases any dynamic configuration settings that you make in the database instance.

The database instance is unavailable until the instance restarts.

If the operation succeeds, it returns the Accepted (202) response code.

Error response codes:202,413,415,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Request Example

{
    "restart": {}
}
POST
/v1.0/{accountId}/instances/{instanceId}/action

Resize instance

Resizes the memory for an instance.

If you provide a valid flavorRef, this operation changes the memory size of the instance, and restarts the database.

Error response codes:202,413,415,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Request Example

{
    "resize": {
        "flavorRef": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/2"
    }
}
POST
/v1.0/{accountId}/instances/{instanceId}/action

Resize instance volume

Resizes the volume that is attached to an instance.

You can use this operation to increase but not decrease the volume size. A valid volume size is an integer value in gigabytes (GB).

You cannot increase the volume to a size that is larger than the API volume size limit.

If this operation succeeds, it returns a 202 Accepted response.

Error response codes:202,413,415,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Request Example

{
    "resize": {
        "volume": {
            "size": 4
        }
    }
}
POST
/v1.0/{accountId}/instances/{instanceId}/action

Promote instance to replica source

Promotes a replica.

If you have set up replication, and the base instance is still reachable, you can use this operation to promote a replica to be the new base instance.

This can be useful if you want to make a configuration change to the base instance that your replicas are replicating from. For example, you might want to increase the disk or CPU capacity. If you made the change on the base instance directly, you would need to take the base instance down for the duration of the operation. Instead, you can create a replica, make the configuration change on the replica, and then promote the replica to become the new base instance.

For instanceId, pass in the instance ID of the replica you want to promote.

Error response codes:202,413,415,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Request Example

{
    "promote_to_replica_source": {}
}
POST
/v1.0/{accountId}/instances/{instanceId}/action

Delete replication base instance

Deletes the base instance in a replication set.

If the base instance becomes unreachable, you can use this operation to delete the base instance.

This operation:

  • Finds the replica that has processed the greatest number of transactions and picks that replica to use as the new base instance.
  • Transfers the public IP of the old base instance to the new base instance (which is the newly-promoted replica).
  • Deletes the old base instance.
  • Takes all the instances in the replication set and makes them start replicating from the new base instance.

For instanceId, pass in the instance ID of the unreachable base instance.

Error response codes:202,413,415,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Request Example

{
    "eject_replica_source": {}
}

Databases (databases)

Creates, lists all, and deletes databases.

DELETE
/v1.0/{accountId}/instances/{instanceId}/databases/{databaseName}

Delete database

Deletes a database.

This operation also deletes all data that is associated with the database.

Error response codes:202,413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
databaseName (Optional) path string The name for the database.
accountId (Optional) path string The account ID of the owner of the instance.
POST
/v1.0/{accountId}/instances/{instanceId}/databases

Create database

Creates a database within an instance.

Error response codes:202,413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
characterSet (Optional) body string A set of symbols and encodings. Default is utf8. For information about supported character sets and collations, see Character Sets and Collations in MySQL.
collate (Optional) body string A set of rules for comparing characters in a character set. Default is utf8_general_ci. For information about supported character sets and collations, see Character Sets and Collations in MySQL.
name body string Name of the configuration group you are creating.
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Request Example

{
    "databases": [
        {
            "character_set": "utf8",
            "collate": "utf8_general_ci",
            "name": "testingdb"
        },
        {
            "name": "anotherdb"
        },
        {
            "name": "oneMoreDB"
        }
    ]
}
GET
/v1.0/{accountId}/instances/{instanceId}/databases

List instance databases

Lists databases for an instance.

This operation returns only the user-defined databases and not the system databases. Only the database administrator can view the mysql, information_schema, and lost+found system databases.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Response Example

{
    "databases": [
        {
            "name": "anotherdb"
        },
        {
            "name": "nextround"
        },
        {
            "name": "oneMoreDB"
        },
        {
            "name": "sampledb"
        },
        {
            "name": "testingdb"
        }
    ]
}

Users (users)

Creates, lists all, and deletes users.

POST
/v1.0/{accountId}/instances/{instanceId}/root

Enable root user

Enables the root user for a database instance and returns the root password.

This operation generates a root password for the root user and enables the root user to log in from any host.

Changes that you make as a root user can impact the database instance and API operations in unpredictable and detrimental ways. When you enable the root user, you accept the possibility that we cannot support your database instance. We might not be able to assist you if you change core database settings. These changes can be, but are not limited to, turning off bin logs, removing users that we use to access your instance, and so on.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Response Example

{
    "user": {
        "name": "root",
        "password": "12345"
    }
}
GET
/v1.0/{accountId}/instances/{instanceId}/root

Show root-enabled status for database instance

Shows root-enabled status for a database instance.

Returns true if root user is enabled for a database instance. Otherwise, returns false.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Response Example

{
    "rootEnabled": true
}
DELETE
/v1.0/{accountId}/instances/{instanceId}/root

Disable root user

Disables the root user.

Error response codes:202,413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.
DELETE
/v1.0/{accountId}/instances/{instanceId}/users/{name}

Delete user

Deletes a user for a database instance.

Error response codes:202,413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.
name (Optional) path string The name of the user.
POST
/v1.0/{accountId}/instances/{instanceId}/users

Create user

Creates a user for a database instance.

Asynchronously provisions a new user for the database instance by using the configuration that you define in the request object. After the API validates the request and starts progress on the provisioning process, the call returns the Accepted (202) response code.

If the API cannot fulfill the corresponding request due to insufficient data or data that is not valid, the API returns the Bad Request (400) response code with information about the nature of the failure. You cannot recover from validation errors. You must correct the cause of the failure and the request again.

This table lists the required attributes for creating users:

Required attributes for 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(s) that the user can access. You can specify one or more database names. No

Name of the database that the user can access. You can specify one or more database names.

Notes
  • The operation grants the user all privileges on the databases.
  • Do not use the root user name, which is reserved.

These tables list the valid characters for database names, user names, and passwords.

Valid characters in 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 are not allowed in database name, user name, and password

Character
Single quotes
Double quotes
Back quotes
Semicolons
Commas
Back slashes
Forward slashes
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)

Error response codes:202,413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Request Example

{
    "users": [
        {
            "databases": [
                {
                    "name": "databaseA"
                }
            ],
            "name": "dbuser1",
            "password": "password"
        },
        {
            "databases": [
                {
                    "name": "databaseB"
                },
                {
                    "name": "databaseC"
                }
            ],
            "name": "dbuser2",
            "password": "password"
        },
        {
            "databases": [
                {
                    "name": "databaseD"
                }
            ],
            "name": "dbuser3",
            "password": "password"
        }
    ]
}
GET
/v1.0/{accountId}/instances/{instanceId}/users

List database instance users

Lists the users in a database instance and the associated databases for that user.

This operation does not return system users. A system user is a database administrator who administers the health of the database. Also, this operation returns the root user only if it is enabled.

The following notes apply to MySQL users:

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
instanceId (Optional) path string The ID for the database instance.
accountId (Optional) path string The account ID of the owner of the instance.

Response Example

{
    "users": [
        {
            "databases": [
                {
                    "name": "databaseA"
                }
            ],
            "host": "%",
            "name": "dbuser1"
        },
        {
            "databases": [
                {
                    "name": "databaseB"
                },
                {
                    "name": "databaseC"
                }
            ],
            "host": "%",
            "name": "dbuser2"
        },
        {
            "databases": [
                {
                    "name": "databaseD"
                }
            ],
            "host": "%",
            "name": "dbuser3"
        },
        {
            "databases": [
                {
                    "name": "sampledb"
                }
            ],
            "host": "%",
            "name": "demouser"
        }
    ]
}

Flavors (flavors)

Lists all flavors and shows details for a flavor, by ID.

GET
/v1.0/{accountId}/flavors/{flavorId}

Show flavor details

Shows flavor details with details of the RAM.

This resource is identical to the flavors found in the OpenStack Compute API, but without the disk property.

The flavorId parameter must be an integer value. If you use a floating point value for this parameter, this call truncates the decimal portion and uses the integer portion as the flavorId value.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
flavorId (Optional) path string The ID for the flavor.
accountId (Optional) path string The account ID of the owner of the instance.

Response Example

{
    "flavor": {
        "ephemeral": 0,
        "id": 1,
        "links": [
            {
                "href": "https://troveapi.org/v1.0/1234/flavors/1",
                "rel": "self"
            },
            {
                "href": "https://troveapi.org/flavors/1",
                "rel": "bookmark"
            }
        ],
        "name": "m1.tiny",
        "ram": 512,
        "str_id": "1",
        "disk":0,
        "vcpus": 10
    }
}
GET
/v1.0/{accountId}/flavors

List flavors

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.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
accountId (Optional) path string The account ID of the owner of the instance.

Response Example

{
    "flavors": [
        {
            "ephemeral": 0,
            "id": 1,
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/flavors/1",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/flavors/1",
                    "rel": "bookmark"
                }
            ],
            "name": "m1.tiny",
            "ram": 512,
            "str_id": "1",
            "vcpus": 10,
            "disk":0
        },
        {
            "ephemeral": 0,
            "id": 2,
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/flavors/2",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/flavors/2",
                    "rel": "bookmark"
                }
            ],
            "name": "m1.small",
            "ram": 2048,
            "str_id": "2",
            "vcpus": 10,
            "disk":20
        },
        {
            "ephemeral": 0,
            "id": 3,
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/flavors/3",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/flavors/3",
                    "rel": "bookmark"
                }
            ],
            "name": "m1.medium",
            "ram": 4096,
            "str_id": "3",
            "vcpus": 10,
            "disk":40
        },
        {
            "ephemeral": 0,
            "id": 4,
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/flavors/4",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/flavors/4",
                    "rel": "bookmark"
                }
            ],
            "name": "m1.large",
            "ram": 8192,
            "str_id": "4",
            "vcpus": 10,
            "disk":80
        },
        {
            "ephemeral": 0,
            "id": 5,
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/flavors/5",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/flavors/5",
                    "rel": "bookmark"
                }
            ],
            "name": "m1.xlarge",
            "ram": 16384,
            "str_id": "5",
            "vcpus": 10,
            "disk":160
        },
        {
            "ephemeral": 0,
            "id": 6,
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/flavors/6",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/flavors/6",
                    "rel": "bookmark"
                }
            ],
            "name": "m1.nano",
            "ram": 64,
            "str_id": "6",
            "vcpus": 10,
            "disk":0
        },
        {
            "ephemeral": 0,
            "id": 7,
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/flavors/7",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/flavors/7",
                    "rel": "bookmark"
                }
            ],
            "name": "m1.micro",
            "ram": 128,
            "str_id": "7",
            "vcpus": 10,
            "disk":0
        },
        {
            "ephemeral": 0,
            "id": 8,
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/flavors/8",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/flavors/8",
                    "rel": "bookmark"
                }
            ],
            "name": "m1.rd-smaller",
            "ram": 768,
            "str_id": "8",
            "vcpus": 10,
            "disk":2
        },
        {
            "ephemeral": 0,
            "id": 9,
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/flavors/9",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/flavors/9",
                    "rel": "bookmark"
                }
            ],
            "name": "tinier",
            "ram": 506,
            "str_id": "9",
            "vcpus": 10,
            "disk":10
        },
        {
            "ephemeral": 0,
            "id": 10,
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/flavors/10",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/flavors/10",
                    "rel": "bookmark"
                }
            ],
            "name": "m1.rd-tiny",
            "ram": 512,
            "str_id": "10",
            "vcpus": 10,
            "disk":2
        },
        {
            "ephemeral": 1,
            "id": 11,
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/flavors/11",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/flavors/11",
                    "rel": "bookmark"
                }
            ],
            "name": "eph.rd-tiny",
            "ram": 512,
            "str_id": "11",
            "vcpus": 10,
            "disk":0
        },
        {
            "ephemeral": 2,
            "id": 12,
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/flavors/12",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/flavors/12",
                    "rel": "bookmark"
                }
            ],
            "name": "eph.rd-smaller",
            "ram": 768,
            "str_id": "12",
            "vcpus": 10,
            "disk":20
        },
        {
            "ephemeral": 1,
            "id": null,
            "links": [
                {
                    "href": "https://troveapi.org/v1.0/1234/flavors/custom",
                    "rel": "self"
                },
                {
                    "href": "https://troveapi.org/flavors/custom",
                    "rel": "bookmark"
                }
            ],
            "name": "custom.small",
            "ram": 512,
            "str_id": "custom",
            "vcpus": 10,
            "disk":25
        }
    ]
}

Data stores (datastores)

Lists data store versions, lists parameters for data stores, and shows parameter details for a data store version.

GET
/v1.0/{accountId}/datastores/versions/{datastore_version_id}/parameters/{parameter_name}

Show configuration parameter details

Displays details for a configuration parameter associated with a data store version.

Details include the type, minimum and maximum values, and whether you must restart the instance after you change the parameter value.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
parameter_name (Optional) path string The name of the parameter for which to show details.
datastore_version_id (Optional) path string The UUID of the data store version.
accountId (Optional) path string The account ID of the owner of the instance.

Response Example

{
    "name": "connect_timeout",
    "min": 2,
    "max": 31536000,
    "restart_required": false,
    "type": "integer",
    "datastore_version_id": "f8e67741-e767-4137-b394-3fb8a3fafd2f"
}
GET
/v1.0/{accountId}/datastores/{datastore_name}/versions

List datastore versions

Lists the available versions of a data store.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
datastore_name (Optional) path string The name of the data store.
accountId (Optional) path string The account ID of the owner of the instance.

Response Example

{
    "name": "5.6",
    "links": [
        {
            "href": "https://10.240.28.38:8779/v1.0/27bee406abb5486e81ef3ff4382aabaf/datastores/versions/2dc7faa0-efff-4c2b-8cff-bcd949c518a5",
            "rel": "self"
        },
        {
            "href": "https://10.240.28.38:8779/datastores/versions/2dc7faa0-efff-4c2b-8cff-bcd949c518a5",
            "rel": "bookmark"
        }
    ],
    "image": "b69fbd9e-b31d-46ff-8afb-cbf452f6f835",
    "active": 1,
    "datastore": "3a8968d8-e5f5-4452-83ca-f6c90b5de06a",
    "packages": "mysql-server-5.6",
    "id": "2dc7faa0-efff-4c2b-8cff-bcd949c518a5"
}
GET
/v1.0/{accountId}/datastores/versions/{datastore_version_id}/parameters

List configuration parameters

Lists the available configuration parameters for a data store version.

Parameter information includes the type, minimum and maximum values, and whether you must restart the instance after you change a parameter value.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
datastore_version_id (Optional) path string The UUID of the data store version.
accountId (Optional) path string The account ID of the owner of the instance.

Response Example

{
    "configuration-parameters": [
        {
            "name": "myisam_sort_buffer_size",
            "min": 4096,
            "max": 18446744073709552000,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "name": "sync_binlog",
            "min": 0,
            "max": 4294967295,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "name": "max_allowed_packet",
            "min": 1024,
            "max": 1073741824,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "type": "string",
            "name": "character_set_connection",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758",
            "restart_required": false
        },
        {
            "name": "autocommit",
            "min": 0,
            "max": 1,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "type": "string",
            "name": "character_set_client",
            "datastore_version_id": "f597f709-70ef474d-ac18-2c6abd35a758",
            "restart_required": false
        },
        {
            "name": "join_buffer_size",
            "min": 128,
            "max": 18446744073709548000,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "name": "local_infile",
            "min": 0,
            "max": 1,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "name": "auto_increment_offset",
            "min": 1,
            "max": 65535,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "name": "max_connections",
            "min": 1,
            "max": 100000,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "name": "bulk_insert_buffer_size",
            "min": 0,
            "max": 18446744073709552000,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef474dac18-2c6abd35a758"
        },
        {
            "name": "sort_buffer_size",
            "min": 32768,
            "max": 18446744073709552000,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "name": "innodb_log_buffer_size",
            "min": 262144,
            "max": 4294967295,
            "restart_required": true,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "name": "innodb_file_per_table",
            "min": 0,
            "max": 1,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "type": "string",
            "name": "character_set_server",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758",
            "restart_required": false
        },
        {
            "name": "innodb_buffer_pool_size",
            "min": 5242880,
            "max": 18446744073709552000,
            "restart_required": true,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef474dac18-2c6abd35a758"
        },
        {
            "type": "string",
            "name": "collation_server",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758",
            "restart_required": false
        },
        {
            "type": "string",
            "name": "character_set_filesystem",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758",
            "restart_required": false
        },
        {
            "type": "string",
            "name": "collation_database",
            "datastore_version_id": "f597f709-70ef474d-ac18-2c6abd35a758",
            "restart_required": false
        },
        {
            "name": "innodb_flush_log_at_trx_commit",
            "min": 0,
            "max": 2,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "name": "interactive_timeout",
            "min": 1,
            "max": 65535,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "name": "max_user_connections",
            "min": 0,
            "max": 4294967295,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "name": "innodb_thread_concurrency",
            "min": 0,
            "max": 1000,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "name": "innodb_open_files",
            "min": 10,
            "max": 4294967295,
            "restart_required": true,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "name": "key_buffer_size",
            "min": 8,
            "max": 4294967295,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef474d-ac18-2c6abd35a758"
        },
        {
            "name": "connect_timeout",
            "min": 2,
            "max": 31536000,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef474d-ac18-2c6abd35a758"
        },
        {
            "type": "string",
            "name": "collation_connection",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758",
            "restart_required": false
        },
        {
            "type": "string",
            "name": "character_set_database",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758",
            "restart_required": false
        },
        {
            "name": "auto_increment_increment",
            "min": 1,
            "max": 65535,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "name": "max_connect_errors",
            "min": 1,
            "max": 18446744073709552000,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "type": "string",
            "name": "character_set_results",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758",
            "restart_required": false
        },
        {
            "name": "expire_logs_days",
            "min": 0,
            "max": 99,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        },
        {
            "name": "wait_timeout",
            "min": 1,
            "max": 31536000,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef474d-ac18-2c6abd35a758"
        },
        {
            "name": "server_id",
            "min": 0,
            "max": 4294967295,
            "restart_required": false,
            "type": "integer",
            "datastore_version_id": "f597f709-70ef-474d-ac18-2c6abd35a758"
        }
    ]
}

Configuration groups (configurations)

Creates and lists all configuration groups.

POST
/v1.0/{accountId}/configurations

Create configuration group

Creates a configuration group.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
datastore body string Data store assigned to the configuration group. Required if you did not configure the default data store.
values body string Dictionary that lists configuration parameter names and associated values.
name body string Name of the configuration group you are creating.
accountId (Optional) path string The account ID of the owner of the instance.

Request Example

{
    "configuration": {
        "datastore": {
                "type": "mysql"
        },
        "values": {
                "sync_binlog": 1
        },
        "name": "group1"
    }
}

Response Example

{
    "updated": "2015-07-01T16:38:27",
    "name": "group1",
    "created": "2015-07-01T16:38:27",
    "instance_count": 0,
    "values": {
        "sync_binlog": 1
    },
    "datastore_version_id": "2dc7faa0-efff-4c2b-8cff-bcd949c518a5",
    "id": "2aa51628-5c42-4086-8682-137caffd2ba6",
    "datastore_name": "mysql",
    "datastore_version_name": "5.6",
    "description": null
}
GET
/v1.0/{accountId}/configurations

List configuration groups

Lists all configuration groups.

The list includes the associated data store and data store version for each configuration group.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
accountId (Optional) path string The account ID of the owner of the instance.

Response Example

{
    "configurations": [
        {
            "datastore_name": "mysql",
            "updated": "2015-07-01T16:38:27",
            "name": "group1",
            "created": "2015-07-01T16:38:27",
            "datastore_version_name": "5.6",
            "id": "2aa51628-5c42-4086-8682-137caffd2ba6",
            "datastore_version_id": "2dc7faa0-efff-4c2b-8cff-bcd949c518a5",
            "description": null
        }
    ]
}
GET
/v1.0/{accountId}/configurations/{configId}/instances

List configuration group instances

Lists the instances associated with the specified configuration group.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
configId (Optional) path string The ID of the configuration group.
accountId (Optional) path string The account ID of the owner of the instance.

Response Example

{
    "instances": [
        {
            "id": "7fd2d1d6-a2ef-4a76-8c03-e233db4d86da",
            "name": "master_1"
        }
    ]
}
DELETE
/v1.0/{accountId}/configurations/{configId}

Delete configuration group

Deletes a configuration group.

Error response codes:202,413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
configId (Optional) path string The ID of the configuration group.
accountId (Optional) path string The account ID of the owner of the instance.
PATCH
/v1.0/{accountId}/configurations/{configId}

Patch configuration group

Sets new values for a configuration group.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
values body string Dictionary that lists configuration parameter names and associated values.
configId (Optional) path string The ID of the configuration group.
accountId (Optional) path string The account ID of the owner of the instance.

Request Example

{
    "configuration": {
        "values": {
            "connect_timeout": 17
        }
    }
}

Response Example

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 0
Date: Mon, 6 Jul 2015 21:53:10 GMT
GET
/v1.0/{accountId}/configurations/{configId}

Show configuration group details

Lists details about a configuration group, including its values.

Normal response codes: 200 Error response codes:413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
configId (Optional) path string The ID of the configuration group.
accountId (Optional) path string The account ID of the owner of the instance.

Response Example

{
    "configuration": {
        "datastore_name": "mysql",
        "updated": "2015-11-22T19:07:20",
        "values": {
            "connect_timeout": 17
        },
        "name": "group1",
        "created": "2015-11-20T20:51:24",
        "datastore_version_name": "5.6",
        "instance_count": 1,
        "id": "1c8a4fdd-690c-4e6e-b2e1-148b8d738770",
        "datastore_version_id": "b9f97132-467b-4f8e-b12d-947cfc223ac3",
        "description": null
    }
}
PUT
/v1.0/{accountId}/configurations/{configId}

Update configuration group

Sets new values for a configuration group. Also lets you change the name and description of the configuration group.

Error response codes:202,413,405,404,403,401,400,422,503,500,501,

Request

Name In Type Description
values body string Dictionary that lists configuration parameter names and associated values.
description body string New description of the configuration group.
name body string Name of the configuration group you are creating.
configId (Optional) path string The ID of the configuration group.
accountId (Optional) path string The account ID of the owner of the instance.

Request Example

{
    "configuration": {
        "values": {
            "connect_timeout": 18
        },
        "name": "new_name",
        "description": "New description"
    }
}
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.