Skip to content

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

Open
@tripu

Description

@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.

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions