Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Honour “embed” param also for single objects (?) #64

Open
tripu opened this issue Mar 25, 2016 · 3 comments
Open

Honour “embed” param also for single objects (?) #64

tripu opened this issue Mar 25, 2016 · 3 comments

Comments

@tripu
Copy link
Member

tripu commented Mar 25, 2016

@vivienlacourba said:

Routes that return a collection of objects accept an ?embed=1 parameter which embeds the object instead of simply link to it.

Would it be reasonable that the embed parameter is honoured also when the request returns one object in particular? ie, apart from including a property _links in the result, include also _embed with that same object, in detail. That would save many subsequent calls in some cases.

This is my scenario: a dynamic page for a group typically calls the API 8 times: once for the group itself, then once again for each of {chairs, services, specifications, teamcontacts, users, charters, participations}. That is necessary because the information returned by the first request is rather succinct [append API key], and the embed parameter has no effect there. If embed worked there and Unitas could get basic info about those objects (name/title and href would suffice) on its first call, it would work much faster and save the rest of calls.

This would allow us to solve w3c/Unitas#3.

@tripu
Copy link
Member Author

tripu commented Apr 28, 2016

(I think @vivienlacourba told me that yes, it's reasonable, but not a trivial feature to add.)

@tripu
Copy link
Member Author

tripu commented Jul 11, 2016

Any idea if/when this could be tackled…?

@tripu
Copy link
Member Author

tripu commented Dec 4, 2017

https://api-platform.com/ to the rescue…?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants