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
1
vote
0 answers

WebApi.HAL Collection Representation Issues

I created Web API project for a maze game service. It uses WebApi.Hal for returning hal+jsonand hal+xml media types. It works for the most part – except for the following issues. Though page is 2 in the request, it returns all the cells for all…
LCJ
  • 22,196
  • 67
  • 260
  • 418
1
vote
1 answer

Hypermedia links in Swagger UI using Springfox

I'm building a RESTful API, using spring-hateoas library to implement hypermedia. The response of my endpoints is application/hal+json (My DTO extends ResourceSupport). I'm using Swagger to document the endpoints, and using Springfox to autogenerate…
Manuel S.
  • 411
  • 8
  • 21
1
vote
1 answer

Hypermedia Api - Presenting picklist data

I am creating a hypermedia api that conforms to the HAL spec When a user submits a payment they need to specify what type of card they are using (Visa, Master Card etc) So for a particular field that is submitted there is a specific list of values…
ChrisCa
  • 10,876
  • 22
  • 81
  • 118
1
vote
1 answer

Nested embedded in HAL using Spring HATEOAS

I am looking for examples how nested _embedded in HAL can be programmed using Spring HATEOAS API. What are the best practices ? Here an example of what I want to achieve: { "_links": { "self": { "href": "/invoices" } }, …
fellahst
  • 641
  • 1
  • 7
  • 16
1
vote
0 answers

How to expose JSON Hyper-Schema from SDR repositories?

I'm working in a small SDR POC project in which we decided to use the JSON-Schema because it is more meaningful for our purposes since we are trying to develop a client that understand hypermedia and create part of our view dynamically, but I'm in…
1
vote
1 answer

How does JSONAPI translate type/id into navigable URLs?

In the JSONAPI specification, under Resource Objects it gives this example of a resource: { "type": "articles", "id": "1", "attributes": { "title": "Rails is Omakase" }, "relationships": { "author": { "links": { …
Dylan Beattie
  • 53,688
  • 35
  • 128
  • 197
1
vote
1 answer

What is a reasonable way to provide URI resource as a suggestion in specific HTTP error responses of an existing Web API

I'm aware of some of the popular Hypermedia formats such as HAL, UBER, and Collection+JSON and I do see the value in these however if I'm looking to simply add a suggested URI in the case of an error response for an existing HTTP based API what…
jpierson
  • 16,435
  • 14
  • 105
  • 149
1
vote
1 answer

HAL+JSON representation for links with the same rel

The HAL specification says: Note: If you're unsure whether the link should be singular, assume it will be multiple. If you pick singular and find you need to change it, you will need to create a new link relation or face breaking existing …
Vivin Paliath
  • 94,126
  • 40
  • 223
  • 295
1
vote
1 answer

Get route by name

I'm working on an asp.net web api with hypermedia. Now I'm making a link creator that creates a link to a resource exposed by a controller. It should support attribute routes, which I've solved with reflection, but also mapped routes specified in…
Jørgen
  • 8,820
  • 9
  • 47
  • 67
1
vote
1 answer

REST: forms, links and hypermedia format

I am currently learning REST practices with the help of the excellent book of Richardson "RESTful Web Services". I would like to design a REST API that follows the maturity model of Richardson, especially the level 3 called HATEOAS which seems to be…
Poke
  • 115
  • 8
1
vote
1 answer

Is there a media type for time series charts?

I was looking for a already defined Media Type on the IANA to represent time series charts but I didn't find one. Does anyone know of a media type, and if not, do you just use generic collection media types like Collection+JSON or even HAL?
bitoiu
  • 6,893
  • 5
  • 38
  • 60
1
vote
1 answer

REST - share URI templates in Hypermedia with large data sets?

I'm building a REST application that intends to be fully hypermedia drive. Consumers of the service will hit an entry point and from then on will follow links. However, I've got a massive list of child resources for a parent - e.g. orders/1 orders/2…
user2668128
  • 39,482
  • 8
  • 27
  • 34
1
vote
1 answer

Implementing Hypermedia using flask-restless

I already have a REST API implemented using flask and the flask-restless extension. To make navigation easier, I wanted to implement Hypermedia-style links. I can write a postprocessor to insert the links manually but it feels hacky. Is there a…
Shantanu Tushar
  • 103
  • 1
  • 7
1
vote
2 answers

REST Hypermedia: Should the actions be filtered based on the user's permissions?

According to Roy Fielding's Hypermedia As The Engine of Application State (HATEOAS), each resource should be accompagnied with a list of actions (or links) that can be done on that resource. If the actions are included in the entity (as apposed to…
David
  • 1,842
  • 2
  • 21
  • 31
1
vote
1 answer

Nested Collection+JSON Hypermedia Type Example

The examples for Collection+JSON do not show examples of nested collections. Can anyone point to an example of Collection+JSON using nested collections or describe an experience where they had success. For example, would this work for a top level…
Michael Allan Jackson
  • 4,217
  • 3
  • 35
  • 45