Jump to: navigation, search

Difference between revisions of "Trove/list-datastore-type-and-versions"

(New API call: List All Datastore Types & Versions)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Description ==
 
== Description ==
This blueprint will add an API call for retrieving datastore type and version in a single call.
+
This blueprint will augment the existing API GET/datastores call for retrieving all datastore type and versions in a single call.
  
Blueprint:  
+
Blueprint: https://blueprints.launchpad.net/trove/+spec/list-datastore-type-and-versions
  
 
== Justification/Benefits ==
 
== Justification/Benefits ==
Line 25: Line 25:
 
<pre>
 
<pre>
 
{
 
{
    "datastores": [
+
  "datastores":[
        {
+
      {
            "default_version": “1”,
+
        "default_version":"1",
"id": “1”,  
+
        "id":"1",
            "links": [
+
        "links":[
                {
+
            {
                    "href": "https://API/v1.0/1234/datastores/1”,  
+
              "href":"https://API/v1.0/1234/datastores/1",
                    "rel": "self"
+
              "rel":"self"
                },  
+
            },
                {
+
            {
                    "href": "https://API/datastores/1”,  
+
              "href":"https://API/datastores/1",
                    "rel": "bookmark"
+
              "rel":"bookmark"
                }
+
            }
            ],  
+
        ],
            "name": “mysql”
+
        "name":"mysql",
"versions": [
+
        "versions":[
        {
+
            {
              "id": “1”,  
+
              "id":"1",
              "links": [
+
              "links":[
 
                   {
 
                   {
                      "href": "https://API/v1.0/1234/datastores/versions/1”,  
+
                    "href":"https://API/v1.0/1234/datastores/versions/1",
                      "rel": "self"
+
                    "rel":"self"
                   },  
+
                   },
 
                   {
 
                   {
                      "href": "https://API/datastores/versions/1”,  
+
                    "href":"https://API/datastores/versions/1",
                      "rel": "bookmark"
+
                    "rel":"bookmark"
                  }
+
                  }
              ],  
+
              ],
              "name": "mysql-5.5"
+
              "name":"mysql-5.5"
        },
+
            },
 
             {
 
             {
              "id": “2”,  
+
              "id":"2",
              "links": [
+
              "links":[
 
                   {
 
                   {
                      "href": "https://API/v1.0/1234/datastores/versions/2”,  
+
                    "href":"https://API/v1.0/1234/datastores/versions/2",
                      "rel": "self"
+
                    "rel":"self"
                   },  
+
                   },
 
                   {
 
                   {
                      "href": "https://API/datastores/versions/2”,  
+
                    "href":"https://API/datastores/versions/2",
                      "rel": "bookmark"
+
                    "rel":"bookmark"
                  }
+
                  }
              ],  
+
              ],
              "name": "mysql-5.6”
+
              "name":"mysql-5.6"
        }
+
            }
    ]
+
        ]
  },  
+
      },
        {
+
      {
            "default_version": “1”,  
+
        "default_version":"1",
            "id": “2”,  
+
        "id":"2",
            "links": [
+
        "links":[
                {
+
            {
                    "href": "https://API/v1.0/1234/datastores/2”,  
+
              "href":"https://API/v1.0/1234/datastores/2",
                    "rel": "self"
+
              "rel":"self"
                },  
+
            },
                {
+
            {
                    "href": "https://API/datastores/2”,  
+
              "href":"https://API/datastores/2",
                    "rel": "bookmark"
+
              "rel":"bookmark"
                }
+
            }
            ],  
+
        ],
            "name": “redis”
+
        "name":"redis",
            "versions": [
+
        "versions":[
        {
+
            {
              "id": “1”,  
+
              "id":"1",
              "links": [
+
              "links":[
 
                   {
 
                   {
                      "href": "https://API/v1.0/1234/datastores/versions/1”,  
+
                    "href":"https://API/v1.0/1234/datastores/versions/1",
                      "rel": "self"
+
                    "rel":"self"
                   },  
+
                   },
 
                   {
 
                   {
                      "href": "https://API/datastores/versions/1”,  
+
                    "href":"https://API/datastores/versions/1",
                      "rel": "bookmark"
+
                    "rel":"bookmark"
                  }
+
                  }
              ],  
+
              ],
              "name": “redis-2.6”
+
              "name":"redis-2.6"
        },
+
            },
 
             {
 
             {
              "id": “2”,  
+
              "id":"2",
              "links": [
+
              "links":[
 
                   {
 
                   {
                      "href": "https://API/v1.0/1234/datastores/versions/2”,  
+
                    "href":"https://API/v1.0/1234/datastores/versions/2",
                      "rel": "self"
+
                    "rel":"self"
                   },  
+
                   },
 
                   {
 
                   {
                      "href": "https://API/datastores/versions/2”,  
+
                    "href":"https://API/datastores/versions/2",
                      "rel": "bookmark"
+
                    "rel":"bookmark"
                  }
+
                  }
              ],  
+
              ],
              "name": “redis-2.8”
+
              "name":"redis-2.8"
        }
+
            }
    ]
+
        ]
  }
+
      }
    ]
+
  ]
 
}
 
}
 
</pre>
 
</pre>
  
 
== Comments/Questions From Community ==
 
== Comments/Questions From Community ==

Latest revision as of 22:10, 28 April 2014

Description

This blueprint will augment the existing API GET/datastores call for retrieving all datastore type and versions in a single call.

Blueprint: https://blueprints.launchpad.net/trove/+spec/list-datastore-type-and-versions

Justification/Benefits

  • Instead of making n+1 calls where n is the number of datastore types, this single API call will fetch all datastore types and version, and the manager in a single call. It will also show if the version is the default for that datastore.
  • This call can vastly improve the user experience for retrieving all the supported datastore types and versions

Impacts

Configuration

None

Database

No impact

ReST API

Augment existing API call: List All Datastore Types & Versions

Request

GET/{tenant_id}/datastores

Response

{
   "datastores":[
      {
         "default_version":"1",
         "id":"1",
         "links":[
            {
               "href":"https://API/v1.0/1234/datastores/1",
               "rel":"self"
            },
            {
               "href":"https://API/datastores/1",
               "rel":"bookmark"
            }
         ],
         "name":"mysql",
         "versions":[
            {
               "id":"1",
               "links":[
                  {
                     "href":"https://API/v1.0/1234/datastores/versions/1",
                     "rel":"self"
                  },
                  {
                     "href":"https://API/datastores/versions/1",
                     "rel":"bookmark"
                  }
               ],
               "name":"mysql-5.5"
            },
            {
               "id":"2",
               "links":[
                  {
                     "href":"https://API/v1.0/1234/datastores/versions/2",
                     "rel":"self"
                  },
                  {
                     "href":"https://API/datastores/versions/2",
                     "rel":"bookmark"
                  }
               ],
               "name":"mysql-5.6"
            }
         ]
      },
      {
         "default_version":"1",
         "id":"2",
         "links":[
            {
               "href":"https://API/v1.0/1234/datastores/2",
               "rel":"self"
            },
            {
               "href":"https://API/datastores/2",
               "rel":"bookmark"
            }
         ],
         "name":"redis",
         "versions":[
            {
               "id":"1",
               "links":[
                  {
                     "href":"https://API/v1.0/1234/datastores/versions/1",
                     "rel":"self"
                  },
                  {
                     "href":"https://API/datastores/versions/1",
                     "rel":"bookmark"
                  }
               ],
               "name":"redis-2.6"
            },
            {
               "id":"2",
               "links":[
                  {
                     "href":"https://API/v1.0/1234/datastores/versions/2",
                     "rel":"self"
                  },
                  {
                     "href":"https://API/datastores/versions/2",
                     "rel":"bookmark"
                  }
               ],
               "name":"redis-2.8"
            }
         ]
      }
   ]
}

Comments/Questions From Community