# Can Relationship \`Links\` object hold more than \`self\` and \`related\` attributes and do both hold the same URL?

**URL:** <https://discuss.jsonapi.org/t/can-relationship-links-object-hold-more-than-self-and-related-attributes-and-do-both-hold-the-same-url/834>\
**Category:** Uncategorized\
**Created:** [November 11, 2016, 2:25pm UTC](https://discuss.jsonapi.org/t/can-relationship-links-object-hold-more-than-self-and-related-attributes-and-do-both-hold-the-same-url/834 "2016-11-11T14:25:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Buju](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/buju/32/321_2.png) [@Buju](https://discuss.jsonapi.org/u/Buju)\
**Post date:** [November 11, 2016, 2:25pm UTC](https://discuss.jsonapi.org/t/can-relationship-links-object-hold-more-than-self-and-related-attributes-and-do-both-hold-the-same-url/834/1 "2016-11-11T14:25:34Z")

</div>

After reading the spec it was still a bit unclear for me and it has an additional note:

> Note: Additional members may be specified for links objects and link objects in the future.

So I’m assuming that `self` and `related` attributes are the only 2 attributes allowed inside Relationship `Links`. This [Question](http://discuss.jsonapi.org/t/links-object-clarification-needed/130) also confirms it.

Then I have still further questions:

Q1: Presence of `self` and `related` are XOR? Either one of them can appear in `Links` but not at the same time, right?

Q2: Are the URL values for both attributes the same for a relationship Link object? Or where is the difference between those?

---

<div class="post-metadata">

**Author:** ![jlangley](https://avatars.discourse-cdn.com/v4/letter/j/9e8a1a/32.png) [@jlangley](https://discuss.jsonapi.org/u/jlangley)\
**Post date:** [November 14, 2016, 9:41pm UTC](https://discuss.jsonapi.org/t/can-relationship-links-object-hold-more-than-self-and-related-attributes-and-do-both-hold-the-same-url/834/2 "2016-11-14T21:41:30Z")

</div>

> [@Buju](#):
>
> Q1: Presence of self and related are XOR? Either one of them can appear in Links but not at the same time, right?

Wrong. Both can appear in the same Links object.

> [@Buju](#):
>
> Are the URL values for both attributes the same for a relationship Link object?

No.

> [@Buju](#):
>
> Or where is the difference between those?

If resource2 appears in a relationship on resource1, then the `related` URL refers to resource2, and the `self` URL refers to the relationship between the two resources (i.e. to the [associative entity](https://en.wikipedia.org/wiki/Associative_entity))

---

<div class="post-metadata">

**Author:** ![Buju](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/buju/32/321_2.png) [@Buju](https://discuss.jsonapi.org/u/Buju)\
**Post date:** [November 16, 2016, 10:12am UTC](https://discuss.jsonapi.org/t/can-relationship-links-object-hold-more-than-self-and-related-attributes-and-do-both-hold-the-same-url/834/3 "2016-11-16T10:12:57Z")

</div>

ah ok. thx for clarifying!
