HATEOAS API: Difference between revisions
Jump to navigation
Jump to search
(Style) |
|||
Line 14: | Line 14: | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
! Method | ! style="background-position: center bottom;padding-right: 0;padding-bottom:21px" | Method | ||
!! style="writing-mode: vertical-rl;" | Browser Accessible | !! style="writing-mode: vertical-rl; background-position: center bottom;padding-right: 0;padding-bottom:21px" | Browser Accessible | ||
!! style="writing-mode: vertical-rl;" | Backward Compatible | !! style="writing-mode: vertical-rl; background-position: center bottom;padding-right: 0;padding-bottom:21px" | Backward Compatible | ||
!! style="writing-mode: vertical-rl;" | Backward Compatible (default) | !! style="writing-mode: vertical-rl; background-position: center bottom;padding-right: 0;padding-bottom:21px" | Backward Compatible (default) | ||
!! style="writing-mode: vertical-rl;" | HTTP Cachable | !! style="writing-mode: vertical-rl; background-position: center bottom;padding-right: 0;padding-bottom:21px" | HTTP Cachable | ||
!! style="writing-mode: vertical-rl;" | No URL Construction | !! style="writing-mode: vertical-rl; background-position: center bottom;padding-right: 0;padding-bottom:21px" | No URL Construction | ||
!! style="writing-mode: vertical-rl;" | URL as Identifier | !! style="writing-mode: vertical-rl; background-position: center bottom;padding-right: 0;padding-bottom:21px" | URL as Identifier | ||
!! style="writing-mode: vertical-rl;" | Stable Pagination | !! style="writing-mode: vertical-rl; background-position: center bottom;padding-right: 0;padding-bottom:21px" | Stable Pagination | ||
!! style="writing-mode: vertical-rl;" | Concurrency Support | !! style="writing-mode: vertical-rl; background-position: center bottom;padding-right: 0;padding-bottom:21px" | Concurrency Support | ||
|- | |- | ||
| HATEOAS || style="background:#fdffb6"|? || style="background:#caffbf"|Yes || style="background:#fdffb6"|? || style="background:#caffbf"|Yes || style="background:#caffbf"|Yes || style="background:#caffbf"|Yes || style="background:#fdffb6"|? || style="background:#caffbf"|Yes | | HATEOAS || style="background:#fdffb6"|? || style="background:#caffbf"|Yes || style="background:#fdffb6"|? || style="background:#caffbf"|Yes || style="background:#caffbf"|Yes || style="background:#caffbf"|Yes || style="background:#fdffb6"|? || style="background:#caffbf"|Yes |
Revision as of 11:51, 14 January 2021
Originally called REST, HATEOAS is a way of designing HTTP APIs as described in Roy Fieldings thesis. The acronym stands for Hypermedia as the Engine of Application State.
It distinguishes itself from other APIs by having the following properties:
- Heavy use of Media Types to allow Backward Compatibility.
- It does not allow clients to construct URLs (unless instructed by the server to do so) to allow for applications to change their URL structure.
- Other than an entry URL and a set of documents describing the Media Types, no additional knowledge should be necessary to use the API.
HATEOAS APIs usually make heavy use of HTTP features like:
- Caching to enable the application to scale better.
- Content Negotiation to support older clients and give users localized versions of resources.
- Conditional PUTs to add Optimistic Concurrency.
Comparison
Method | Browser Accessible | Backward Compatible | Backward Compatible (default) | HTTP Cachable | No URL Construction | URL as Identifier | Stable Pagination | Concurrency Support |
---|---|---|---|---|---|---|---|---|
HATEOAS | ? | Yes | ? | Yes | Yes | Yes | ? | Yes |
media_types-serialization (HATEOAS) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | ? |
Github (REST) | Yes | Yes | No | No | Yes | Yes | Yes | No |
Zalando | No | Yes | Yes | No | No | Yes | Yes | Yes |
Facebook Graph API | Yes | Yes | Yes | No | No | No | ? | No |
Shopify (REST) | Yes | Yes | Yes | No | No | No | Yes | No |
GraphQL | No | Yes | No | No | Yes | No | Yes | No |