# Relationships, "self" and "related"

**URL:** <https://discuss.jsonapi.org/t/relationships-self-and-related/1333>\
**Category:** Uncategorized\
**Created:** [July 13, 2018, 3:19pm UTC](https://discuss.jsonapi.org/t/relationships-self-and-related/1333 "2018-07-13T15:19:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![data\_hope](https://avatars.discourse-cdn.com/v4/letter/d/5fc32e/32.png) [@data\_hope](https://discuss.jsonapi.org/u/data_hope)\
**Post date:** [July 13, 2018, 3:19pm UTC](https://discuss.jsonapi.org/t/relationships-self-and-related/1333/1 "2018-07-13T15:19:17Z")

</div>

Hi,

in the docs there is an example for the JSON representation of a resource with a relationship.

```
{
  "type": "articles",
  "id": "1",
  "attributes": {
    "title": "Rails is Omakase"
  },
  "relationships": {
    "author": {
      "links": {
        "self": "http://example.com/articles/1/relationships/author",
        "related": "http://example.com/articles/1/author"
      },
      "data": { "type": "people", "id": "9" }
    }
  },
  "links": {
    "self": "http://example.com/articles/1"
  }
}

```

I am wondering what the reasoning is behind linking to two sources in the “links” section. What do you expect to get when you either fetch `http://example.com/articles/1/relationships/author` or `http://example.com/articles/1/author`?

---

<div class="post-metadata">

**Author:** ![michaelhibay](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/michaelhibay/32/405_2.png) [@michaelhibay](https://discuss.jsonapi.org/u/michaelhibay)\
**Post date:** [July 16, 2018, 5:06pm UTC](https://discuss.jsonapi.org/t/relationships-self-and-related/1333/2 "2018-07-16T17:06:58Z")

</div>

You expect to get the `people` resource id=9.

The self link within the relationship is the URL which identifies the relationship on the root resource. That relationship is the `author` of the `article`. The related link is the canonical URL for the `author` of the `article`.

Acting on the `self` link is an operation on the _relationship_ between the `article` and the `people` resources. Acting on the `related` link is an operation on the related `people` resource itself.

The URL structures are of course entirely unnecessary, but are meant to help understand the distinction between these links.

I hope this helps!
