[MGNLREST-32] Return links to make the REST APIs navigable Created: 07/Nov/13  Updated: 25/Mar/22  Resolved: 25/Mar/22

Status: Closed
Project: Magnolia REST Framework
Component/s: services
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Tobias Mattsson Assignee: Unassigned
Resolution: Inactive Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

A REST API should return links (and/or location header) to allow the client to navigate the resources exposed in the API. Especially POST operations should return the location to the newly created resource.

Ideally we would also make the endpoints in use discoverable by requesting a common base url and using the links to navigate them.



 Comments   
Comment by Magnolia International [ 19/Nov/13 ]

This practice is called REST level 3 (or something along those lines). While it seems great at first sight, it's easy to create monstrous APIs that somehow don't feel too rest-y anymore.
Is this something we need to do something about in the framework, or is this up to the end point implementation ?

Comment by Tobias Mattsson [ 15/Jun/14 ]

I was thinking something along the lines of HATEOAS. Every resource carries a list of links that identify links to go from there. Every resource has a "self" link pointing to itself.

Comment by Christopher Zimmermann [ 25/Mar/22 ]

Close as inactive

Generated at Mon Feb 12 06:55:54 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.