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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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)

Lists, shows details for, creates, attaches a configuration group to, detaches a configuration group from, update the name, upgrade datastore version, deletes, lists configuration defaults, creates root, and determines whether root is enabled, for instances.

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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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}

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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of 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
        }
    }
}
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 can also associate users with each database.

  • The port on which the database instance is listening is database specific.

Normal response codes: 200

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

users (Optional)

body

array

A users object.

users.name

body

string

The name of a user.

users.password

body

string

The password of a user.

users.host (Optional)

body

string

A host allowed for a user.

users.databases (Optional)

body

array

The databases object. This is a list of databases which the user can access.

users.databases.name

body

string

The name of a database which the user can access.

datastore (Optional)

body

object

A datastore object.

datastore.type (Optional)

body

string

The type of a datastore.

datastore.version (Optional)

body

string

Name of the datastore version to use when creating/updating the instance.

name

body

string

Name of the instance.

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.

volume (Optional)

body

object

A volume object.

volume.size

body

integer

The volume size, in gigabytes (GB). A valid value is from 1 to 50(this limit is controlled by the configuration max_accepted_volume_size).

volume.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.

modules (Optional)

body

object

The modules object.

modules.id

body

string

The ID of a module.

restorePoint (Optional)

body

object

The restorePoint object. Use this paramter to create an instance from a backup.

restorePoint.backupRef

body

string

The backup id used from which a new instance is created.

availability_zone (Optional)

body

string

The availability zone of the instance.

nics (Optional)

body

array

Network interfaces for database service inside Nova instances. NOTE: For backward compatibility, this parameter uses the same schema as novaclient creating servers, but only net-id is supported ans can only be specified once. This parameter is required in service tenant deployment model.

replica_of (Optional)

body

string

ID or name of an existing instance to replicate from.

replica_count (Optional)

body

integer

Number of replicas to create (defaults to 1).

locality (Optional)

body

string

The scheduler hint when creating underlying Nova instances. Valide values are: affinity, anti-affinity.

region_name (Optional)

body

string

The region name of an instance.

databases (Optional)

body

array

A databases object.

databases.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.

databases.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.

instance

body

object

An instance object.

configuration

body

string

ID of the configuration group that you want to attach to the instance.

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

id

body

string

The ID of the database instance.

name

body

string

Name of the instance.

status

body

string

Status of the instance.

links

body

array

The links object of of the instance.

links.href

body

string

The href attribute of an instance link.

links.rel

body

string

The rel attribute of an instance link.

flavor

body

object

A flavor object, which includes the flavor ID (integer) and flavor relative links.

flavor.id

body

string

The ID of the flavor.

flavor.links

body

array

The links object of a flavor.

flavor.links.href

body

string

The href attribute of a flavor link.

flavor.links.rel

body

string

The rel attribute of a flavor link.

datastore

body

object

A datastore object.

datastore.type (Optional)

body

string

The type of a datastore.

datastore.version

body

string

Name or ID of a datastore version.

region

body

string

The region name of an instance.

tenant_id (Optional)

body

string

The ID of a tenant.

volume (Optional)

body

object

A volume object.

volume.size

body

integer

The volume size, in gigabytes (GB). A valid value is from 1 to 50(this limit is controlled by the configuration max_accepted_volume_size).

volume.used (Optional)

body

float

The used space of the volume, in gigabytes (GB).

hostname (Optional)

body

string

The hostname of an instance.

ip (Optional)

body

string

The IP address of an instance.

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.

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.

fault (Optional)

body

object

The fault object of an instance.

fault.message

body

string

The fault message of an instance.

fault.created

body

string

The update timestamp of the fault message for an instance.

fault.details

body

string

The detail fault explanation of an instance.

replicas (Optional)

body

array

The replicas object of an instance.

replicas.id

body

string

The ID of a replica instance.

replicas.links

body

array

The links object of a replica instance.

replicas.links.href

body

string

The href attribute of a replica instance link.

replicas.links.rel

body

string

The rel attribute of a replica instance link.

configuration (Optional)

body

object

A configuration object.

configuration.id

body

string

The ID of a configuration.

configuration.name

body

string

The name of a configuration.

configuration.links

body

array

The links object of a configuration.

configuration.links.href

body

string

The href attribute of a configuration link.

configuration.links.rel

body

string

The rel attribute of a configuration link.

locality (Optional)

body

string

The scheduler hint when creating underlying Nova instances. Valide values are: affinity, anti-affinity.

local_storage_used (Optional)

body

float

The used space of the ephemeral disk, in gigabytes (GB).

password (Optional)

body

string

The password of the database root user(i.e. the administrative user).

cluster_id (Optional)

body

string

The cluster ID of an instance.

shard_id (Optional)

body

string

The shard ID of an instance.

server_id (Optional)

body

string

The ID of the underlying Nova instance for an instance.

volume_id (Optional)

body

string

The ID of a volume.

encrypted_rpc_messaging (Optional)

body

boolean

Whether the instance is using encrypted rpm messaging feature or not.

instance

body

object

An instance 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
        }
    }
}
PUT
/v1.0/{accountId}/instances/{instanceId}

Attach configuration group

Attaches a configuration group to an instance.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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 of 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.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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 of 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.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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 of 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
    }
}
PATCH
/v1.0/{accountId}/instances/{instanceId}

Update instance name

Update the instance name.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instance

body

object

An instance object.

name (Optional)

body

string

Name of the instance.

instanceId (Optional)

path

string

The ID of the database instance.

accountId (Optional)

path

string

The account ID of the owner of the instance.

Request Example

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

Upgrade datastore version

Upgrade datastore version.

During datastore version upgrading, the instance status change to UPGRADE, and changes back to ACTIVE after upgrading finishes, otherwize changes to ERROR if the upgrading fails.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instance

body

object

An instance object.

datastore_version (Optional)

body

string

Name of the datastore version to use when creating/updating the instance.

instanceId (Optional)

path

string

The ID of the database instance.

accountId (Optional)

path

string

The account ID of the owner of the instance.

Request Example

{
    "instance": {
        "datastore_version": "sample_datastore_version"
    }
}
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.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of the database instance.

accountId (Optional)

path

string

The account ID of the owner of the instance.

GET
/v1.0/{accountId}/instances/{instanceId}/configuration

List configuration defaults

Lists the configuration defaults for an instance.

Normal response codes: 200

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of 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.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of 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.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of 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.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of 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.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of 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.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of the database instance.

accountId (Optional)

path

string

The account ID of the owner of the instance.

Request Example

{
    "eject_replica_source": {}
}

Database instance logs

List, show details, enable, disable, publish, and discard logs for instances.

GET
/v1.0/{accountId}/instances/{instanceId}/log

List instance logs

Listing all logs for an instance.

Different datastore backend has its own guest_log_exposed_logs configuration to determine which type of logs will be listed by default. For admin context, all logs will be listed.

Normal response codes: 200

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of the database instance.

accountId (Optional)

path

string

The account ID of the owner of the instance.

Response Parameters

Name

In

Type

Description

logs

body

array

A list of log objects.

name

body

string

The name of the log.

type

body

string

The type of the log.

status

body

string

The log status.

published

body

string

Published size of the log.

pending

body

string

Log file size pending to be published.

container

body

string

The object store container where the published log data will be stored. Defaults to None before the log has been published.

prefix

body

string

If the log has been published, thi is the prefix location of where the log data are stored. Otherwize the prefix is None.

metafile

body

string

The log metafile location.

Response Example

{
    "logs": [
        {
            "name": "general",
            "type": "USER",
            "status": "Partial",
            "published": "128",
            "pending": "4096",
            "container": "data_logs",
            "prefix": "5e9e616c-1827-45f5-a487-679084d82f7e/mysql-general/",
            "metafile": "5e9e616c-1827-45f5-a487-679084d82f7e/mysql-general_metafile"
        },
        {
            "name": "slow_query",
            "type": "USER",
            "status": "Ready",
            "published": "0",
            "pending": "128",
            "container": "None",
            "prefix": "None",
            "metafile": "5e9e616c-1827-45f5-a487-679084d82f7e/mysql-slow_query_metafile"
        }
    ]
}
POST
/v1.0/{accountId}/instances/{instanceId}/log

Show instance log details

Show details for a instance log.

Normal response codes: 200

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of the database instance.

accountId (Optional)

path

string

The account ID of the owner of the instance.

name

body

string

The name of the log.

Request Example

{
    "name": "general"
}

Response Parameters

Name

In

Type

Description

log

body

array

A log objects.

name

body

string

The name of the log.

type

body

string

The type of the log.

status

body

string

The log status.

published

body

string

Published size of the log.

pending

body

string

Log file size pending to be published.

container

body

string

The object store container where the published log data will be stored. Defaults to None before the log has been published.

prefix

body

string

If the log has been published, thi is the prefix location of where the log data are stored. Otherwize the prefix is None.

metafile

body

string

The log metafile location.

Response Example

{
    "log": {
            "name": "general",
            "type": "USER",
            "status": "Partial",
            "published": "128",
            "pending": "4096",
            "container": "data_logs",
            "prefix": "5e9e616c-1827-45f5-a487-679084d82f7e/mysql-general/",
            "metafile": "5e9e616c-1827-45f5-a487-679084d82f7e/mysql-general_metafile"
        }
}
POST
/v1.0/{accountId}/instances/{instanceId}/log

Enable instance log

Enable a log type for a instance.

Normal response codes: 200

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of the database instance.

accountId (Optional)

path

string

The account ID of the owner of the instance.

name

body

string

The name of the log.

enable (Optional)

body

integer

To enable a log type, this should always set to 1.

Request Example

{
    "name": "general",
    "enable": 1
}

Response Parameters

Name

In

Type

Description

log

body

array

A log objects.

name

body

string

The name of the log.

type

body

string

The type of the log.

status

body

string

The log status.

published

body

string

Published size of the log.

pending

body

string

Log file size pending to be published.

container

body

string

The object store container where the published log data will be stored. Defaults to None before the log has been published.

prefix

body

string

If the log has been published, thi is the prefix location of where the log data are stored. Otherwize the prefix is None.

metafile

body

string

The log metafile location.

Response Example

{
    "log": {
            "name": "general",
            "type": "USER",
            "status": "Eanbled",
            "published": "0",
            "pending": "0",
            "container": "None",
            "prefix": "None",
            "metafile": "5e9e616c-1827-45f5-a487-679084d82f7e/mysql-general_metafile"
        }
}
POST
/v1.0/{accountId}/instances/{instanceId}/log

Disable instance log

Disable a log type for a instance.

Normal response codes: 200

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of the database instance.

accountId (Optional)

path

string

The account ID of the owner of the instance.

name

body

string

The name of the log.

disable (Optional)

body

integer

To disable a log type, this should always set to 1.

Request Example

{
    "name": "general",
    "disable": 1
}

Response Parameters

Name

In

Type

Description

log

body

array

A log objects.

name

body

string

The name of the log.

type

body

string

The type of the log.

status

body

string

The log status.

published

body

string

Published size of the log.

pending

body

string

Log file size pending to be published.

container

body

string

The object store container where the published log data will be stored. Defaults to None before the log has been published.

prefix

body

string

If the log has been published, thi is the prefix location of where the log data are stored. Otherwize the prefix is None.

metafile

body

string

The log metafile location.

Response Example

{
    "log": {
            "name": "general",
            "type": "USER",
            "status": "Disabled",
            "published": "4096",
            "pending": "0",
            "container": "data_logs",
            "prefix": "5e9e616c-1827-45f5-a487-679084d82f7e/mysql-general/",
            "metafile": "5e9e616c-1827-45f5-a487-679084d82f7e/mysql-general_metafile"
        }
}
POST
/v1.0/{accountId}/instances/{instanceId}/log

Publish instance log

Publish a log type for a instance.

Note: publish will automatically enable a log.

Normal response codes: 200

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of the database instance.

accountId (Optional)

path

string

The account ID of the owner of the instance.

name

body

string

The name of the log.

publish (Optional)

body

integer

To publish a log type, this should always set to 1.

Request Example

{
    "name": "general",
    "publish": 1
}

Response Parameters

Name

In

Type

Description

log

body

array

A log objects.

name

body

string

The name of the log.

type

body

string

The type of the log.

status

body

string

The log status.

published

body

string

Published size of the log.

pending

body

string

Log file size pending to be published.

container

body

string

The object store container where the published log data will be stored. Defaults to None before the log has been published.

prefix

body

string

If the log has been published, thi is the prefix location of where the log data are stored. Otherwize the prefix is None.

metafile

body

string

The log metafile location.

Response Example

{
    "log": {
            "name": "general",
            "type": "USER",
            "status": "Published",
            "published": "128",
            "pending": "0",
            "container": "data_logs",
            "prefix": "5e9e616c-1827-45f5-a487-679084d82f7e/mysql-general/",
            "metafile": "5e9e616c-1827-45f5-a487-679084d82f7e/mysql-general_metafile"
        }
}
POST
/v1.0/{accountId}/instances/{instanceId}/log

Discard instance log

Discard all previously published logs for a instance.

Normal response codes: 200

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of the database instance.

accountId (Optional)

path

string

The account ID of the owner of the instance.

name

body

string

The name of the log.

discard (Optional)

body

integer

To discard a log type which has been published previously, this should always set to 1.

Request Example

{
    "name": "general",
    "discard": 1
}

Response Parameters

Name

In

Type

Description

log

body

array

A log objects.

name

body

string

The name of the log.

type

body

string

The type of the log.

status

body

string

The log status.

published

body

string

Published size of the log.

pending

body

string

Log file size pending to be published.

container

body

string

The object store container where the published log data will be stored. Defaults to None before the log has been published.

prefix

body

string

If the log has been published, thi is the prefix location of where the log data are stored. Otherwize the prefix is None.

metafile

body

string

The log metafile location.

Response Example

{
    "log": {
            "name": "general",
            "type": "USER",
            "status": "Ready",
            "published": "0",
            "pending": "128",
            "container": "None",
            "prefix": "None",
            "metafile": "5e9e616c-1827-45f5-a487-679084d82f7e/mysql-general_metafile"
        }
}

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.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of 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.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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 of 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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of 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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of 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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of 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.

Normal response codes: 204

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of 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.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of 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)

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of 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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of 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"
        }
    ]
}

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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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.7",
    "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.7",
    "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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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.

Normal response codes: 202 Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

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

Backups

List, show details, create and delete backups.

GET
/v1.0/{accountId}/backups

List database backups

List all database backups information for a tenant.

Normal response codes: 200

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

accountId (Optional)

path

string

The account ID of the owner of the instance.

Response Parameters

Name

In

Type

Description

backups

body

array

A list of backup objects.

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.

datastore

body

object

A datastore object.

datastore.type

body

string

The type of a datastore.

datastore.version

body

string

The name of the datastore version.

datastore.version_id

body

string

The UUID of the data store version.

description

body

string

An optional description for the backup.

id

path

string

The ID of the backup.

instance_id

body

string

The ID of the instance to create backup for.

locationRef

body

string

The URL of the backup location.

name

body

string

Name of the backup.

parent_id

body

string

ID of the parent backup to perform an incremental backup from.

size

body

string

Size of the backup, the unit is GB.

status

body

string

Status of the backup.

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.

Response Example

{
    "backups": [
        {
            "created": "2014-10-30T12:30:00",
            "datastore": {
                "type": "mysql",
                "version": "5.5",
                "version_id": "b00000b0-00b0-0b00-00b0-000b000000bb"
            },
            "description": "My Backup",
            "id": "a9832168-7541-4536-b8d9-a8a9b79cf1b4",
            "instance_id": "44b277eb-39be-4921-be31-3d61b43651d7",
            "locationRef": "http://localhost/path/to/backup",
            "name": "snapshot",
            "parent_id": null,
            "size": 0.14,
            "status": "COMPLETED",
            "updated": "2014-10-30T12:30:00"
        },
        {
            "created": "2014-10-30T12:30:00",
            "datastore": {
                "type": "mysql",
                "version": "5.5",
                "version_id": "b00000b0-00b0-0b00-00b0-000b000000bb"
            },
            "description": "My Incremental Backup",
            "id": "2e351a71-dd28-4bcb-a7d6-d36a5b487173",
            "instance_id": "44b277eb-39be-4921-be31-3d61b43651d7",
            "locationRef": "http://localhost/path/to/backup",
            "name": "Incremental Snapshot",
            "parent_id": "a9832168-7541-4536-b8d9-a8a9b79cf1b4",
            "size": 0.14,
            "status": "COMPLETED",
            "updated": "2014-10-30T12:30:00"
        }
    ]
}
GET
/v1.0/{accountId}/instances/{instanceId}/backups

List database backups for an instance

List all database backups for the specified instance.

Normal response codes: 200

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

instanceId (Optional)

path

string

The ID of the database instance.

accountId (Optional)

path

string

The account ID of the owner of the instance.

Response Parameters

Name

In

Type

Description

backups

body

array

A list of backup objects.

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.

datastore

body

object

A datastore object.

datastore.type

body

string

The type of a datastore.

datastore.version

body

string

The name of the datastore version.

datastore.version_id

body

string

The UUID of the data store version.

description

body

string

An optional description for the backup.

id

path

string

The ID of the backup.

instance_id

body

string

The ID of the instance to create backup for.

locationRef

body

string

The URL of the backup location.

name

body

string

Name of the backup.

parent_id

body

string

ID of the parent backup to perform an incremental backup from.

size

body

string

Size of the backup, the unit is GB.

status

body

string

Status of the backup.

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.

Response Example

{
    "backups": [
        {
            "created": "2014-10-30T12:30:00",
            "datastore": {
                "type": "mysql",
                "version": "5.5",
                "version_id": "b00000b0-00b0-0b00-00b0-000b000000bb"
            },
            "description": "My Backup",
            "id": "a9832168-7541-4536-b8d9-a8a9b79cf1b4",
            "instance_id": "44b277eb-39be-4921-be31-3d61b43651d7",
            "locationRef": "http://localhost/path/to/backup",
            "name": "snapshot",
            "parent_id": null,
            "size": 0.14,
            "status": "COMPLETED",
            "updated": "2014-10-30T12:30:00"
        },
        {
            "created": "2014-10-30T12:30:00",
            "datastore": {
                "type": "mysql",
                "version": "5.5",
                "version_id": "b00000b0-00b0-0b00-00b0-000b000000bb"
            },
            "description": "My Incremental Backup",
            "id": "2e351a71-dd28-4bcb-a7d6-d36a5b487173",
            "instance_id": "44b277eb-39be-4921-be31-3d61b43651d7",
            "locationRef": "http://localhost/path/to/backup",
            "name": "Incremental Snapshot",
            "parent_id": "a9832168-7541-4536-b8d9-a8a9b79cf1b4",
            "size": 0.14,
            "status": "COMPLETED",
            "updated": "2014-10-30T12:30:00"
        }
    ]
}
GET
/v1.0/{accountId}/backups/{backupId}

Show database backup details

Show detailes of a backup.

Normal response codes: 200

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

accountId (Optional)

path

string

The account ID of the owner of the instance.

backupId

path

string

The ID of the backup.

Response Parameters

Name

In

Type

Description

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.

datastore

body

object

A datastore object.

datastore.type

body

string

The type of a datastore.

datastore.version

body

string

The name of the datastore version.

datastore.version_id

body

string

The UUID of the data store version.

description

body

string

An optional description for the backup.

id

path

string

The ID of the backup.

instance_id

body

string

The ID of the instance to create backup for.

locationRef

body

string

The URL of the backup location.

name

body

string

Name of the backup.

parent_id

body

string

ID of the parent backup to perform an incremental backup from.

size

body

string

Size of the backup, the unit is GB.

status

body

string

Status of the backup.

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.

Response Example

{
    "backup": {
        "created": "2014-10-30T12:30:00",
        "datastore": {
            "type": "mysql",
            "version": "5.5",
            "version_id": "b00000b0-00b0-0b00-00b0-000b000000bb"
        },
        "description": "My Backup",
        "id": "a9832168-7541-4536-b8d9-a8a9b79cf1b4",
        "instance_id": "44b277eb-39be-4921-be31-3d61b43651d7",
        "locationRef": "http://localhost/path/to/backup",
        "name": "snapshot",
        "parent_id": null,
        "size": 0.14,
        "status": "COMPLETED",
        "updated": "2014-10-30T12:30:00"
    }
}
POST
/v1.0/{accountId}/backups

Create database backup

Creates a database backup for instance.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

name

body

string

Name of the backup.

instance

body

string

The ID of the instance to create backup for.

parent_id (Optional)

body

string

ID of the parent backup to perform an incremental backup from.

incremental (Optional)

body

integer

Create an incremental backup based on the last full backup by setting this parameter to 1 or 0. It will create a full backup if no existing backup found.

description (Optional)

body

string

An optional description for the backup.

accountId (Optional)

path

string

The account ID of the owner of the instance.

Request Example

{
    "backup": {
        "description": "My Backup",
        "incremental": 0,
        "instance": "44b277eb-39be-4921-be31-3d61b43651d7",
        "name": "snapshot"
    }
}

Response Parameters

Name

In

Type

Description

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.

datastore

body

object

A datastore object.

datastore.type

body

string

The type of a datastore.

datastore.version

body

string

The name of the datastore version.

datastore.version_id

body

string

The UUID of the data store version.

description

body

string

An optional description for the backup.

id

path

string

The ID of the backup.

instance_id

body

string

The ID of the instance to create backup for.

locationRef

body

string

The URL of the backup location.

name

body

string

Name of the backup.

parent_id

body

string

ID of the parent backup to perform an incremental backup from.

size

body

string

Size of the backup, the unit is GB.

status

body

string

Status of the backup.

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.

Response Example

{
    "backup": {
        "created": "2014-10-30T12:30:00",
        "datastore": {
            "type": "mysql",
            "version": "5.5",
            "version_id": "b00000b0-00b0-0b00-00b0-000b000000bb"
        },
        "description": "My Backup",
        "id": "a9832168-7541-4536-b8d9-a8a9b79cf1b4",
        "instance_id": "44b277eb-39be-4921-be31-3d61b43651d7",
        "locationRef": null,
        "name": "snapshot",
        "parent_id": null,
        "size": null,
        "status": "NEW",
        "updated": "2014-10-30T12:30:00"
    }
}
DELETE
/v1.0/{accountId}/backups/{backupId}

Delete database backup

Deletes a database backup.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422), instanceFault(500), notImplemented(501), serviceUnavailable(503)

Request

Name

In

Type

Description

backupId

path

string

The ID of the backup.

accountId (Optional)

path

string

The account ID of the owner of the instance.