# Specify fieldset for included relationship of the same resource type

**URL:** <https://discuss.jsonapi.org/t/specify-fieldset-for-included-relationship-of-the-same-resource-type/2607>\
**Category:** Uncategorized\
**Created:** [March 3, 2023, 9:14pm UTC](https://discuss.jsonapi.org/t/specify-fieldset-for-included-relationship-of-the-same-resource-type/2607 "2023-03-03T21:14:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![enotpoloskun](https://avatars.discourse-cdn.com/v4/letter/e/df705f/32.png) [@enotpoloskun](https://discuss.jsonapi.org/u/enotpoloskun)\
**Post date:** [March 3, 2023, 9:14pm UTC](https://discuss.jsonapi.org/t/specify-fieldset-for-included-relationship-of-the-same-resource-type/2607/1 "2023-03-03T21:14:09Z")

</div>

Hello.

According to JSON API spec documentation - you can provide list of fields to fetch for specific resource type. But what if I have a relationship of the same type but I want only specific fields of these object while having all fields for non relationship objects?

Example:

I have a “note” resource, which has “previousNotes” relationship which is also “note” resource

I am doing request in following way:

```auto
/notes?include=previousNotes

```

But the thing is, that I want all fields of `notes` but only `title` attribute for `previousNotes`

And according to documentation, I can add `fields[notes]=title` to the url. But this way both notes and previousNotes will have only `title` attribute in response because they are both same resource type.

Is there a way to specify fieldset not for whole resource type but for specific relationship(which is specified in `include`)?

---

<div class="post-metadata">

**Author:** ![jelhan](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/jelhan/32/822_2.png) [@jelhan](https://discuss.jsonapi.org/u/jelhan)\
**Post date:** [April 21, 2023, 9:01pm UTC](https://discuss.jsonapi.org/t/specify-fieldset-for-included-relationship-of-the-same-resource-type/2607/2 "2023-04-21T21:01:28Z")

</div>

The base specification only supports sparse fieldsets per resource type as you mentioned. But you could use an [extension](https://jsonapi.org/extensions/) adding support for sparse fieldsets depending if the resource is included as primary data or included.
