Request URI: /path/to/some/resource
Methods: GET, POST, PUT, PATCH, HEAD, OPTIONS, DELETE, MOVE, COPY
...
...
Retrieve all triples for the resource
Query Parameters:
Pagination control for member resources
...
Status |
---|
subtle | true |
---|
colour | Red |
---|
title | 404 |
---|
|
Not Found
...
...
Create a new automatically-named child node or datastream at the given path
Query Parameters:
(Optional) Provide a SHA-1 checksum which will be checked against the uploaded content to ensure error-free transfer.
...
Status |
---|
| |
---|
subtle | true |
---|
colour | Red |
---|
title | 409 |
---|
|
Conflict (resource is locked or checksum mismatch)
...
Create a resource with a specified path, or replace the triples associated with a resource with the triples provided in the request body.
Note |
---|
Some resource properties are repository managed and cannot be removed or modified. Any attempt to do so may result in a 4xx error. |
...
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:
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 |
Status:
Status |
---|
subtle | true |
---|
colour | Green |
---|
title | 204 |
---|
|
No Content
Status |
---|
subtle | true |
---|
colour | Red |
---|
title | 409 |
---|
|
Conflict (resource is locked)
Status |
---|
subtle | true |
---|
colour | Red |
---|
title | 412 |
---|
|
Precondition Failed
...
...
Modify the triples associated with a resource with SPARQL-Update
Request Headers:
Status |
---|
subtle | true |
---|
title | If-UNModified-Since |
---|
|
...
Status |
---|
subtle | true |
---|
colour | Red |
---|
title | 412 |
---|
|
Precondition Failed
...
Delete a resource
Request Headers:
Lock-Token (Optional) a Lock-Token for any locks previously created on resources updated by this operation
...
Status |
---|
| |
---|
subtle | true |
---|
colour | Red |
---|
title | 404 |
---|
|
Not Found
...
Example:
Code Block |
---|
curl -i -X HEAD "http://localhost:8080/rest/node/to/head" |
...
Example:
Code Block |
---|
curl -i -X OPTIONS "http://localhost:8080/rest/node/to/options" |
Response:
Code Block |
---|
Status: 200 OK
Accept-Patch: application/sparql-update
Allow: MOVE,COPY,DELETE,POST,HEAD,GET,PUT,PATCH,OPTIONS
Accept-Post: text/turtle,text/rdf+n3,application/n3,text/n3,application/rdf+xml,application/n-triples,multipart/form-data,application/sparql-update |
Status:
Status |
---|
subtle | true |
---|
colour | Green |
---|
title | 200 |
---|
|
OK
Status |
---|
subtle | true |
---|
colour | Red |
---|
title | MOVE |
---|
|
Move a resource (and its subtree) to a new location
Note: A federated resource can be moved within the federation, but not from the federation to the internal repository (or vice versa)
...
Status |
---|
subtle | true |
---|
colour | Red |
---|
title | 502 |
---|
|
Destination URI isn't a valid resource path
...
Status |
---|
subtle | true |
---|
colour | Blue |
---|
title | COPY |
---|
|
...
Copy a resource (and its subtree) to a new location
Example:
Code Block |
---|
curl -X COPY -H "Destination: http://localhost:8080/rest/new/path/to/node" "http://localhost:8080/rest/path/to/node" |
...