# How to get user and content data with a single request

**URL:** <https://discuss.jsonapi.org/t/how-to-get-user-and-content-data-with-a-single-request/1182>\
**Category:** Uncategorized\
**Created:** [January 14, 2018, 11:20pm UTC](https://discuss.jsonapi.org/t/how-to-get-user-and-content-data-with-a-single-request/1182 "2018-01-14T23:20:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marceliotstein](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/marceliotstein/32/515_2.png) [@marceliotstein](https://discuss.jsonapi.org/u/marceliotstein)\
**Post date:** [January 14, 2018, 11:20pm UTC](https://discuss.jsonapi.org/t/how-to-get-user-and-content-data-with-a-single-request/1182/1 "2018-01-14T23:20:24Z")

</div>

I’m a beginner to JSON API (using Drupal, specifically Acquia Reservoir, with a Vue/Axios front-end). I am able to get an article node, which contains a user id in a relationships object. But I would like to receive author information such as full name and profile link along with this user ID. I would hope that I don’t need to make a seperate request for this, or is that the way it’s done?

I am looking all over on both Drupal docs, JSON API, Axios docs, Vue docs etc. for an answer to this, and must be missing something obvious. Can someone help?

Thanks.

Marc Eliot Stein

> **[Marc Eliot Stein: Social publishing and advanced technology development](https://marceliotstein.com/)**
>
> Welcome to the third version of my professional website, built for the first time entirely in front-end Javascript: Vue.js, Node.js, webpack, SASS and a few very cool Vue animation components found on or near Stack Overflow ...

---

<div class="post-metadata">

**Author:** ![janisis](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@janisis](https://discuss.jsonapi.org/u/janisis)\
**Post date:** [January 15, 2018, 8:44am UTC](https://discuss.jsonapi.org/t/how-to-get-user-and-content-data-with-a-single-request/1182/2 "2018-01-15T08:44:49Z")

</div>

Hi,

as I understand the spec, the inclusion of related documents is completely up to the server. I am not familiar with Drupal.

I have implemented your use case like this:

The client does one request (with or without an include url query param) and the server retrieves the (in your case) article from the database. Now if the include param is given or the server returns included resources by default, it will now retrieve the related documents (user) from the database and enrich your article resource with these related resources. Now the client returns the composite resource.

You won’t find an answer in either the JSON API docs, Vue docs or axios docs. I am not familiar with Drupal, but your best bet would be to look at the docs and check if fetching of related resources is supported.

Jannik

---

<div class="post-metadata">

**Author:** ![marceliotstein](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/marceliotstein/32/515_2.png) [@marceliotstein](https://discuss.jsonapi.org/u/marceliotstein)\
**Post date:** [January 15, 2018, 1:24pm UTC](https://discuss.jsonapi.org/t/how-to-get-user-and-content-data-with-a-single-request/1182/3 "2018-01-15T13:24:06Z")

</div>

Thanks a lot! This makes sense.
