Hypermedia
(Difference between revisions)
Line 4: | Line 4: | ||
In the JSON representation the hypermedia is included in the links field of the JSON object. | In the JSON representation the hypermedia is included in the links field of the JSON object. | ||
− | <pre> | + | <pre><nowiki> |
+ | <syntaxhighlight lang="c"> | ||
{ | { | ||
"links":[ | "links":[ | ||
Line 17: | Line 18: | ||
] | ] | ||
} | } | ||
− | </pre> | + | </nowiki></pre> |
; href | ; href |
Revision as of 15:09, 1 February 2012
Hypermedia is used to describe the relationships between resources. It is suggested that clients use the hypermedia to browse between resource and not build URLs with templates.
JSON
In the JSON representation the hypermedia is included in the links field of the JSON object.
<syntaxhighlight lang="c"> { "links":[ { "href":"http://127.0.0.1:6543/flavors/1/", "rel":"self" }, { "href":"http://127.0.0.1:6543/flavors/1/", "rel":"bookmark" }, ] }
- href
- The absolute URL of the resource.
- rel
- Describes the relationship of this resources to the resource at the href URL.
- self - This is a link to the full version of this resource. Most listings will give a truncated version of the resource and include a self link.
- bookmark - This is a permalink to the current stable API version of this resource.