# SPA++ maximum ref depth in resourceAPI?

**URL:** <https://community.bloomreach.com/t/spa-maximum-ref-depth-in-resourceapi/825>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [February 18, 2019, 3:41pm UTC](https://community.bloomreach.com/t/spa-maximum-ref-depth-in-resourceapi/825 "2019-02-18T15:41:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rick](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@Rick](https://community.bloomreach.com/u/Rick)\
**Post date:** [February 18, 2019, 3:41pm UTC](https://community.bloomreach.com/t/spa-maximum-ref-depth-in-resourceapi/825/1 "2019-02-18T15:41:42Z")

</div>

Hi Hippo’s,

I have a page, which has multiple components (Documents), which can have multiple items (also documents), which can have images. When I request this page through the resourceAPI I get the entire content tree, except for the images (the $ref’s to the images are present though). However, when I remove the component level document and add the items directly to the page, I do get the images returned in the resourceAPI.  
It seems like there is a maximum to the depth of references being resolved.  
So, my questions:

1. Is there a maximum reference depth for documents requested through the resourceAPI?
2. If so, can I change this?

Cheers,  
Rick

---

<div class="post-metadata">

**Author:** ![woonsanko](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@woonsanko](https://community.bloomreach.com/u/woonsanko)\
**Post date:** [February 18, 2019, 5:18pm UTC](https://community.bloomreach.com/t/spa-maximum-ref-depth-in-resourceapi/825/2 "2019-02-18T17:18:02Z")

</div>

Hi Rick,

> [@Rick](#):
>
> 1. Is there a maximum reference depth for documents requested through the resourceAPI?

Yes. The default maximum reference (depth) level is 1.

> [@Rick](#):
>
> 1. If so, can I change this?

Yes.  
If you want to change the maximum reference (depth) level only for the specific request, you can simply pass `_maxreflevel` query parameter to the request URL. e.g, `http://localhost:8080/site/myapp/resourceapi/news/?_maxreflevel=2`.

Or if you want to change the _default_ maximum reference (depth) level itself, add the following in the hst configuration properties (e.g, site/…/WEB-INF/hst-config.properties or /conf/hst.properties):

```auto
pagemodelapi.v09.defaultMaxContentReferenceLevel = 3

```

I will try to add this info to this documentation as well:

- [https://documentation.bloomreach.com/library/concepts/spa-plus/page-model-api/introduction.html](https://documentation.bloomreach.com/library/concepts/spa-plus/page-model-api/introduction.html)

Regards,

Woonsan

---

<div class="post-metadata">

**Author:** ![Rick](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@Rick](https://community.bloomreach.com/u/Rick)\
**Post date:** [February 18, 2019, 5:41pm UTC](https://community.bloomreach.com/t/spa-maximum-ref-depth-in-resourceapi/825/3 "2019-02-18T17:41:14Z")

</div>

Awesome, thanks Woonsan!

Rick
