Questions tagged [hypermedia]

Hypermedia is a technique for working with and on data between a client and a server. It is used in both machine-to-machine and machine-to-human scenarios. It's main feature is the mixing of data and controls in a single message with no out-of-bounds data. The most known hypermedia is HTML but there exist many other hypermedia formats.

The concept of "mixing data and controls" is hypermedia's main distinguishing feature.

This means that both the data the user requested is being send, but also a description on the available operations and how to do further interactions with a server. The data could be a description of a person, an article or an invoice and the controls could be a description on how to change the address of the person, how to publish the article and how to send a credit note for the invoice.

HTML does this through forms and links. Links may be represented with for example link, a or img tags.

See also

Other Hypermedia Formats

120 questions
8
votes
1 answer

How to handle nested resources with JSON HAL?

Imagine a REST endpoint (/employees) serving pages of employees in JSON HAL format. An employee lives in a country, which resides in a continent. For both countries and continents there are also separate endpoints. The returned pages contain the…
Marcel Overdijk
  • 11,041
  • 17
  • 71
  • 110
8
votes
1 answer

Simple template library with binding capability for Java

I want to generate valid JSON with the help of a template engine. In particular, I want the engine to replace the placeholders in the template with the properties of a model class. The engine should allow the use converters for complex classes like…
Thomas Eizinger
  • 1,404
  • 14
  • 25
8
votes
3 answers

HATEOAS REST API and Domain Driven Design, where to put the workflow logic?

This is intended as a follow up question to RESTful API: Where should I code my workflow? A brief summary of the question (adapted to fit my question a bit better) would be something like this: Each domain object contains business logic associated…
Johan
  • 37,479
  • 32
  • 149
  • 237
8
votes
2 answers

Hypermedia-friendly REST pattern for creating and updating a resource

I am trying to design a RESTful service that makes a good use of the Hypermedia. Preferably, the user agent should only know the root URI in order to be able to explore all the functionality of the service - that is, I would like it to be in the 3rd…
turdus-merula
  • 8,546
  • 8
  • 38
  • 50
7
votes
1 answer

Java Jersey Declarative Hyperlinking @Ref Annotation Use

I have been trying to expand upon the example provided in Chapter 6 (Declarative Hyperlinking) of the Jersey 1.12 documentation but appear to have hit a wall with regard to the use of the @Ref annotation. My code is as…
7
votes
1 answer

Truly RESTful service live example

Is there any real-life web service which is really 100% RESTful in terms of Fielding's thesis (Content negotiation, Hypermedia etc). I want to get a better grasp of REST and need something I could use from an automated client like Restfulie.…
bereal
  • 32,519
  • 6
  • 58
  • 104
7
votes
1 answer

How to represent a read-only property in a REST Api

if you have a REST API that is hypermedia-driven (HATEOAS) you can easily change a client's behavior by including or omitting links in the response (_links). That enables a client to completely forget about testing permissions for the operations…
marco.eig
  • 4,209
  • 2
  • 18
  • 26
7
votes
0 answers

Sails.JS and Hypermedia HATEOAS Examples?

Does anyone have any good examples implementing an HTML5 Hypermedia (HATEOAS) API using SailsJS, or if that would even be a good idea? And if not, why not?
7
votes
2 answers

AngularJS $resource and hypermedia

I have an AngularJS $resource defined like this: var Menus = $resource('http://cafe.com/api/menus'); and a RESTful API. So when I do a GET on Menus I get this back: