3 ms·
http://timelessrepo.com/haters-gonna-hateoas#hateoas http://timelessrepo.com/haters-gonna-hateoas#hateoas It shows in the example: <entry> <id>1337<
by buro9 14y ago
http://timelessrepo.com/haters-gonna-hateoas#hateoas http://timelessrepo.com/haters-gonna-hateoas#hateoas
It shows in the example:
<entry>
<id>1337</id>
<author>Steve Klabnik</author>
<link rel = "/linkrels/entry/newcomment"
uri = "/entries/1337/comments" />
<link rel = "self"
uri = "/entries/1337" />
</entry>
But I would go further and suggest that whether to show those shouldn't just be based on what the API can do, but what the client (and perhaps user controlling the client) can do.
As in... if they can read but not create, then show the "self" link but not the "newcomment" link.
Thus we're not just saying "our API has these endpoints", we're saying "you can do this".