Jump to: navigation, search

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

(adding analysis and initial current design section)
 
(Current Design: add cinder examples)
Line 8: Line 8:
  
 
= Current Design =
 
= Current Design =
 +
 +
== Cinder ==
 +
 +
[http://developer.openstack.org/api-ref-blockstorage-v2.html Cinder API reference]
 +
 +
=== Examples ===
 +
 +
<pre><nowiki>GET /</nowiki></pre>
 +
 +
<pre><nowiki>
 +
{
 +
    "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"
 +
        }
 +
    ]
 +
}
 +
</nowiki></pre>
 +
 +
<pre><nowiki>GET /v2</nowiki></pre>
 +
 +
<pre><nowiki>
 +
{
 +
    "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"
 +
    }
 +
}
 +
</nowiki></pre>

Revision as of 20:54, 4 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"
    }
}