Re: Hydra + JSON-LD design question

Hi Jay,

I think your case may relate to distinction between Operation performed on web resource and Action performed on some abstract thing
https://github.com/HydraCG/Specifications/issues/2#issuecomment-55533955

For example, to 'Join' a group (Action on abstract thing) i may have to perform 'CreateResourceOperation` on collection of participants (Operation on web resource).

To my understanding Hydra stays focused on those Operations on web resources and some other effort may need to address concern of representing Actions on abstract things and how those actions map to Operations on web resources.

Cheers!



> On Dec 14, 2016, at 1:59 AM, Jay Zawar <jay.zawar@gmail.com> wrote:
> 
> Hi,
> 
> I m looking for a way to specify an operation on a particular resource instance: the operation's URL and HTTP method should be specifiable. Example (please check the last 3 lines):
> 
> {
>   "@context":"
> https://contexts.dictionary.mycompany-group.com/person.jsonld
> ",
>   "@id":"
> https://myapi.mycompany.com/persons/BE14A7269802498F992813885546D058
> ",
>   "@type":"
> https://schema.org/Person
> ",
>   "name": "Mustermann",
>   "operation"
>     : [
>       {"@type": "DeleteResourceOperation","method": "DELETE"},
>       {"@type": "ReplaceResourceOperation","method": "PUT"}
>       ],
>     
> 
> 	
> // now how would one specify this with JSON-LD augmented by HYDRA?
> {"@type": "some_special_operation","method": "POST", URL:"
> https://myapi.mycompany.com/persons/BE14A7269802498F992813885546D058/some_special_operation
> "}
> }
> 
> Kind regards,
> 
> Jay
> 

Received on Thursday, 29 December 2016 20:58:16 UTC