Questions tagged [hateoas]

Hypermedia As The Engine Of Application State (HATEOAS) is a constraint of the REST application architecture.

Filter by
Sorted by
Tagged with
-3 votes
1 answer
78 views

HATEOAS API - best practice to create multiple entities in one request

I have a HATEOAS API (in ASP.NET) with an endpoint: POST /api/messages - to create a new message and it returns the location of a new message Now I have a requirement that in some cases based on ...
MarisKs's user avatar
  • 97
1 vote
3 answers
183 views

What are the benefits of HATEOAS in programs without user interaction?

Let's assume I have a batch job that needs to print orders. It will do so by getting orders from the order service and send them to the print service. It uses HATEOAS to discover the link from the ...
wertzui's user avatar
  • 119
2 votes
3 answers
412 views

How to implement HATEOAS with CQRS?

Let's say I have a CQRS system where my write model contains the business rules. My read model is simply a DTO; it is a collection of properties and "dumb". Now if you were to create a REST ...
S. ten Brinke's user avatar
-1 votes
2 answers
120 views

Best practices for API design for an E-Commerce System

I have a few basic questions on how to implement an API for a basic e-commerce system. The relevant entities are Customer, Puffle, and Review. Each Puffle can have zero or more Reviews. Each Review is ...
Richard Robinson's user avatar
0 votes
1 answer
102 views

HATEOAS and storage of resource URL

I have my system which receives data from another service and then I show the data to my users. I'd like to store an ID or a link to the data. Then UI will go for the data using the ID/link. If we ...
Stanislav Bashkyrtsev's user avatar
1 vote
2 answers
193 views

How does a RESTful client know the proper way of manipulating the state of a resource?

I've read that a key portion of a RESTful interface is that the client doesn't have to know what options are available before they hit the page/access the resource. The client starts with the initial ...
Zymus's user avatar
  • 2,453
0 votes
2 answers
64 views

Data entry (forms, validation) in RESTful Web app

I'm designing a web-app that will use a REST API. What I've never understood is what is REST's equivalent of HTML forms? HTML5 forms have a reasonably rich set of server-provided, declarative controls,...
David Kerr's user avatar
1 vote
2 answers
408 views

Eliminating duplication of validation metadata in client and server

I tried to find some insight in how to handle the duplication of client-side and server-side validation in my app. If, for example, I have an User Entity like this on my back end: type User struct { ...
Daniel Lopes's user avatar
2 votes
2 answers
316 views

How to use HATEAOS links to single entities in a frontend?

Context Let's say I have the API endpoints /api, /api/accounts and /api/accounts/{id}. As far as I understand, the idea is that a call to /api gives me a list of "base" API calls, among ...
R. Schmitz's user avatar
  • 2,608
2 votes
3 answers
307 views

Good ways to prevent client side logic duplication without HATEOAS?

I know HATEOAS can be a bit of a heated topic. Some people like it, some people don't. That is not what I want to discuss. What I want to discuss is what technology other than HATEOAS (or some form of ...
S. ten Brinke's user avatar
1 vote
1 answer
451 views

API pagination with external or centralised authorization

I am building a REST API which would power a front end as well as other 3rd party apps and hence I want it to be as "standard" as possible. Right now, I am trying to stick to HATEOAS. The ...
Sayak Mukhopadhyay's user avatar
0 votes
3 answers
566 views

Direct link with HATEOAS?

I'm considering HATEOAS for one of my application but for that, I need to be sure that it fits my needs. One of them is the ability to support direct links such as "https://www.webapp.com/user/1&...
ssougnez's user avatar
  • 135
1 vote
1 answer
480 views

SPA Routing with a RESTful API using HATEOAS

When using routing in a SPA web app (angular, react, etc), the user doesn't have to start at the entry point of the application. They can use a URL in the browser to drill down into any part of the ...
wired_in's user avatar
  • 332
0 votes
1 answer
538 views

HATEOAS with Child Resources

Suppose Person has a Car. Car is a separate resource with its own URI. For the sake of this example, assume a person can only have one car. We want to include the Person's Car in the response when ...
wired_in's user avatar
  • 332
0 votes
3 answers
551 views

RESTful API design using HATEOAS - Decision on Structure

We're designing and developing an enterprise application using Spring Boot for REST APIs and Angular 8 as the web client. It's been an year since we started. When I started, I read multiple articles ...
Shubham's user avatar
  • 57
1 vote
1 answer
855 views

How should REST resources relate to the server database schema?

I am trying to understand whether resources in a RESTFUL API should directly represent the underlying database or not. In particular, a problem that I have is that I usually use highly normalized ...
Neil's user avatar
  • 219
3 votes
4 answers
4k views

What's the ideal way to send a success message in the response of a HATEOAS Rest Api?

I am using HATEOAS architecture in my rest application and want to send internationalized success message that will be directly consumed by the client. I know we can just add a key in the response but ...
Gajender Parmar's user avatar
8 votes
4 answers
2k views

Advantages of HATEOAS based RESTful service

There is a scenario, where we have two commercial applications that are so called REST based(java) but not HATEOAS compliant. Development activity is out-sourced to vendor Development phase of ...
mohet's user avatar
  • 89
0 votes
1 answer
1k views

Retrieving JSON and image representation of a resource

I am developing a RESTful API designed primarily (but not exclusively) for consumption by a web application. For the purposes of this question, the API is a set of GET endpoints. The main endpoint is /...
Frayt's user avatar
  • 281
11 votes
2 answers
2k views

What does "HATEOAS" have to do with Application State?

HATEOAS is an acronym for "Hypermedia As The Engine Of Application State". What is the "Engine of Application State" referring to, and particularly - how is "hypermedia" the engine of it? As far as I ...
GreenAsJade's user avatar
5 votes
4 answers
626 views

How to expose field constraints using HATEOAS?

For example we have entity object: { "id": 10, "name": "First object", "status": "new", "manager_id": 200, "links": [ { "href": "self", "type" : "...
mikhail's user avatar
  • 163
4 votes
3 answers
2k views

HATEOAS APIs and front end development

We are developing a tool from scratch based on a Spring backend and VueJs frontend. I am primarily working on the backend and came to know about the HATEOAS principle of developing REST APIs and ...
Sayak Mukhopadhyay's user avatar
4 votes
3 answers
3k views

HATEOAS links with client defined parameters, how to represent?

I'm wondering how best to model in a HATEOAS based API links that allow the client to set parameters. E.g. imagine a search response that returns a list of producst and then refinements that can be ...
Sutty1000's user avatar
  • 1,389
5 votes
3 answers
3k views

Why do RESTful services that implement HATEOAS provide a self-relationship link?

I'm learning about HATEOAS and I noticed that every implementation always seems to implement a self-relationship first. For example a common response object might look like { title: "The Wonderful ...
David says Reinstate Monica's user avatar
15 votes
5 answers
3k views

Is REST and HATEOAS a good architecture for web services?

If I understand correctly, REST was formalized by Roy Fielding as a descriptive model of the architecture of the web. AFAIK Fielding didn't claim REST was any good, he was just describing the de-facto ...
JacquesB's user avatar
  • 59.6k
0 votes
1 answer
302 views

How best to programmatically navigate the Github API?

The GitHub API supports HATEOAS quite elegantly, so navigating it from a graphical REST client like Postman is intuitive and fast. They don't list all possible permutations of the endpoints when ...
Adam Naylor's user avatar
1 vote
3 answers
1k views

What is wrong with treating a client session as a resource/application state in REST architecture?

Given these example REST API / HATEOAS applications: InfoQ How to GET a Cup of Coffee example Java Spring REST API example ... where POST/PUT/PATCHING resources clearly alters the state/availability ...
Decent Dabbler's user avatar
5 votes
1 answer
694 views

Does discoverability in HATEOAS require the information must be machine readable, or can it just be human readable?

I'm trying to understand the concepts of HATEOAS (Hypermedia As The Engine Of Application State) in REST. The following have been very useful: What does HATEOAS offer for discoverability and ...
Simon Elms's user avatar
3 votes
2 answers
4k views

In REST is HATEOAS really about self-discovery or about navigation? [duplicate]

I'm trying to learn about REST and having problems with the concept of HATEOAS (Hypermedia As The Engine Of Application State). What is it for? It seems to me the majority of commenters on the web ...
Simon Elms's user avatar
2 votes
1 answer
122 views

Modeling resources with links

Context To be fully compliant with the REST principles enumerate in Fielding's dissertation, a resource must contains links that redirect to other resources that have a relation with it functionally, ...
AilurusFulgens's user avatar
2 votes
2 answers
321 views

What is the function of URLs as "key" names in markup used for a RESTful API?

I just finished reading REST in Practice as my first* introduction to REST APIs. I found the book quite enlightening, but am left with one nagging question, and Google has yet to clear it up. This ...
Flimzy's user avatar
  • 704
7 votes
3 answers
2k views

HATEOAS vs Frontend app GUI

I've just found HATEOAS. I think I kind of understand what is stands for, but something is not clear to me. There is nowhere to be found how can I create the consuming client in HTML. I can imagine ...
Zveratko's user avatar
  • 179
38 votes
3 answers
11k views

What's the point with HATEOAS on the client-side?

As I currently understand HATEOAS is basically all about sending together with each response links with information about what to do next. One simple example is easily found on the internet: a banking ...
user1620696's user avatar
  • 4,867
3 votes
1 answer
786 views

Do I need to follow hypermedia format or a schema?

I'm quite new to the field. So I need to clarify what would be the best method to follow in the following situation. I'm developing a restful API using php and use json to represent resources. While ...
Nalaka Hewapathirana's user avatar
3 votes
1 answer
313 views

Defining user operations on application/collection+json response?

I'm fairly new to Collection+JSON. I have a bunch of questions regarding Collection+JSON and user operations. Use Case Having user permissions in a Collection+JSON response would be useful in ...
Pete's user avatar
  • 1,257
0 votes
1 answer
993 views

How to communicate side effects in a RESTful API on the server to the client?

I have been thinking a lot about Hypermedia REST-APIs for the last couple of weeks. One thing I am not quite sure about is how I want to model side effects on the server side. In my current project, ...
Arne's user avatar
  • 153
1 vote
1 answer
1k views

Single page app permissions represented through RESTful APIs

I'm trying to figure out the right way to handle permissions in a single page app that talks directly to several RESTful APIs, that implement HATEOAS. As an example: "As a user of my application I ...
Lewis's user avatar
  • 483
0 votes
1 answer
420 views

Link relation values and REL attribute - edited

In REST, do we always use link relation values to convey semantics/role of a linked resource? I assume link relation value is always specified using rel attribute? Should rel attribute only be ...
bckpwrld's user avatar
  • 439
65 votes
5 answers
9k views

What does HATEOAS offer for discoverability and decoupling besides ability to change your URL structure more or less freely?

Lately I've been reading about Hypermedia as the Engine of Application State (HATEOAS), the constraint that is claimed to make a web API "truly RESTful". It boils down to basically including links ...
Botond Balázs's user avatar
10 votes
3 answers
2k views

Are there strategies for discovering REST services using HATEOAS?

When building a REST service with the HATEOAS constraint, it's very easy to advertise the existence of resources through linking. You make a GET to the root of my site and I respond with the root ...
Paul Turner's user avatar
22 votes
4 answers
8k views

What is the need for 'discoverability' in a REST API when the clients are not advanced enough to make use of it anyway?

The various talks I have watched and tutorials I scanned on REST seem to stress something called 'discoverability'. To my limited understanding, the term seems to mean that a client should be able to ...
Aditya M P's user avatar
10 votes
2 answers
11k views

"Invalid operation" status code in a HATEOAS REST API

In a HATEOAS API links are returned which represent possible state transitions. A conforming client should just be retrieving and following those links, but if a non-conforming client is constructing ...
FinnNk's user avatar
  • 5,809