RE: Extend describing operations

On 7 Apr 2016 at 09:29, Tomasz Pluskiewicz wrote:
> Hi guys,
> 
>> No, I didn't. Sorry. What I actually meant was https://schema.org/potentialAction
>> 
>>>> An action performed by a direct agent and indirect participants upon a
>>>> direct object.
> 
> Hm, isn't the schema:Action intended for describing real physical actions? Such as in the
> example on docs page?

No, it isn't restricted to physical actions.


>>>>> I'm feeling kind of like the "/blog/published" resource should be a link
>>>>> with it's own operation. I'm still not sure how what to do about the
>>>>> predefined "body".
>>>> 
>>>> The simplest approach would be to add a "status" property to the blog
>>>> post.
>>> 
>>> Yes, and then PATCH it? Or expose it as a resource and PUT on it. Agree?
>> 
>> Either is fine. I think for most resources, requiring the client to replace the resource, i.e.,
>> sending all other properties as well, would be fine too.
> 
> Yes of course, but doesn't approach reduce the API to a CRUD. Want to
> publish the BlogPost? Change the status property and PUT/PATCH the
> resource or PUT the status resource.

You can obviously also define a different message and post it to some URL to get it processed by the server. That's more work without a clear benefit though IMO.


> I expect a more rich experience possible where we actually transfer
> these representations between components. I this case it is transferring
> the BlogPost to a collection of published items.
> 
> The LINK/UNLINK does look interesting but again we'd need Link
> header specification on hydra:Operations.

Yeah, we need to make operations more expressive to be able to describe such interfaces.


--
Markus Lanthaler
@markuslanthaler

Received on Thursday, 7 April 2016 19:06:14 UTC