Jump to: navigation, search

Difference between revisions of "Trove/trove-versions-types"

(API)
m (API details)
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Versions and DB Types ==
+
== Overview ==
 +
<br />
 +
Datastore types management will allow users of Trove to select database type and version on db engine from the list
 +
provided by operator. Operator will have possibility to control datastore types, add new and deactivate old versions.<br />
  
=== List Supported Types and Versions (New Call) ===
+
To implement this capability users can specify datastore type and optional version of engine on instance create.<br />
 +
Datastore Type is a family of database engines, like mysql, mongodb, cassandra.<br />
 +
Datastore Version defines engine version of selected datastore type and contains list of system packages which provides this datastore.<br />
  
==== Use Case / User Story ==== 
+
Each datastore type has several versions of engine.<br />
As a Reddwarf User, I want the ability to list all support database types and major versions, so that I know which types and versions are available to be provisioned.
+
Type can have default version for type.<br />
 +
Versions can be marked as active or inactive
 +
Active versions available for user and can be used for create db instance
 +
User dont see inactive versions and cannot create new instance with inactive version.
 +
But inactive version can be used in already running instances.
  
GET /types List supported instance types
+
For each datastore type operator can specify OS image on which instance will works.<br />
 +
For each version of each type operator can specify different image, which will have more precedence then image for type.<br />
 +
Thus we have flexible selection of image, type of db, and version.<br />
  
'''STATUS FIELDS'''<br />
+
For each version should be specified list of system packages which provides installation of db with specified version on specified image.<br />
'''DEFAULT''' - This is the default database type.  If you do not specify a type when creating an instance, this is the default database type.<br />
+
Possible to specify only one package here, but in some cases need to specify several packages with exactly version.<br />
'''SUPPORTED''' - This is a supported database type.<br />
+
For mysql you can specify server, client, shared and shared-compat packages. It matters if you have more then one version available in your repos. For example, if you specify only "mysql-server-5.5" package, and you have mariadb and percona repos enabled, you can got mysql-server-5.5, mariadb-shared-5.5, percona-client-55 installed on your image.<br />
'''UNSUPPORTED''' - This is an unsupported but available database type.<br />
 
'''DEPRECATED''' - Deprecated instance types are no longer provisionable but are still supported. You will not be able to create instances of this type.<br />
 
  
==== API ====
+
Possible to use vanilla images (sure, with prepared GA and package repositories) and preinstalled.<br />
'''Response Codes:''' 200<br />
+
To get trove avoid package installation, on image should be installed all packages specified in list in version.<br />
'''Error Codes:''' STD_ERR_CODES<br />
+
 
'''Description:''' Returns the support instance types (major versions).  Example, MySQL 5.1, MySQL 5.5, Percona 5.5, MariaDB 5.5, etc.<br />
+
== Management Resources ==
'''Request Body:''' This operation does not require a request body.<br/>
+
<br />
'''Response:'''
+
Two new resources, datastore_type and datastore_version will be exposed as part of Trove.<br />
 +
datastore_type resource will allow operator to define new datastore type, datastore_type contains the following data:<br />
 +
id - A system-defined UUID assigned to the datastore type when it is created for the first time.<br />
 +
name - Name of the datastore type<br />
 +
engine - Name of manager class which provides implementation<br />
 +
image_id - UUID of image which will be used for instance provisioning<br />
 +
default_version - version which will used if user doesnt specified version on instance create<br />
 +
User can see only id and name of datastore type.<br />
 +
 
 +
datastore_version resource allow operator to define versions of specified database type, contains following data:<br />
 +
 
 +
id - A system-defined UUID assigned to the datastore type version when it is created for the first time.<br />
 +
name - Name of the datastore type version<br />
 +
datastore_type - datastore type which this version belongs to<br />
 +
image_id - UUID of image which will be used for instance provisioning (overloads image_id from datastore_type)<br />
 +
packages - space separated list of system packages provides this version of datastore<br />
 +
active - bool (1|0) - defines this version is active or not<br />
 +
User can see only id and name, also user can see and use only active versions<br />
 +
 
 +
To implement this capability operator should define datastore types and available versions in db.<br />
 +
trove-manage will have following commands:<br />
 +
update_datastore_type name engine image_id - update datastore type with specified name<br />
 +
If datastore type with this name not exists - it will be created<br />
 +
This command returns UUID or name of created/updated datastore type.
 +
 
 +
update_datastore_version datastore_type name image_id packages active - update version with specified name<br />
 +
If version with this name not exists - it will be created<br />
 +
This command returns UUID or name of created/updated datastore type version.<br />
 +
 
 +
== API details ==
 +
 
 +
User can list datastore types and available versions
 +
{| class="wikitable"
 +
|-
 +
! Method !! Resource !! Description
 +
|-
 +
| GET || /datastores || list datastore types
 +
|-
 +
| GET || /datastores/{id} || show datastore type with {id}
 +
|-
 +
| GET || /datastores/{id}/versions || list available versions for datastore type with {id}
 +
|-
 +
| GET || /datastores/{id}/versions/{id} || show version with {id}
 +
|}
 +
 
 +
=== Datastore types list (New call) ===
 +
Request<br />
 +
GET /{tenant_id}/datastores<br />
 +
Response
 
<pre>
 
<pre>
 
{
 
{
     "types": [
+
     "id": "73144fc8-f2c5-4490-a2d7-76604c4528dd",  
        {
+
    "links": [
            "id": 1,
+
...
            "links": [
+
    ],  
                {
+
    "name": "MongoDB"
                    "href": "https://service/v1.0/1234/types/2",
+
}
                    "rel": "self"
+
{
                },
+
    "id": "e60153d4-8ac4-414a-ad58-fe2e0035704a",  
                {
+
    "links": [
                    "href": "https://service/types/2",
+
...
                    "rel": "bookmark"
+
    ],  
                }
+
    "name": "Mysql"
            ],
 
            '''"name": "MySQL 5.1",
 
            "versions": [
 
                {
 
                    "version":"5.1.63",
 
                    "description":"Imperitive security updates included in this version.  Reccommend that you update"
 
                }
 
            ],
 
            "status": "DEPRECATED",
 
            "updated": "2012-01-01T00:00:00Z"
 
            "description":"Some description."
 
        },'''
 
        {
 
            "id": 2,
 
            "links": [
 
                {
 
                    "href": "https://service/v1.0/1234/types/2",
 
                    "rel": "self"
 
                },
 
                {
 
                  "href": "https://service/types/2",
 
                    "rel": "bookmark"
 
                }
 
            ],
 
            "name": "MySQL 5.5",
 
            "versions": [
 
                {
 
                    "version":"5.5.22",
 
                    "description":"Some description that is optional"
 
                }
 
            ],
 
            "status": "SUPPORTED",
 
            "updated": "2012-01-01T00:00:00Z"
 
            "description":"Some description."
 
        },
 
        {
 
            "id": 3,
 
            "links": [
 
                {
 
                    "href": "https://service/v1.0/1234/types/3",
 
                    "rel": "self"
 
                },
 
                {
 
                  "href": "https://service/types/3",
 
                    "rel": "bookmark"
 
                }
 
            ],
 
            "name": "MySQL 5.6",
 
            "versions": [
 
                {
 
                    "version":"5.6.30",
 
                    "description":"Imperitive security updates included in this version.  Reccommend that you update"
 
                }
 
            ],
 
            "status": "DEFAULT",
 
            "updated": "2012-01-01T00:00:00Z"
 
            "description":"Some description."
 
        },
 
        {
 
            "id": 4,
 
            "links": [
 
                {
 
                    "href": "https://service/v1.0/1234/types/4",
 
                    "rel": "self"
 
                },
 
                {
 
                    "href": "https://service/types/4",
 
                    "rel": "bookmark"
 
                }
 
            ],
 
            "name": "MariaDB 5.5",
 
            "versions": [
 
                {
 
                    "version":"5.5.36",
 
                    "description":"Maria updates!"
 
                }
 
            ],
 
            "status": "UNSUPPORTED",
 
            "updated": "2012-01-01T00:00:00Z"
 
            "description":"Some description."
 
        }
 
    ]
 
 
}
 
}
 
</pre>
 
</pre>
  
=== List Database Instance Status and Details (Existing) ===
+
=== Show datastore type (New call) ===
 +
Request<br />
 +
GET /{tenant_id}/datastores/e60153d4-8ac4-414a-ad58-fe2e0035704a<br />
 +
Response
 +
<pre>
 +
{
 +
    "id": "e60153d4-8ac4-414a-ad58-fe2e0035704a",
 +
    "links": [
 +
...
 +
    ],
 +
    "name": "Mysql"
 +
}
 +
</pre>
  
==== Use Cases / User Stories ====
+
=== Datastore type versions list (New call) ===
As a Reddwarf user, I want to know what the current version and type of database (MySQL in the current case) that is associated with my instance so that I can better understand version-based limitations/vulnerabilities and determine if I would benefit from an upgrade (when upgrades and multiple versions become available).
+
Request<br />
 +
GET /{tenant_id}/datastores/e60153d4-8ac4-414a-ad58-fe2e0035704a/versions<br />
 +
Response
 +
<pre>
 +
{
 +
    "id": "7d109ae8-d38f-41c8-86e4-a8e613f81be5",
 +
    "links": [
 +
...
 +
    ],
 +
    "name": "ubuntu percona-5.5.33"
 +
}
 +
{
 +
    "id": "8ae342fb-19ac-4882-8978-fe1afb38c7c7",
 +
    "links": [
 +
...
 +
    ],
 +
    "name": "fedora oracle-5.1.71"
 +
}
 +
{
 +
    "id": "94ed1f9f-6c1a-4d6e-87e9-04ecff37b64b",
 +
    "links": [
 +
...
 +
    ],
 +
    "name": "ubuntu maria-10.0.4"
 +
}
 +
</pre>
  
Note: This is a modification to the "List Database Instance Status and Details" call
+
=== Show version (New call) ===
 +
Request<br />
 +
GET /{tenant_id}/datastores/versions/7d109ae8-d38f-41c8-86e4-a8e613f81be5<br />
 +
Response
 +
<pre>
 +
{
 +
    "id": "7d109ae8-d38f-41c8-86e4-a8e613f81be5",
 +
    "links": [
 +
...
 +
    ],
 +
    "name": "ubuntu percona-5.5.33"
 +
}
 +
</pre>
  
==== API ====
+
=== Create instance ===
GET        /instances/{instanceId}        Add the type and version to the instance details returned
+
To specify datastore type and version you can add datastore and datastore_version parameters to body.<br />
 +
To dont break the existing 1.0 contract datastore_type is optional in body. In case if datastore is not specified, will used default (specified in trove.conf)
  
'''Response Codes:''' same as current call <br/>
+
=== Create instance with specified datastore type and version (Existing call) ===
'''Error Codes:''' same as current call<br/>
+
Request<br />
'''Description:''' Return the database type and version currently in use on the instance<br/>
+
POST /instances
'''Request Body:''' This operation does not require a request body.<br/>
+
<pre>
'''Response:'''<br/>
+
{
 +
"instance" : {
 +
      "flavorRef" : "2",
 +
      "name" : "as",
 +
      "datastore": {
 +
          "type" : "e60153d4-8ac4-414a-ad58-fe2e0035704a",
 +
          "version" : "94ed1f9f-6c1a-4d6e-87e9-04ecff37b64b"
 +
      },
 +
      "volume" : { "size" : "1" }
 +
    }
 +
}
 +
</pre>
 +
Response
 
<pre>
 
<pre>
 
{
 
{
     "instance": {
+
     "created": "2013-10-09T10:56:56",  
        "created": "2012-03-28T21:31:02Z",  
+
    "flavor": {
        "flavor": {
+
         "id": "2",  
          ...
 
        },
 
        "hostname": "192.168.1.1",
 
         "id": "2450c73f-7805-4afe-a42c-4094ab42666b",  
 
 
         "links": [
 
         "links": [
          ...
+
...
         ],  
+
         ]
        "name": "my_db_inst",
+
    },  
        "status": "ACTIVE",  
+
    "id": "86bb7492-d797-4562-b864-851c8fad7216",  
        "updated": "2012-03-28T21:34:25Z",  
+
    "links": [
        "volume": {
+
...
            "size": 2,
+
    ],  
            "used": 0.124542236328125
+
    "name": "as",  
        },
+
    "datastore": {
         "type": {
+
         "type": "Mysql",  
            "id": "1",
+
        "version": "ubuntu maria-10.0.4"
            "links": [
+
    },  
                {
+
    "status": "BUILD",  
                    "href": "https://service/v1.0/1234/type/1",  
+
    "updated": "2013-10-09T10:56:56",  
                    "rel": "self"
+
    "volume": {
                },  
+
         "size": 1
                {
 
                  "href": "https://service/type/1",  
 
                    "rel": "bookmark"
 
                }
 
            ]
 
        },
 
         "version": "5.1.61"
 
 
     }
 
     }
 
}
 
}
 
</pre>
 
</pre>
  
=== List Instances (Existing) ===
+
=== List instances (Existing call) ===
 
+
Request<br />
==== Use Case / User Story ====
+
GET /instances<br />
As a Reddwarf user, I want to view the type of database (i.e. MySQL 5.1 / major version) that is associated with each instance listed on my account so that I can quickly assess any differentiations between instances and determine which instances, if any, may need to be updated.
+
Response
 
+
<pre>
==== API ====
 
GET /instances Lists the status and information for all database instances.<br />
 
 
 
'''Response Codes:''' same as current call<br />
 
'''Error Codes:''' same as current call<br />
 
'''Description:''' Return the database type and version currently in use on the instance<br />
 
'''Request Body:''' This operation does not require a request body.<br />
 
Response:
 
 
 
 
{
 
{
     "instances": [
+
     "flavor": {
        {
+
        "id": "2",  
            "flavor": {
+
        "links": [
                ...
+
...
            },
+
        ]
            "id": "28d1b8f3-172a-4f6d-983d-36021508444a",  
+
    },  
            "links": [
+
    "id": "b1f0dff8-6303-4711-9d23-e899abc5d24d",  
              ...
+
    "links": [
            ],
+
...
            "name": "my_db_inst",
+
    ],  
            "status": "ACTIVE",
+
    "name": "as_2",  
            "volume": {
+
    "datastore": {
                "size": 2
+
        "type": "Mysql"
            }
+
    },
            "type": {
+
    "status": "ACTIVE",  
            "id": "1",
+
    "volume": {
            "links": [
+
        "size": 1
                {
+
    }
                    "href": "https://service/v1.0/1234/type/1",
 
                    "rel": "self"
 
                },  
 
                {
 
                    "href": "https://service/type/1",
 
                    "rel": "bookmark"
 
                }
 
            ]
 
            }
 
        },
 
        {
 
            "flavor": {
 
                ...
 
            },
 
            "id": "8fb081af-f237-44f5-80cc-b46be1840ca9",  
 
            "links": [
 
                ...
 
            ],  
 
            "name": "my_db_inst_2",  
 
            "status": "ACTIVE",
 
            "volume": {
 
                "size": 2
 
            }
 
            "type": {
 
            "id": "2",
 
            "links": [
 
                {
 
                    "href": "https://service/v1.0/1234/type/2",  
 
                    "rel": "self"
 
                },
 
                {
 
                    "href": "https://service/type/2",
 
   
 
              "rel": "bookmark"
 
                }
 
            ]
 
            }
 
        }
 
    ]
 
 
}
 
}
 
=== Create Database Instance (Existing) ===
 
 
==== Use Case / User Story ====
 
As a Reddwarf User, I want the ability to specify the database type (major version) when creating an instance, so that I can create different database instances based on my application needs.
 
 
==== API ====
 
POST /instances Creates a new database instance.
 
 
'''New Attributes''': type, optional - default will be what has STATUS - DEFAULT<br />
 
'''Response Codes:''' same as current call<br />
 
'''Error Codes:''' same as current call<br />
 
'''Description:''' <br />
 
'''Request Body:'''<br />
 
 
{
 
{
     "instance": {
+
     "flavor": {
         "databases": [
+
         "id": "2",  
            {
+
        "links": [
                "character_set": "utf8",  
+
...
                "collate": "utf8_general_ci",
+
        ]
                "name": "sampledb"
+
    },  
            },  
+
    "id": "be1f10ae-afa9-4f75-808d-f7782784f363",  
            {
+
    "links": [
                "name": "nextround"
+
...
            }
+
    ],  
        ],  
+
    "name": "as_2",  
        "flavorRef": ""href": "https://service/v1.0/1234/flavors/1",  
+
    "datastore": {
        "name": "my_db_inst",  
+
        "type": "Mysql"
        "users": [
+
    },
            {
+
    "status": "ACTIVE",  
                "databases": [
+
    "volume": {
                    {
+
        "size": 1
                        "name": "sampledb"
 
                    }
 
                ],  
 
                "name": "demouser",  
 
                "password": "demopassword"
 
            }
 
        ],
 
        "volume": {
 
            "size": 2
 
        }
 
        "typeRef": ""href": "https://service/v1.0/1234/type/1",
 
 
     }
 
     }
 
}
 
}
 +
</pre>
  
'''Response:'''
+
=== Get instance (Existing call) ===
 +
Request<br />
 +
GET /instances/be1f10ae-afa9-4f75-808d-f7782784f363<br />
 +
Response
 +
<pre>
 
{
 
{
     "instance": {
+
     "created": "2013-10-08T09:05:45",  
        "created": "2012-01-25T21:53:09Z",  
+
    "flavor": {
        "flavor": {
+
         "id": "2",  
            "id": "1",
 
            "links": [
 
              ...
 
            ]
 
        },
 
        "hostname": "192.168.1.1",
 
         "id": "dea5a2f7-3ec7-4496-adab-0abb5a42d635",  
 
 
         "links": [
 
         "links": [
          ...
+
...
         ],  
+
         ]
        "name": "my_db_inst",  
+
    },  
        "status": "BUILD",  
+
    "id": "be1f10ae-afa9-4f75-808d-f7782784f363",  
        "updated": "2012-01-25T21:53:10Z",  
+
    "links": [
        "volume": {
+
...
            "size": 2
+
    ],  
        }
+
    "name": "as_2",  
      "type": {
+
    "datastore": {
            "id": "1",
+
        "type": "Mysql",
            "name": "MySQL 5.1",
+
        "version": "ubuntu maria-10.0.4"
            "links": [
+
    },
                {
+
    "status": "ACTIVE",  
                    "href": "https://service/v1.0/1234/type/1",  
+
    "updated": "2013-10-08T09:05:52",  
                    "rel": "self"
+
    "volume": {
                },
+
        "size": 1
                {
 
                    "href": "https://service/type/1",
 
                    "rel": "bookmark"
 
                }
 
            ]
 
        }
 
 
     }
 
     }
 
}
 
}
 +
</pre>
 +
 +
You can use names as well as UUIDs

Latest revision as of 13:51, 31 October 2013

Overview


Datastore types management will allow users of Trove to select database type and version on db engine from the list provided by operator. Operator will have possibility to control datastore types, add new and deactivate old versions.

To implement this capability users can specify datastore type and optional version of engine on instance create.
Datastore Type is a family of database engines, like mysql, mongodb, cassandra.
Datastore Version defines engine version of selected datastore type and contains list of system packages which provides this datastore.

Each datastore type has several versions of engine.
Type can have default version for type.
Versions can be marked as active or inactive Active versions available for user and can be used for create db instance User dont see inactive versions and cannot create new instance with inactive version. But inactive version can be used in already running instances.

For each datastore type operator can specify OS image on which instance will works.
For each version of each type operator can specify different image, which will have more precedence then image for type.
Thus we have flexible selection of image, type of db, and version.

For each version should be specified list of system packages which provides installation of db with specified version on specified image.
Possible to specify only one package here, but in some cases need to specify several packages with exactly version.
For mysql you can specify server, client, shared and shared-compat packages. It matters if you have more then one version available in your repos. For example, if you specify only "mysql-server-5.5" package, and you have mariadb and percona repos enabled, you can got mysql-server-5.5, mariadb-shared-5.5, percona-client-55 installed on your image.

Possible to use vanilla images (sure, with prepared GA and package repositories) and preinstalled.
To get trove avoid package installation, on image should be installed all packages specified in list in version.

Management Resources


Two new resources, datastore_type and datastore_version will be exposed as part of Trove.
datastore_type resource will allow operator to define new datastore type, datastore_type contains the following data:
id - A system-defined UUID assigned to the datastore type when it is created for the first time.
name - Name of the datastore type
engine - Name of manager class which provides implementation
image_id - UUID of image which will be used for instance provisioning
default_version - version which will used if user doesnt specified version on instance create
User can see only id and name of datastore type.

datastore_version resource allow operator to define versions of specified database type, contains following data:

id - A system-defined UUID assigned to the datastore type version when it is created for the first time.
name - Name of the datastore type version
datastore_type - datastore type which this version belongs to
image_id - UUID of image which will be used for instance provisioning (overloads image_id from datastore_type)
packages - space separated list of system packages provides this version of datastore
active - bool (1|0) - defines this version is active or not
User can see only id and name, also user can see and use only active versions

To implement this capability operator should define datastore types and available versions in db.
trove-manage will have following commands:
update_datastore_type name engine image_id - update datastore type with specified name
If datastore type with this name not exists - it will be created
This command returns UUID or name of created/updated datastore type.

update_datastore_version datastore_type name image_id packages active - update version with specified name
If version with this name not exists - it will be created
This command returns UUID or name of created/updated datastore type version.

API details

User can list datastore types and available versions

Method Resource Description
GET /datastores list datastore types
GET /datastores/{id} show datastore type with {id}
GET /datastores/{id}/versions list available versions for datastore type with {id}
GET /datastores/{id}/versions/{id} show version with {id}

Datastore types list (New call)

Request
GET /{tenant_id}/datastores
Response

{
    "id": "73144fc8-f2c5-4490-a2d7-76604c4528dd", 
    "links": [
...
    ], 
    "name": "MongoDB"
}
{
    "id": "e60153d4-8ac4-414a-ad58-fe2e0035704a", 
    "links": [
...
    ], 
    "name": "Mysql"
}

Show datastore type (New call)

Request
GET /{tenant_id}/datastores/e60153d4-8ac4-414a-ad58-fe2e0035704a
Response

{
    "id": "e60153d4-8ac4-414a-ad58-fe2e0035704a", 
    "links": [
...
    ], 
    "name": "Mysql"
}

Datastore type versions list (New call)

Request
GET /{tenant_id}/datastores/e60153d4-8ac4-414a-ad58-fe2e0035704a/versions
Response

{
    "id": "7d109ae8-d38f-41c8-86e4-a8e613f81be5", 
    "links": [
...
    ], 
    "name": "ubuntu percona-5.5.33"
}
{
    "id": "8ae342fb-19ac-4882-8978-fe1afb38c7c7", 
    "links": [
...
    ], 
    "name": "fedora oracle-5.1.71"
}
{
    "id": "94ed1f9f-6c1a-4d6e-87e9-04ecff37b64b", 
    "links": [
...
    ], 
    "name": "ubuntu maria-10.0.4"
}

Show version (New call)

Request
GET /{tenant_id}/datastores/versions/7d109ae8-d38f-41c8-86e4-a8e613f81be5
Response

{
    "id": "7d109ae8-d38f-41c8-86e4-a8e613f81be5", 
    "links": [
...
    ], 
    "name": "ubuntu percona-5.5.33"
}

Create instance

To specify datastore type and version you can add datastore and datastore_version parameters to body.
To dont break the existing 1.0 contract datastore_type is optional in body. In case if datastore is not specified, will used default (specified in trove.conf)

Create instance with specified datastore type and version (Existing call)

Request
POST /instances

{
"instance" : {
      "flavorRef" : "2",
      "name" : "as",
      "datastore": {
          "type" : "e60153d4-8ac4-414a-ad58-fe2e0035704a",
          "version" : "94ed1f9f-6c1a-4d6e-87e9-04ecff37b64b"
      },
      "volume" : { "size" : "1" }
    }
}

Response

{
    "created": "2013-10-09T10:56:56", 
    "flavor": {
        "id": "2", 
        "links": [
...
        ]
    }, 
    "id": "86bb7492-d797-4562-b864-851c8fad7216", 
    "links": [
...
    ], 
    "name": "as", 
    "datastore": {
        "type": "Mysql", 
        "version": "ubuntu maria-10.0.4"
    }, 
    "status": "BUILD", 
    "updated": "2013-10-09T10:56:56", 
    "volume": {
        "size": 1
    }
}

List instances (Existing call)

Request
GET /instances
Response

{
    "flavor": {
        "id": "2", 
        "links": [
...
        ]
    }, 
    "id": "b1f0dff8-6303-4711-9d23-e899abc5d24d", 
    "links": [
...
    ], 
    "name": "as_2", 
    "datastore": {
        "type": "Mysql"
    },
    "status": "ACTIVE", 
    "volume": {
        "size": 1
    }
}
{
    "flavor": {
        "id": "2", 
        "links": [
...
        ]
    }, 
    "id": "be1f10ae-afa9-4f75-808d-f7782784f363", 
    "links": [
...
    ], 
    "name": "as_2", 
    "datastore": {
        "type": "Mysql"
    },
    "status": "ACTIVE", 
    "volume": {
        "size": 1
    }
}

Get instance (Existing call)

Request
GET /instances/be1f10ae-afa9-4f75-808d-f7782784f363
Response

{
    "created": "2013-10-08T09:05:45", 
    "flavor": {
        "id": "2", 
        "links": [
...
        ]
    }, 
    "id": "be1f10ae-afa9-4f75-808d-f7782784f363", 
    "links": [
...
    ], 
    "name": "as_2", 
    "datastore": {
        "type": "Mysql", 
        "version": "ubuntu maria-10.0.4"
    },
    "status": "ACTIVE", 
    "updated": "2013-10-08T09:05:52", 
    "volume": {
        "size": 1
    }
}

You can use names as well as UUIDs