Hypermedia

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
m (1 revision: Release 97)
 
(7 intermediate revisions by one user not shown)
Line 1: Line 1:
Hypermedia is used to describe the relationships between resources. It is suggested that clients use the hypermedia to browse between resources and not build URLs with templates.
+
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 ==
 
== JSON ==
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.
  
<big>
+
<nowiki>
<source lang="javascript">
+
 
{
 
{
 
   "links":[
 
   "links":[
 
       {
 
       {
         "href":"http://{server_name}/flavors/{flavor_id}/",
+
         "href":"http://{api_server}/flavors/{flavor_id}/",
 
         "rel":"self"
 
         "rel":"self"
 
       },
 
       },
 
       {
 
       {
         "href":"http://{server_name}/flavors/{flavor_id}/",
+
         "href":"http://{api_server}/flavors/{flavor_id}/",
 
         "rel":"bookmark"
 
         "rel":"bookmark"
       },
+
       }
 
   ]
 
   ]
 
}
 
}
</source></big>
+
</nowiki>
 
+
  
 
; href
 
; href
Line 25: Line 23:
  
 
; rel
 
; rel
: Describes the relationship of this resources to the resource at the href URL.
+
: Describes the relationship of this resources to the resource at the href URL. See [http://www.iana.org/assignments/link-relations/link-relations.xml] for list of standard relationship types.
 
: '''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.
 
: '''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.
 
: '''bookmark''' - This is a permalink to the current stable API version of this resource.
  
[[Category:API]]
+
== See also ==
 
+
* [[Common Features]]
<!--  THIS CODE ENABLES DISQUS COMMENTS ON THE PAGE - DELETE TO DISABLE COMMENTING-->
+
 
+
{{#widget:DISQUS
+
|id=hostway
+
|uniqid={{PAGENAME}}
+
|url={{fullurl:{{PAGENAME}}}}
+
}}
+
  
<!--  ########################################################################### -->
+
{{disqus}}
 +
[[Category:Common Features]]
 +
[[Category:Hostway API]]

Latest revision as of 11:48, 20 August 2014

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.

{
   "links":[
      {
         "href":"http://{api_server}/flavors/{flavor_id}/",
         "rel":"self"
      },
      {
         "href":"http://{api_server}/flavors/{flavor_id}/",
         "rel":"bookmark"
      }
   ]
}

href
The absolute URL of the resource.
rel
Describes the relationship of this resources to the resource at the href URL. See [1] for list of standard relationship types.
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.

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox