Jump to: navigation, search

Difference between revisions of "API Special Interest Group/Current Design/Version Responses"

(added Glance versions response)
(Added Manila Versions API response)
Line 367: Line 367:
  
 
'''GET /v2/''' returns 404 Not Found.
 
'''GET /v2/''' returns 404 Not Found.
 +
 +
== Manila ==
 +
 +
[http://developer.openstack.org/api-ref-share-v1.html Shared File Systems service API v1 (Supported) reference]
 +
 +
[http://developer.openstack.org/api-ref-share-v2.html Shared File Systems service API v2 (Current) reference]
 +
 +
'''GET /''' provides a versions response.
 +
 +
=== Examples ===
 +
 +
<pre><nowiki>
 +
 +
  "versions":[ 
 +
      { 
 +
        "status":"SUPPORTED",
 +
        "updated":"2015-08-27T11:33:21Z",
 +
        "links":[ 
 +
            { 
 +
              "href":"http://docs.openstack.org/",
 +
              "type":"text/html",
 +
              "rel":"describedby"
 +
            },
 +
            { 
 +
              "href":"http://192.168.10.11:8786/v1/",
 +
              "rel":"self"
 +
            }
 +
        ],
 +
        "min_version":"",
 +
        "version":"",
 +
        "media-types":[ 
 +
            { 
 +
              "base":"application/json",
 +
              "type":"application/vnd.openstack.share+json;version=1"
 +
            }
 +
        ],
 +
        "id":"v1.0"
 +
      },
 +
      { 
 +
        "status":"CURRENT",
 +
        "updated":"2015-08-27T11:33:21Z",
 +
        "links":[ 
 +
            { 
 +
              "href":"http://docs.openstack.org/",
 +
              "type":"text/html",
 +
              "rel":"describedby"
 +
            },
 +
            { 
 +
              "href":"http://192.168.10.11:8786/v2/",
 +
              "rel":"self"
 +
            }
 +
        ],
 +
        "min_version":"2.0",
 +
        "version":"2.8",
 +
        "media-types":[ 
 +
            { 
 +
              "base":"application/json",
 +
              "type":"application/vnd.openstack.share+json;version=1"
 +
            }
 +
        ],
 +
        "id":"v2.0"
 +
      }
 +
  ]
 +
}
 +
</nowiki></pre>
 +
 +
'''GET /v1''' returns 302 Not Found.
 +
 +
'''GET /v2''' returns 302 Not Found.

Revision as of 16:39, 17 December 2015

Analysis

What responses are being returned for version requests?

This analysis is specifically asking for versions reported by an API server through a GET request at "/", "/version", "/v1", or similar.

The Version Discovery page on the OpenStack wiki is being used as a reference point in this analysis.

Current Design

Cinder

Cinder API reference

Examples

GET /
{
    "versions": [
        {
            "id": "v1.0",
            "links": [
                {
                    "href": "http://23.253.211.234:8776/v1/",
                    "rel": "self"
                }
            ],
            "status": "DEPRECATED",
            "updated": "2014-06-28T12:20:21Z"
        },
        {
            "id": "v2.0",
            "links": [
                {
                    "href": "http://23.253.211.234:8776/v2/",
                    "rel": "self"
                }
            ],
            "status": "CURRENT",
            "updated": "2012-11-21T11:33:21Z"
        }
    ]
}
GET /v2
{
    "version": {
        "id": "v2.0",
        "links": [
            {
                "href": "http://23.253.211.234:8776/v2/v2.0",
                "rel": "self"
            }
        ],
        "media-types": [
            {
                "base": "application/xml",
                "type": "application/vnd.openstack.volume+xml;version=1"
            },
            {
                "base": "application/json",
                "type": "application/vnd.openstack.volume+json;version=1"
            }
        ],
        "status": "CURRENT"
    }
}

Keystone

Keystone v2 API reference

Keystone v3 API reference

Examples

GET /
{
    "versions": {
        "values": [
            {
                "id": "v3.4", 
                "links": [
                    {
                        "href": "http://10.0.1.107:5000/v3/", 
                        "rel": "self"
                    }
                ], 
                "media-types": [
                    {
                        "base": "application/json", 
                        "type": "application/vnd.openstack.identity-v3+json"
                    }
                ], 
                "status": "stable", 
                "updated": "2015-03-30T00:00:00Z"
            }, 
            {
                "id": "v2.0", 
                "links": [
                    {
                        "href": "http://10.0.1.107:5000/v2.0/", 
                        "rel": "self"
                    }, 
                    {
                        "href": "http://docs.openstack.org/", 
                        "rel": "describedby", 
                        "type": "text/html"
                    }
                ], 
                "media-types": [
                    {
                        "base": "application/json", 
                        "type": "application/vnd.openstack.identity-v2.0+json"
                    }
                ], 
                "status": "stable", 
                "updated": "2014-04-17T00:00:00Z"
            }
        ]
    }
}
GET /v2.0/
{
    "version": {
        "id": "v2.0", 
        "links": [
            {
                "href": "http://10.0.1.107:5000/v2.0/", 
                "rel": "self"
            }, 
            {
                "href": "http://docs.openstack.org/", 
                "rel": "describedby", 
                "type": "text/html"
            }
        ], 
        "media-types": [
            {
                "base": "application/json", 
                "type": "application/vnd.openstack.identity-v2.0+json"
            }
        ], 
        "status": "stable", 
        "updated": "2014-04-17T00:00:00Z"
    }
}
GET /v3/
{
    "version": {
        "id": "v3.4", 
        "links": [
            {
                "href": "http://10.0.1.107:5000/v3/", 
                "rel": "self"
            }
        ], 
        "media-types": [
            {
                "base": "application/json", 
                "type": "application/vnd.openstack.identity-v3+json"
            }
        ], 
        "status": "stable", 
        "updated": "2015-03-30T00:00:00Z"
    }
}

Nova

Nova API reference

Examples

GET /
{
    "versions": [
        {
            "id": "v2.0",
            "links": [
                {
                    "href": "http://10.0.1.107:8774/v2/",
                    "rel": "self"
                }
            ],
            "status": "SUPPORTED",
            "version": "",
            "min_version": "",
            "updated": "2011-01-21T11:33:21Z"
        },
        {
            "id": "v2.1",
            "links": [
                {
                    "href": "http://10.0.1.107:8774/v2.1/",
                    "rel": "self"
                }
            ],
            "status": "CURRENT",
            "version": "2.12",
            "min_version": "2.1",
            "updated": "2013-07-23T11:33:21Z"
        }
    ]
}
GET /v2/
{
    "version": {
        "id": "v2.0", 
        "links": [
            {
                "href": "http://10.0.1.107:8774/v2/", 
                "rel": "self"
            }, 
            {
                "href": "http://docs.openstack.org/", 
                "rel": "describedby", 
                "type": "text/html"
            }
        ], 
        "media-types": [
            {
                "base": "application/json", 
                "type": "application/vnd.openstack.compute+json;version=2"
            }
        ], 
        "min_version": "", 
        "status": "SUPPORTED", 
        "updated": "2011-01-21T11:33:21Z", 
        "version": ""
    }
}
GET /v2.1/
{
    "version": {
        "id": "v2.1", 
        "links": [
            {
                "href": "http://10.0.1.107:8774/v2.1/", 
                "rel": "self"
            }, 
            {
                "href": "http://docs.openstack.org/", 
                "rel": "describedby", 
                "type": "text/html"
            }
        ], 
        "media-types": [
            {
                "base": "application/json", 
                "type": "application/vnd.openstack.compute+json;version=2.1"
            }
        ], 
        "min_version": "2.1", 
        "status": "CURRENT", 
        "updated": "2013-07-23T11:33:21Z", 
        "version": "2.12"
    }
}

Glance

Image service API v1 reference

Image service API v2 reference

Only GET / and GET /versions are documented as providing a versions response.

Examples

Same response for GET / and GET /versions

{
    "versions": [
        {
            "id": "v2.3",
            "links": [
                {
                    "href": "http://brianr-dev10:9292/v2/",
                    "rel": "self"
                }
            ],
            "status": "CURRENT"
        },
        {
            "id": "v2.2",
            "links": [
                {
                    "href": "http://brianr-dev10:9292/v2/",
                    "rel": "self"
                }
            ],
            "status": "SUPPORTED"
        },
        {
            "id": "v2.1",
            "links": [
                {
                    "href": "http://brianr-dev10:9292/v2/",
                    "rel": "self"
                }
            ],
            "status": "SUPPORTED"
        },
        {
            "id": "v2.0",
            "links": [
                {
                    "href": "http://brianr-dev10:9292/v2/",
                    "rel": "self"
                }
            ],
            "status": "SUPPORTED"
        },
        {
            "id": "v1.1",
            "links": [
                {
                    "href": "http://brianr-dev10:9292/v1/",
                    "rel": "self"
                }
            ],
            "status": "SUPPORTED"
        },
        {
            "id": "v1.0",
            "links": [
                {
                    "href": "http://brianr-dev10:9292/v1/",
                    "rel": "self"
                }
            ],
            "status": "SUPPORTED"
        }
    ]
}

GET /v2 returns 302 Found.

GET /v2/ returns 404 Not Found.

Manila

Shared File Systems service API v1 (Supported) reference

Shared File Systems service API v2 (Current) reference

GET / provides a versions response.

Examples

{  
   "versions":[  
      {  
         "status":"SUPPORTED",
         "updated":"2015-08-27T11:33:21Z",
         "links":[  
            {  
               "href":"http://docs.openstack.org/",
               "type":"text/html",
               "rel":"describedby"
            },
            {  
               "href":"http://192.168.10.11:8786/v1/",
               "rel":"self"
            }
         ],
         "min_version":"",
         "version":"",
         "media-types":[  
            {  
               "base":"application/json",
               "type":"application/vnd.openstack.share+json;version=1"
            }
         ],
         "id":"v1.0"
      },
      {  
         "status":"CURRENT",
         "updated":"2015-08-27T11:33:21Z",
         "links":[  
            {  
               "href":"http://docs.openstack.org/",
               "type":"text/html",
               "rel":"describedby"
            },
            {  
               "href":"http://192.168.10.11:8786/v2/",
               "rel":"self"
            }
         ],
         "min_version":"2.0",
         "version":"2.8",
         "media-types":[  
            {  
               "base":"application/json",
               "type":"application/vnd.openstack.share+json;version=1"
            }
         ],
         "id":"v2.0"
      }
   ]
}

GET /v1 returns 302 Not Found.

GET /v2 returns 302 Not Found.