Hypermedia Compliant API

Hypermedia allows to build services that decouple client and server . The representations returned for REST resources contain not only data, but links to related resources. The APIs in the design are hypermedia-driven and provides representation of resource(s) to navigate the API dynamically by including hypermedia links in the responses.

A Link Description Object (LDO) describes a single link relation in the links array.

Note: The links array needs to be declared within the properties keyword of an object. All possible links that an API returns as part of the response MUST be declared in the response schema using a URI template.

href:

A value for the href property will be provided. The value of the href property determine the target URI of the related resource.

rel:

  • rel stands for relation as defined in Link Relation Type.
  • The value of the rel property indicates the name of the relation to the target resource.

Link Relation Type (rel)

Description

self

Conveys an identifier for the link's context. Usually a link pointing to the resource itself.

collection

Refers to a collections resource.

method:

The method property identifies the HTTP verb that MUST be used to make a request to the target of the link. The method property assumes a default value of GET if it is omitted.