168
edits
No edit summary |
|||
| (3 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
* It does not allow clients to construct [[URL | URLs]] (unless [[URL Templating | instructed by the server to do so]]) to allow for applications to change their URL structure. | * It does not allow clients to construct [[URL | URLs]] (unless [[URL Templating | 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. | * Other than an entry URL and a set of documents describing the [[Media Types]], no additional knowledge should be necessary to use the API. | ||
* Having a nice URL structure is not essential, people in browsers will be clicking on links instead of typing and source code should only contain the root URL. | |||
HATEOAS APIs usually make heavy use of HTTP features like: | HATEOAS APIs usually make heavy use of HTTP features like: | ||
| Line 10: | Line 11: | ||
* [[Content Negotiation]] to [[Backward Compatibility | support older clients]] and [[Internationalization | give users localized versions of resources]]. | * [[Content Negotiation]] to [[Backward Compatibility | support older clients]] and [[Internationalization | give users localized versions of resources]]. | ||
* Conditional PUTs to add [[Optimistic Concurrency]]. | * Conditional PUTs to add [[Optimistic Concurrency]]. | ||
== Language Support == | |||
Some programming languages have ready to use libraries that can help you implement a HATEOAS API: | |||
* [[HATEOAS API (Ruby) | Ruby]] | |||
* [[HATEOAS API (NodeJS) | NodeJS]] | |||
== Comparison == | == Comparison == | ||
| Line 37: | Line 44: | ||
|- | |- | ||
| GraphQL || style="background:#ffadad"|No || style="background:#caffbf"|Yes || style="background:#ffadad"|No || style="background:#ffadad"|No || style="background:#caffbf"|Yes || style="background:#ffadad"|No || style="background:#caffbf"|Yes || style="background:#ffadad"|No | | GraphQL || style="background:#ffadad"|No || style="background:#caffbf"|Yes || style="background:#ffadad"|No || style="background:#ffadad"|No || style="background:#caffbf"|Yes || style="background:#ffadad"|No || style="background:#caffbf"|Yes || style="background:#ffadad"|No | ||
|- | |||
| [https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md Microsoft] || style="background:#caffbf"|Yes || style="background:#caffbf"|Yes || style="background:#caffbf"|Yes || style="background:#caffbf"|Yes || style="background:#ffadad"|No || style="background:#ffadad"|No || style="background:#caffbf"|Yes || style="background:#caffbf"|Yes | |||
|- | |||
| [https://cloud.google.com/apis/design Google] || style="background:#caffbf"|Yes || style="background:#caffbf"|Yes || style="background:#ffadad"|No || style="background:#caffbf"|Yes || style="background:#ffadad"|No || style="background:#ffadad"|No || style="background:#caffbf"|Yes || style="background:#caffbf"|Yes | |||
|} | |} | ||
[[Category: Terminology]] | [[Category: Terminology]] | ||