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

What should be the href of a collection response if I am getting one single item of that collection?

Im getting a specific web resource via a http request using GET method. I've implemented the server to respond using the hypermedia type collection+json so every response is a collection of items according to the specification…
juanpavergara
  • 1,511
  • 1
  • 11
  • 22
1
vote
1 answer

Backbone collections, REST, and Bare Arrays

In Backbone, it seems to be encouraged that collection resources return bare arrays. This seems to be driven by the Rails model of doing things, which isn't a good reason at all to do something. I have a few problems with this: Often, a…
Jon Wingfield
  • 1,875
  • 2
  • 11
  • 8
0
votes
1 answer

SpringBoot Hypermedia without HATEOAS

My client don’t want to use HATEOAS library for some reason. Or there any other maven dependency alternative to HATEOAS? I searched a lot but didn’t find any. Can someone help me with this please?
Vasu Youth
  • 323
  • 3
  • 13
0
votes
1 answer

HATEOS with HAL and links to embedded ressources

I think the answer to this question is great because it explains a lot about HAL: How to handle nested resources with JSON HAL? However it does not fully answer the question (at least for me). Assuming we have a /employees resource that returns a…
Oliver
  • 1
  • 3
0
votes
0 answers

URL Format for a PATCH that links two objects

I'm not sure what the most RESTful + HATEOS way is to achieve my goal. I want to use a PATCH operation to update the fields of two objects, creating a relationship between them, I'm not convinced that the current way I'm doing it is the most RESTful…
Alex
  • 177
  • 12
0
votes
2 answers

Hypermedia API - Is direct requests an anti pattern?

I'm designing an API using Hypermedia concepts. I saw that is a good practice have a root route that returns the others API links to navigate. Ex.: I made a request to http://myapi.com and it returns { links: [ { 'rel': 'profile', href:…
Bruno Quaresma
  • 9,457
  • 7
  • 32
  • 50
0
votes
1 answer

Should a RESTful API avoid requiring the client to know the resource hierarchy?

Our API's entry point has a rel named "x:reports" (where x is a prefix defined in the HAL representation, by way of a curie - but that's not important right now). There are several types of reports. Following "x:report" provides a set of these…
biscuit314
  • 2,384
  • 2
  • 21
  • 29
0
votes
1 answer

Is it possible to do Hypermedia Driven RESTFul service in a microservices world?

Lets say that we are creating a Ticket processing system. Say there are two distinct bounded contexts within this domain. Cancelling a Ticket Changing a Ticket From what I understand, those two can be two different microservices, without having to…
0
votes
1 answer

Conditional links with active_model_serializers

I'm trying to create a hypermedia api in rails. I'd like to serialize my payloads with active_model_serializers using the json_api adapter. But it doesn't seem trivial to serialize links conditionaly. It's kind of a blog application where users can…
sammygadd
  • 299
  • 2
  • 6
0
votes
1 answer

How to get associated name of linked resources in HAL

I am creating an API for project tasks. It has a TasksController as listed below. I am generating hypermedia using WebApi.Hal and the service supports hal+json and hal+xml media types also. Following is the response I currently have for the GET…
LCJ
  • 22,196
  • 67
  • 260
  • 418
0
votes
0 answers

Identify the starting point resource for REST service

I am creating a ASP.Net Web API service for a maze game. Users should get all cells details in the maze to visualize the maze in 2D plane. I am achieving this using the get method public List Get() User should get details of a cell by giving…
LCJ
  • 22,196
  • 67
  • 260
  • 418
0
votes
1 answer

REST and HATEOAS: Links in attributes

I am currently working on an API that tries to do a little bit of HATEOAS by including links to related resources in API responses. In some places, I have (ab?)used the links for things like article images. So, for example a article resource might…
Franz
  • 11,353
  • 8
  • 48
  • 70
0
votes
1 answer

Links are empty in generated media type using WebApi.Hal

I am using WebApi.Hal to generate application/hal+json media type response from my ASP.Net Web API project. This is installed to the project using following nugget package manager command as outlined in WebApi.Hal 2.6.0 Install-Package…
LCJ
  • 22,196
  • 67
  • 260
  • 418
0
votes
1 answer

Is this API structure HATEOAS compatible?

I'm wondering if the following structure of API links is HATEOAS compatible? Especially I'm not sure of /create endpoint. Should it be at the entry level because user can create a group from there or is it fine to put it in /groups? What are your…
Paweł O.
  • 57
  • 8
0
votes
1 answer

Which tools utilize for my SOA Project?

I've to develop an Image Server that should provide REST API supporting Hypermedia. (With basic functionalities like login, register, upload and download images) I think to use Glassfish as a server to develop my project and Java as the programming…
Timmy
  • 693
  • 2
  • 8
  • 26