Jump to: navigation, search

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

(Cinder)
Line 9: Line 9:
 
[http://developer.openstack.org/api-ref-blockstorage-v2.html Cinder API reference]
 
[http://developer.openstack.org/api-ref-blockstorage-v2.html Cinder API reference]
  
Cinder appears to use the JSON Hyper-Schema<ref name="json-hyper-schema">[http://json-schema.org/latest/json-schema-hypermedia.html]</ref> for all embedded link references.
+
Cinder appears to use the JSON Hyper-Schema
 +
<ref name="json-hyper-schema">
 +
[http://json-schema.org/latest/json-schema-hypermedia.html JSON Hyper-Schema]
 +
</ref>
 +
for all embedded link references.
  
 
=== Examples ===
 
=== Examples ===
Line 80: Line 84:
 
}
 
}
 
</nowiki></pre>
 
</nowiki></pre>
 +
 +
= References =
 +
 +
<references />

Revision as of 14:32, 12 October 2015

Analysis

How are links being referenced in OpenStack APIs

Current Design

Cinder

Cinder API reference

Cinder appears to use the JSON Hyper-Schema [1] for all embedded link references.

Examples

GET /
{
    "versions": [
        {
            "status": "CURRENT",
            "updated": "2012-01-04T11:33:21Z",
            "id": "v1.0",
            "links": [
                {
                    "href": "http://23.253.228.211:8776/v1/",
                    "rel": "self"
                }
            ]
        },
        {
            "status": "CURRENT",
            "updated": "2012-11-21T11:33:21Z",
            "id": "v2.0",
            "links": [
                {
                    "href": "http://23.253.228.211:8776/v2/",
                    "rel": "self"
                }
            ]
        }
    ]
}
GET /v2/{tenant_id}/volumes
{
    "volumes": [
        {
            "id": "45baf976-c20a-4894-a7c3-c94b7376bf55",
            "links": [
                {
                    "href": "http://localhost:8776/v2/0c2eba2c5af04d3f9e9d0d410b371fde/volumes/45baf976-c20a-4894-a7c3-c94b7376bf55",
                    "rel": "self"
                },
                {
                    "href": "http://localhost:8776/0c2eba2c5af04d3f9e9d0d410b371fde/volumes/45baf976-c20a-4894-a7c3-c94b7376bf55",
                    "rel": "bookmark"
                }
            ],
            "name": "vol-004"
        },
        {
            "id": "5aa119a8-d25b-45a7-8d1b-88e127885635",
            "links": [
                {
                    "href": "http://localhost:8776/v2/0c2eba2c5af04d3f9e9d0d410b371fde/volumes/5aa119a8-d25b-45a7-8d1b-88e127885635",
                    "rel": "self"
                },
                {
                    "href": "http://localhost:8776/0c2eba2c5af04d3f9e9d0d410b371fde/volumes/5aa119a8-d25b-45a7-8d1b-88e127885635",
                    "rel": "bookmark"
                }
            ],
            "name": "vol-003"
        }
    ]
}

References

  1. JSON Hyper-Schema