# What does "self" point to when a related resource was requested?

**URL:** <https://discuss.jsonapi.org/t/what-does-self-point-to-when-a-related-resource-was-requested/1008>\
**Category:** Uncategorized\
**Created:** [June 27, 2017, 12:17pm UTC](https://discuss.jsonapi.org/t/what-does-self-point-to-when-a-related-resource-was-requested/1008 "2017-06-27T12:17:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![OliverSalzburg](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/oliversalzburg/32/416_2.png) [@OliverSalzburg](https://discuss.jsonapi.org/u/OliverSalzburg)\
**Post date:** [June 27, 2017, 12:17pm UTC](https://discuss.jsonapi.org/t/what-does-self-point-to-when-a-related-resource-was-requested/1008/1 "2017-06-27T12:17:27Z")

</div>

I request a post resource, which declares a relationship to an author. I now request that author via `/post/123/author`. What should `self` in the `links` section point to?

Should it point to `/post/123/author` or should it point to `/user/456`, assuming user 456 is the author of post 123.

---

<div class="post-metadata">

**Author:** ![dgeb](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/dgeb/32/17_2.png) [@dgeb](https://discuss.jsonapi.org/u/dgeb)\
**Post date:** [June 27, 2017, 1:21pm UTC](https://discuss.jsonapi.org/t/what-does-self-point-to-when-a-related-resource-was-requested/1008/2 "2017-06-27T13:21:20Z")

</div>

The `self` link in the resource should point to the canonical link for the resource (i.e. `/user/456`) while the `self` link in the top level `links` should reference the request URL (i.e. `/post/123/author`).

See [JSON:API — Latest Specification (v1.1)](http://jsonapi.org/format/#document-top-level)

> The top-level links object MAY contain the following members:
> 
> - `self`: the link that generated the current response document.
