Questions tagged [hateoas]

HATEOAS is an acronym for Hypermedia As The Engine of Application State. Its usage makes your RESTful APIs self discoverable and makes them Level 3 RMM compliant.

HATEOAS, short for Hypermedia as the Engine of Application State, is a principle which states that a client interacts with a network application entirely through hypermedia provided dynamically by application servers. A HATEOAS client needs no prior knowledge about how to interact with any particular application or server beyond a generic understanding of hypermedia and media types.

Links:

661 questions
207
votes
4 answers

REST API - DTOs or not?

I am currently creating a REST-API for a project and have been reading article upon article about best practices. Many seem to be against DTOs and simply just expose the domain model, while others seem to think DTOs (or User Models or whatever you…
benbjo
  • 2,382
  • 3
  • 18
  • 21
145
votes
5 answers

How useful/important is REST HATEOAS (maturity level 3)?

I'm getting involved in a project where some senior team members believe that a REST API has to be HATEOAS compliant and implement all Richardson's maturity levels (http://martinfowler.com/articles/richardsonMaturityModel.html)! AFAIK most REST…
mhdwrk
  • 1,745
  • 2
  • 13
  • 19
141
votes
5 answers

Actual examples for HATEOAS (REST-architecture)

as everyone may have noticed, there are lot of fake/rudimentary REST-APIs in the wild (which implement a HTTP-API and call it REST without following the hypertext-as-the-engine-of-application-state requirement, which led to the famous rant of Roy T.…
pmf
  • 7,619
  • 4
  • 47
  • 77
105
votes
9 answers

Is That REST API Really RPC? Roy Fielding Seems to Think So

A large amount of what I thought I knew about REST is apparently wrong - and I'm not alone. This question has a long lead-in, but it seems to be necessary because the information is a bit scattered. The actual question comes at the end if you're…
Rich Apodaca
  • 28,316
  • 16
  • 103
  • 129
93
votes
10 answers

HATEOAS: absolute or relative URLs?

In designing a RESTful Web Service using HATEOAS, what are the pros and cons of showing a link as a complete URL ("http://server:port/application/customers/1234") vs. just the path ("/application/customers/1234")?
Mark Lutton
  • 6,959
  • 7
  • 41
  • 57
92
votes
1 answer

Relationship and difference between HAL and HATEOAS

HATEOAS (Hypermedia as the Engine of Application State) and HAL (Hypertext Application Language) seem to be related but are not exactly the same. What is the relationship and difference between HATEOAS and HAL?
Lee Chee Kiam
  • 11,450
  • 10
  • 65
  • 87
80
votes
6 answers

RESTful API runtime discoverability / HATEOAS client design

For a SaaS startup I'm involved in, I am building both a RESTful web API and a couple of client apps on different platforms that consume it. I think I've got the API figured out, but now I'm turning to the clients. As I've been reading about REST,…
curtisdf
  • 4,130
  • 4
  • 33
  • 42
56
votes
5 answers

HATEOAS: concise description

I am trying to get a clear and concise understanding of HATEOAS, and I am by no means an expert WRT REST. (I think I get it though, thanks to this http://www.looah.com/source/view/2284 ). Can anyone suggest an equally enlighenting blog/article WRT…
Myles McDonnell
  • 12,943
  • 17
  • 66
  • 116
50
votes
3 answers

Link Relations in JSON Representations

I'm designing a RESTful API based on JSON representations. In order to comply with HATEOAS, I use links between resources extensively. Therefore, I followed this suggestion for serializing links in way very similar to ATOM links. Now I have…
b_erb
  • 20,932
  • 8
  • 55
  • 64
50
votes
6 answers

Does anyone know of an example of a RESTful client that follows the HATEOAS principle?

So by now I'm getting the point that we should all be implementing our RESTful services providing representations that enable clients to follow the HATEOAS principle. And whilst it all makes good sense in theory, I have been scouring the web to…
jkp
  • 78,960
  • 28
  • 103
  • 104
49
votes
1 answer

How to create a good hypermedia format using JMSSerializerBundle?

Lets say I want to create an XML-response that will looks something like the following: 1234 Red Stapler
PatrikAkerstrand
  • 45,315
  • 11
  • 79
  • 94
47
votes
2 answers

what is hypermedia , hypermedia controls, hypermedia formats

I'm currently reading "Rest in practice" book . I'm unable to understand the following terminology Hypermedia , hypermedia format, hypermedia controls, Domain application protocol. The author was suggesting need for domain specific hypermedia…
vishnu
  • 511
  • 1
  • 7
  • 10
46
votes
3 answers

Spring HATEOAS versus Spring Data Rest

Question is, what's the difference between Spring HATEOAS versus Spring Data Rest ? I feel both can do the same, and Spring Data Rest (as part of Spring Data) seems a bit more…
HighTML
  • 613
  • 1
  • 6
  • 12
44
votes
1 answer

Meaning and usage of "_embedded" in HATEOAS

I'm using Spring Data REST, which supports HATEOAS. I'm new to this paradigm. In GET responses from my RESTful web service I often receive results inside a node named _embedded. I'm wondering: what is _embedded node for? Is it part of REST…
bluish
  • 26,356
  • 27
  • 122
  • 180
38
votes
4 answers

How should HATEOAS-style links be implemented for RESTful JSON collections?

To keep things simple and to avoid nameing collisions, I've been bundling links in my record resources like this... { id: 211, first_name: 'John', last_name: 'Lock', _links: [ { rel: 'self', href:…
thomas-peter
  • 7,738
  • 6
  • 43
  • 58
1
2 3
44 45