# Can we have a ResourceCollection() under Resource()?

**URL:** <https://discuss.jsonapi.org/t/can-we-have-a-resourcecollection-under-resource/885>\
**Category:** Uncategorized\
**Created:** [January 18, 2017, 5:09pm UTC](https://discuss.jsonapi.org/t/can-we-have-a-resourcecollection-under-resource/885 "2017-01-18T17:09:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![scottmcdonald](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/scottmcdonald/32/340_2.png) [@scottmcdonald](https://discuss.jsonapi.org/u/scottmcdonald)\
**Post date:** [January 18, 2017, 7:10pm UTC](https://discuss.jsonapi.org/t/can-we-have-a-resourcecollection-under-resource/885/2 "2017-01-18T19:10:48Z")

</div>

The quick answer is json:api resources can not be composed of other resources. Instead they have relationships to each other. See [Clarification on Resources Composed of Other Resources](http://discuss.jsonapi.org/t/clarification-on-resources-composed-of-other-resources/252) in the json:api forum for details on this topic. A corollary to this is do not include “foreign keys” in the resources, instead favor relationships.

So for you specific case instead of having process being composed of many activities, process has a “to-many” relationship to activities where the hypermedia API server can server-side “include” the related activities if desired or if the client requests with a “include” query parameter.

---

_[View the full topic](https://discuss.jsonapi.org/t/can-we-have-a-resourcecollection-under-resource/885)._
