I’m struggling to work out how to use hypermedia to deep link to a specific resource.
I have a single page app that respects browser history - so you can bookmark say
/contracts/<id>/dashboard. There are admin users who can see any
/contracts/<id>, of which there are potentially many - too many to return as relationships of the
user resource. The single page app’s URL structure doesn’t necessarily reflect the REST API’s URL structure, and it seems like a violation of hypermedia principles to couple them so tightly anyway.
I know I can just construct the REST url by appending
<id> to the
/contracts link, but it seems like that’s breaking hypermedia principles too, as the client is tightly coupled to a particular URL format. I see that JSON API used to support URI Template, but it appears this is no longer the case. Can someone point me at current advice for solving this issue?