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

Having a Ref to a previous state in Hypermedia capable API

In a Hypermedia capable REST API, consider a non browser client needs to access a resource Model-A. Typically we would have an entry point and then a ref to get models and then another ref to access the particular model. But what if after checking…
psaw.mora
  • 868
  • 1
  • 7
  • 18
0
votes
1 answer

What is better between one link versus an array of links?

Option 1: Return as many links as there are resources. { "teamName": "Steelers" "links": { "players": [ { "href": "http://api.com/players/1" }, { "href": "http://api.com/players/2" }, …
user3408654
  • 301
  • 1
  • 13
0
votes
1 answer

Is it a bad practice using email address in GET requests in Hypermedia API

I'm currently in the design process of an hypermedia REST API. I want to know if there is any recommendation about passing email addresses as URL parameter in GET requests. thanks in advance
Jawen
  • 1,416
  • 1
  • 14
  • 26
0
votes
1 answer

Some questions about Hydra's terms

I'm working on a Hydra documentation generator for Golang. I've been using the demo as an example and I was wondering about the ambiguity in some hydra terms. What's the difference between hydra:title and rdfs:label? label is used in vocab:User,…
avinashbot
  • 1,177
  • 1
  • 11
  • 25
0
votes
1 answer

How to form Hypermedia for Groups and Lists

I am designing a REST API and in this particular use case, trying to figure out the best way and what this hypermedia should look like. The scenario is that the caller calls /persons?fields=lastName;filter=beginsWith=b because he wants back a list…
PositiveGuy
  • 17,621
  • 26
  • 79
  • 138
0
votes
1 answer

What is the best way to coordinate the interaction of two restful services using a third one?

I have 3 restful services (ServiceA, ServiceB and ServiceC) that handle 2 resources (ResourceA and ResourceB). The media type of the resources is application/hal+json. ServiceA generates ResourceA; ServiceB consumes ResourceA and produces…
0
votes
2 answers

Understanding the abstract jargons in REST

Not sure whether it is here to ask these basic questions about REST... The more I try to understand REST and want to implement it, the more I get confused. I think probably because of those abstract words I see when people come to teach you what a…
Run
  • 54,938
  • 169
  • 450
  • 748
0
votes
1 answer

is there a way annotate a Java class model to Produce JSON+Hypermedia links?

There are tons of examples on how to include Hypermedia links using JAXB and HATEOAS, but I cannot find any for Hypermedia + JSON. I like JAXB because just using annotations you can map the XML to the Object. Include HATEOAS and this is almost what…
Jose Leon
  • 1,615
  • 3
  • 22
  • 30
0
votes
0 answers

Many to Many Relation (Set)

What is the best way to design a many to many relation with hateoas? I have a bidirectional relation between two classes, defined with a Set. My problems are the POST / PUT methods for binding one resource to the other. (Making a…
wot-stefan
  • 91
  • 7
0
votes
1 answer

Using absolute references in REST Api based on Node.js, Express and MongoDb

I am creating a REST api using Node.js, Express.js and MongoDb. So far so good. It is fairly easy to get things going, and I have a site up and running. But as always, it is when you get to the small details it gets hard. I am fairly new to this…
Jay Pete
  • 4,123
  • 4
  • 35
  • 51
0
votes
2 answers

REST without hypermedia?

Is REST without the use hypermedia still REST? In other words, is the hypermedia part of the uniform interface constraint of REST required for a true RESTful architecture? The way I understand it, it is not hypermedia itself that is a constraint of…
bitbonk
  • 48,890
  • 37
  • 186
  • 278
0
votes
1 answer

RESTFul way to reference resource with unique fields

One of the requirements for our REST interface is that each resource be identifiable by unique fields (aside from the primary identifier). The reason for this is that we want to be able to handle bulk importing data - in which case the client can't…
rouble
  • 16,364
  • 16
  • 107
  • 102
0
votes
1 answer

Restful Service and Generic Media Type Payload and stay HATEOAS

Forgive me as I am still new to this RESTFUL thing, I have been reading blogs etc... and they all have got different implementations/guidelines really, only real guideline is the Richardson Maturity Model that specifies what Hypermedia is. I know…
Joshscorp
  • 1,832
  • 4
  • 22
  • 42
0
votes
1 answer

RESTful API design: reasonable to accept unique identifiers rather than resource URIs?

Are there disadvantages to allowing a RESTful API to accept a representation with an implicit link to another resource? To illustrate this, take that I have two resources: GET /people/:id GET /houses/:id A person has a unique identifier in addition…
eoinoc
  • 3,155
  • 3
  • 24
  • 39
-1
votes
1 answer

Is it ok to have different links leading to the same resource?

Option 1: We always return "absolute" links (no nesting). That way we always give to the client the same link for a given resource. { "employeeName": "Joe" "links": { "company": [ { "href": "http://api.com/companies/1" } …
user3408654
  • 301
  • 1
  • 13
1 2 3 4 5 6 7
8