...
Methods: GET, POST, PUT, PATCH, HEAD, OPTIONS, DELETE, MOVE, COPY
...
Anchor
Retrieve all triples for the resource Status title GET
...
Status | ||||||
---|---|---|---|---|---|---|
|
...
post Anchor
Create a new automatically-named child node or datastream at the given pathpost Status colour Blue title POST
...
Status | ||||||||
---|---|---|---|---|---|---|---|---|
|
...
put Anchor
Create a resource with a specified path, or replace the triples associated with a resource with the triples provided in the request body. Status colour Yellow title PUT
...
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 | ||||||
---|---|---|---|---|---|---|
|
Status | ||||||
---|---|---|---|---|---|---|
|
Status | ||||||
---|---|---|---|---|---|---|
|
...
Anchor
Modify the triples associated with a resource with SPARQL-Update Status colour Green title PATCH
...
Status | ||||||
---|---|---|---|---|---|---|
|
...
anchor head
head Status
Retrieve the node headers statuscolour Red title HEAD
Delete a resourceDELETE
Request Headers:
Lock-Token (Optional) a Lock-Token for any locks previously created on resources updated by this operation
Example:
Code Block |
---|
curl -i -X HEADDELETE "http://localhost:8080/rest/node/to/headdelete" |
Response:
Code Block |
---|
Status: 200 OK
ETag: "bbdd92e395800153a686773f773bcad80a51f47b"
Last-Modified: Wed, 28 May 2014 18:31:36 GMT
Preference-Applied: return=representation; include="http://www.w3.org/ns/ldp#PreferMembership http://www.w3.org/ns/ldp#PreferContainment http://fedora.info/definitions/v4/repository#InboundReferences" |
204 No Content |
Status:Status:
Status | ||||||
---|---|---|---|---|---|---|
|
Status | ||||||||
---|---|---|---|---|---|---|---|---|
|
anchor
...
options Status subtle
...
true colour
...
Green title
...
HEAD
...
Retrieve the node headers
Example:
Code Block |
---|
curl -i -X |
...
HEAD "http://localhost:8080/rest/node/to/ |
...
head" |
Response:
Code Block |
---|
Status: 200 OK
|
...
ETag: |
...
"bbdd92e395800153a686773f773bcad80a51f47b" Last-Modified: |
...
Wed, 28 May 2014 18:31:36 GMT
Preference-Applied: return=representation; include="http://www.w3.org/ns/ldp#PreferMembership http://www.w3.org/ns/ldp#PreferContainment http://fedora.info/definitions/v4/repository#InboundReferences" |
Status:
Status | ||||||
---|---|---|---|---|---|---|
|
...
Status |
---|
...
|
...
Status
|
...
|
Request Headers:
|
...
Outputs information about the supported HTTP methods, etc. Lock-Token (Optional) a Lock-Token for any locks previously created on resources updated by this operation Status subtle true colour Yellow title OPTIONS
Response:
Code Block |
---|
Status: 204 No Content |
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 | |||||
---|---|---|---|---|---|
|
...
|
...
...
OK
...
Move a resource (and its subtree) to a new location Status subtle true colour Red title MOVE
...
Status | ||||||
---|---|---|---|---|---|---|
|
...
Anchor
Copy a resource (and its subtree) to a new location Status subtle true colour Blue title COPY
...