Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Status
colourYellow
titlePUT
 Modify   Create a resource with a specified path, or replace the triples associated with the resourceReplace the existing triples for a resource with the triples provided in the request body.

...

Status
subtletrue
titleIF-Match
Status
subtletrue
titleIf-UNModified-Since

Status
subtletrue
titlelock-token
  Lock-Token (Optional) a Lock-Token for any locks previously created on resources updated by this operation

...

Status
subtletrue
titlechecksum
 Checksum of the binary content (in the form urn:sha1:<sha-hash>). If the checksum doesn't match, an error will be returned.


 

Example (1): Updating properties with RDF content

Code Block
curl -X PUT -H "Content-Type: text/turtle" --data-binary "@new-triples.rdf" "http://localhost:8080/rest/node/to/update"
 
Request Body:
 
PREFIX dc: <http://purl.org/dc/elements/1.1/>
<> dc:title "some-resource-title" .
 

Response:

:title "some-resource-title" .
 

Response:

Code Block
Status: 204 No Content

 

Example (2): Creating a new resource at a specified path

Code Block
curl -X PUT "http://localhost:8080/rest/node/to/create"

Response:

Code Block
Status: 201 Created

Response Headers:
ETag: "ef214795c3b9109389ffa542a6c081976e1e9587"
Last-Modified: Mon, 19 May 2014 20:52:57 GMT
Location: http://localhost:8080/rest/node/to/create

 

Example (3): Creating new datastream content at a specified path

Code Block
curl -X PUT --upload-file image.jpg "http://localhost:8080/rest/new/datastream/fcr:content"

Response:

Code Block
Status: 201 Created

Response Headers:
ETag: "urn:sha1:ea3d29b28522724a82de042a7b7a4e79a1653435"
Last-Modified: Mon, 19 May 2014 20:55:31 GMT
Location: http://localhost:8080/rest/new/datastream/fcr:content
Code Block
Status: 204 No Content

 

Status:

Status
subtletrue
colourGreen
title204
 No Content

Status
subtletrue
colourRed
title409
Conflict (resource is locked)

Status
subtletrue
colourRed
title412
 Precondition Failed

...

Status
colourGreen
titlePATCH
 with   Modify the triples associated with a resource with SPARQL-Update

Request Headers:

Status
subtletrue
titleIF-Match
Status
subtletrue
titleIf-UNModified-Since

 

Status
subtletrue
titleLock-
Token
token
(Optional) a Lock-Token for any locks previously created on resources updated by this operatio

...

Status
subtletrue
colourGreen
title204
 No Content

Status
subtletrue
colourRed
title404
Not Found

 

...

 

Status
subtletrue
colourRed
titleMOVE
 Move a resource (and its subtree) to a new location

...

Status
subtletrue
colourRed
title409
 Source path doesn't existsexist

Status
subtletrue
colourRed
title409
Conflict (resource is locked)

...