Re: Hypermedia and media types

Hello,

On 08/20/2015 09:31 AM, Dimitri van Hees wrote:
>>> Markus Lanthaler:
>>>
>>>> You could define a profile as Ruben already mentioned. An alternative
>> might
>>>> be to use the Prefer header [1] (either by using "return=minimal" or
>>>> defining a new preference).
>>>
>>> Interesting, I'm going to investigate the "return=hypermedia" option ;-)
>>
>> :-)
>>
>> Let us know if you gather some stats of how popular that option turns out to
>> be. My guess is that most developers don't care about a little extra data in
>> the response.
> 
> I definitely will! I don't think they care about little extra data, however I do think they care about little extra complexity. The fact is: I don't know. So if we could provide all different responses, it's all up to them. The only thing I'm struggling with right now is that I can't find a proper way to provide both JSON-LD without Hydra *and* JSON-LD with Hydra. Apart from why we would want that, do you think the Prefer header is the right technical solution for this?

I remember discussions about keeping data returned in
hydra:ApiDocumentation separate from payloads of other responses. I have
impression that here we may talk about something similar.

For example information about paging in particular collection seems
relevant mostly in context of particular API interaction and paging
strategy. Once someone puts all the data in one's own triple store and
can query it directly using some private interface (SPARQL, MQL,
Gremlin-inspired something, etc.), API specific pagination data seems
like just an irrelevant noise.

Similar if API returns *affordances* in payloads, only relevant for
particular resource (instance) and customized based on permissions of
authenticated agent and even client application she uses. For example
control for 'remove person from a group members', if one of group admins
made the API request to fetch group information.

Cheers!

Received on Thursday, 20 August 2015 10:41:16 UTC