Should have clarified, this is when pulling from a page of nodes. The nodes show the details of the node ( with uid as a field ), but how do I get the user information to be returned as well? ( like username, email, etc ).

Thanks,
Mike

Comments

admin@beerbaitandfishing.com’s picture

Issue summary: View changes
Wim Leers’s picture

Project: REST UI » Drupal core
Version: 8.x-1.15 » 8.5.x-dev
Component: Miscellaneous » rest.module

You're getting the ID of the user. Based on that, you can perform a second request to retrieve the data for the user.

When you're using the hal_json format, there is a link (under _links) already pointing to that user, you can just follow that URL.

The core REST module does not support embedding referenced entities in the main response. If you want that, I suggest you give https://www.drupal.org/project/jsonapi a try!

admin@beerbaitandfishing.com’s picture

Thanks for the response. Is there somehwere that I can change the sql to include this information in the restui module? I'd like to use restui ( already built a bunch of services that use it ) and just need this additional info.

Thanks,
Mike

Wim Leers’s picture

It's more than a matter of changing SQL. If you modify the code, you won't be able to update easily in the future. Why not just make a second request?

clemens.tolboom’s picture

Status: Active » Closed (works as designed)