W3C home > Mailing lists > Public > public-ldp-wg@w3.org > October 2012

RE: ldp-ISSUE-12 (HTTP PATCH for creation): Can HTTP PATCH be used for resource creation? [Linked Data Platform core]

From: Steve Battle <steve.battle@sysemia.co.uk>
Date: Thu, 18 Oct 2012 16:17:45 +0100
To: "'Linked Data Platform \(LDP\) Working Group'" <public-ldp-wg@w3.org>
Message-ID: <008601cdad43$bb5227b0$31f67710$@sysemia.co.uk>


> -----Original Message-----
> From: Linked Data Platform (LDP) Working Group Issue Tracker
> [mailto:sysbot+tracker@w3.org]
> Sent: 02 October 2012 15:15
> To: public-ldp-wg@w3.org
> Subject: ldp-ISSUE-12 (HTTP PATCH for creation): Can HTTP PATCH be used
> for resource creation? [Linked Data Platform core]
> 
> ldp-ISSUE-12 (HTTP PATCH for creation): Can HTTP PATCH be used for
> resource creation? [Linked Data Platform core]
> 
> http://www.w3.org/2012/ldp/track/issues/12
> 
> Raised by: Raúl García Castro
> On product: Linked Data Platform core
> 
> 4.7 + 5.8 (HTTP PATCH)
> 
> HTTP PATCH MAY be used to create a new resource if the URI does not point
> to an existing resource.
> 
> Are we interested in restricting the usage of PATCH only for updates? Or do
> we allow this behaviour?
> 
> 

According to RFC 5789 : PATCH Method for HTTP

2.  The PATCH Method

   The PATCH method requests that a set of changes described in the
   request entity be applied to the resource identified by the Request-
   URI.  The set of changes is represented in a format called a "patch
   document" identified by a media type.  If the Request-URI does not
   point to an existing resource, the server MAY create a new resource,
   depending on the patch document type (whether it can logically modify
   a null resource) and permissions, etc.

So it looks like - YES - the patch method may create a new resource.
The ChangeSet representation, for example seems to support this scenario (assuming we're not trying to delete non-existing existing triples with that subject) <http://www.w3.org/2009/12/rdf-ws/papers/ws07>
In addition, even if the patched resource already exists, the RDF description may include additional resources that don't yet exist which would have to be created.

Steve.
Received on Thursday, 18 October 2012 15:18:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:17:32 UTC