Versions Compared

Key

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

...

Status
subtletrue
titlemixin
 (Optional; values: fedora:object, fedora:datastream) Explicitly create an object or datastream, instead of inferring it from the request body 

Request Headers:

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

Example (1):

Code Block
curl -X POST "http://localhost:8080/rest/some/path/to/a/new/resource"

...

Status
subtletrue
colourGreen
title201
 Created

Status
subtletrue
colourRed
title416
Conflict (resource is locked)

...

 

Status
colourBlue
titlePOST
 Create a new node as a child of the given node

...

Status
subtletrue
titleSlug
  Use the slug header when creating the new resource (see AtomPub slug header). If no slug is provided, the identifier will be automatically generated.

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

Note

The slug you provide does not guarantee the location of the created node. Clients must check the Location header for the path to the created resource. For full control over the generated path, see POST Create a new node at the given path.

...

Status
subtletrue
colourGreen
title201
 Created

 

Status
subtletrue
colourRed
title416
Conflict (resource is locked)

 

...

 

Status
colourBlue
titlePOST
  Create a new node and populate some properties

...

Status
subtletrue
titleContent-Type
  text/turtle

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

Query Parameters:

Status
subtletrue
titlechecksum

...

Status
subtletrue
colourGreen
title201
 Created

Status
subtletrue
colourRed
title416
Conflict (resource is locked)

 

...

 

Status
colourBlue
titlePOST
 Create a new node and execute a SPARQL-Update query

...

Status
subtletrue
titleContent-Type
  application/sparql-update

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

Query Parameters:

Status
subtletrue
titlechecksum

...

Status
subtletrue
colourGreen
title201
 Created

Status
subtletrue
colourRed
title416
Conflict (resource is locked)

 

...

Status
colourBlue
titlePOST
  Create a new resource with binary content

...

Status
subtletrue
titleContent-DISPOSITION
 The filename provided in the content disposition header will be stored in a premis:hasOriginalName property..

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

 

Example (1):

Code Block
curl -X POST --upload-file picture.jpg "http://localhost:8080/rest/binary/resource/to/create"

...

Status
subtletrue
colourRed
title409
 Conflict (checksum mismatch)

Status
subtletrue
colourRed
title416
Conflict (resource is locked)

 

...

 

Status
colourYellow
titlePUT
 Modify the triples associated with the resource

...

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

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

Query Parameters:

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:

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

 

Status:

Status
subtletrue
colourGreen
title204
 No ContentContent

Status
subtletrue
colourRed
title416
Conflict (resource is locked)

Status
subtletrue
colourRed
title412
 Precondition Failed

...

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

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

Example (1):

Code Block
curl -X PATCH -H "Content-Type: application/sparql-update" --data-binary "@body.rdf" "http://localhost:8080/rest/node/to/update"
 
Request Body:
 
PREFIX dc: <http://purl.org/dc/elements/1.1/>
INSERT {   
  <> dc:title "some-resource-title" .
}
WHERE { }
 

...

Status
subtletrue
colourRed
title416
Conflict (resource is locked)

Status
subtletrue
colourRed
title412
 Precondition Failed

 

...

 

Status
colourRed
titleDELETE
Delete a resourcea resource

Request Headers:

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

Example:

Code Block
curl -X DELETE "http://localhost:8080/rest/node/to/delete"

...

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

Request Headers:

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

Example (1):

Code Block
curl -X MOVE -H "Destination: http://localhost:8080/rest/new/path/to/node" "http://localhost:8080/rest/path/to/node"

...

Status
subtletrue
colourRed
title416
Conflict (resource is locked)

Status
subtletrue
colourRed
title412
 Destination path already exists

...

Status
subtletrue
colourRed
title409
 Source path doesn't exists

Status
subtletrue
colourRed
title416
Conflict (resource is locked)

Status
subtletrue
colourRed
title412
 Destination path already exists

...