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
2
votes
0 answers

Have Ember.ArrayController render an array of promises

Ember controllers are promise-aware, in that the model can be a promise. For an ArrayController you could have a promise to an array, but what if you have an array containing promises? See this JSFiddle for an example http://jsfiddle.net/7QSZ6/ Why…
Arne Brasseur
  • 1,468
  • 13
  • 18
2
votes
1 answer

ServiceStack HyperMedia

Is there a preferred method/example to implement hypermedia links with service stack. Should I just try to follow the concepts laid out in this article or is there a better way? Thanks in advance Darren
Darren Bell
  • 75
  • 1
  • 5
2
votes
1 answer

REST/HATEOAS: Is templating the restul links an acceptable approach

I'm investigating the whole Layer3/HATEOS/RESTful/HAL thing for an API we're looking to develop. We would be exposing lists of data could be bloated by all these links. Wouldn't it be an idea to template the links, what would this be called? I can't…
Dog Ears
  • 9,637
  • 5
  • 37
  • 54
2
votes
1 answer

Resolving an API's own hypermedia links

Let's say we have a RESTful API method: POST /people { "name" : "John", "_links" : { "address" : { "href" : "/addresses/2" } } } You can see that address has a link to another resource. To resolve the…
eoinoc
  • 3,155
  • 3
  • 24
  • 39
2
votes
2 answers

Custom Media Types Used In Request's Body Content Type When Designing A REST Service?

When creating your own custom media type format (say application/vnd.myapp+xml), should the client when sending body content, do so in the custom media type? For example you PUT a representation of an order to a uri. Should the content be…
pbo
  • 537
  • 4
  • 13
1
vote
1 answer

Why does HATEOAS not specify a schema for the request body

A question for this already exists, but is more tech focused and doesnt have answers: Representing a request body on HATEOAS link I like HATEOAS. I love using it in my frontend to check if I can perform some actions by checking if a link exists…
S. ten Brinke
  • 2,557
  • 4
  • 25
  • 50
1
vote
1 answer

How to reference a resource in a update-request of a hypermedia api?

I did some research about how REST APIs work and how to link resources via hypermedia. Most of the examples about linking resources is related to the response of the server. But I wonder how to reference to other resources when a certain resource…
Franz Deschler
  • 2,456
  • 5
  • 25
  • 39
1
vote
2 answers

REST - Should an API client "advance" to the "next" resource like a browser?

In my years specifying and designing REST APIs, I'm increasingly finding that its very similar to designing a website where the user's journey and the actions and links are story-boarded and critical to the UX. With my API designs currently, I…
Luke Puplett
  • 42,091
  • 47
  • 181
  • 266
1
vote
3 answers

HAL - is it a violation to the HAL format/standard if links are in the main body?

According to the HAL standard (see here and here) the links to other resources should be placed in a specific embedded section. So for instance this is not valid HAL, is my understanding correct? { "movies": [ { "id": "123", …
Gabe
  • 5,997
  • 5
  • 46
  • 92
1
vote
1 answer

RESTful service response should be splited into pieces

I want to get first 20 records, I have response time as 200 After some time (By calling the same service) I want another 20 records. By each hit I want to get 20 records. How can I implement this? I am using Spring ,hibernate and angular as…
Siva Pasupathi
  • 494
  • 1
  • 3
  • 15
1
vote
2 answers

JAXRS-2.0 Filter: How does one add links to ContainerResponse

I'm implementing a ContainerResponseFilter that would add hypermedia links to the response. The method signature in the ContainerResponseFilter is: public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)…
Jonathan S. Fisher
  • 8,189
  • 6
  • 46
  • 84
1
vote
1 answer

Does HATEOAS increase the number of calls to server?

I have never used HATEOAS with RESTAPI's and what I understand is with HATEOAS, one doesn't need to store URI's and server send's the URI's in the response which can be used to fetch other resources or related resources. But with HATEOAS, aren't we…
Divyesh Kalbhor
  • 385
  • 3
  • 19
1
vote
2 answers

Proper approach to create hypermedia in c# webapi

I'm doing some research on how to implement hypermedia for a particular resource, but can't find a real implementation example, just abstractions... You know, in various articles, the guy create a method like: public List CreateLinks(int…
ramires.cabral
  • 910
  • 4
  • 13
  • 28
1
vote
1 answer

HATEOAS and links/actions

I'm trying to wrap my head around how to (and if to) implement HATEOAS in my api. I like one of the concept of feeding the client only actions that are appropriate in the current situation. However I'm not sure if I'm implementing this idea…
adnan
  • 1,385
  • 2
  • 17
  • 31
1
vote
2 answers

Runtime discovery of HATEOAS hypermedia?

I understand HATEOAS represents the applications state by sending all actions that can be performed at that point in time within the application as it's response (HAL, JSON-LD, etc). For example, viewing an account resource of a bank may allow you…
Jacob Clark
  • 3,317
  • 5
  • 32
  • 61