167
edits
No edit summary |
No edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
Hypermedia is a form of media (things like text, images, video) that has things you can click on / interact with to navigate to other pages. | Hypermedia is a form of media (things like text, images, video) that has things you can click on / interact with to navigate to other pages. | ||
An early example of hypermedia is the [https://en.wikipedia.org/wiki/Aspen_Movie_Map Aspen Movie Map] which allowed you to travel to a building by clicking on it. On its own this idea is useful but with the introduction of [[URL|URLs]] you gain the ability to combine multiple hypermedia into one bigger hypermedia. A good example of this is this wiki page: it has its own URL which allows other hypermedia to link to it and at the same time it links to other webpages using their URL. This results in a bigger hypermedia called the '''W'''orld '''W'''ide '''W'''eb. | |||
A precise definition of hypermedia is: a nonlinear medium of information that includes graphics, audio, video, plain text and hyperlinks.<ref>[https://pasteapp.com/p/IJIiAuCBnIM/s/cpFL2NDZ2AK?view=t1vRSCi5S8N Talk: use standards]</ref>. | |||
== Hypermedia in JSON API Design == | |||
An advantage of modeling API responses as hypermedia is that it allows clients to organically discover new parts of the API by using the embedded links. | |||
<blockquote> | <blockquote> | ||
| Line 9: | Line 14: | ||
</blockquote> | </blockquote> | ||
Using hypermedia responses, [[Link|links]] in the response can indicate a set of next actions, as well as point to documentation or related endpoints. This allows for discoverable APIs<ref>[https://sookocheff.com/post/api/on-choosing-a-hypermedia-format/ Article: On choosing a hypermedia type for your API - HAL, JSON-LD, Collection+JSON, SIREN, Oh My!]</ref>. | Using hypermedia responses, [[Link Header|links]] in the response can indicate a set of next actions, as well as point to documentation or related endpoints. This allows for discoverable APIs<ref>[https://sookocheff.com/post/api/on-choosing-a-hypermedia-format/ Article: On choosing a hypermedia type for your API - HAL, JSON-LD, Collection+JSON, SIREN, Oh My!]</ref>. | ||
== Examples == | == Examples == | ||
| Line 19: | Line 24: | ||
<references /> | <references /> | ||
[[Category: Terminology]] | |||