Page tree

Versions Compared

Key

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

...

Code Block
languagebash
curl -X POST http://localhost:8080/rest/test?mixin=fedora:object

 

Now that Object "test" exists we can create a child of "test" using the same command:

 

Code Block
languagebash
curl -X POST http://localhost:8080/rest/test?mixin=fedora:object

...

Code Block
languagebash
curl -X GET http://localhost:8080/rest/test/test_datastream/fcr:content

Purge a Data-stream

Code Block
languagebash
curl -X

...

 DELETE http://localhost:8080/rest/test/test_datastream

Add a new property to the "test" Object

Code Block
languagebash
echo "PREFIX dc:

...

 <http://purl.org/dc/elements/1.1/> INSERT DATA {

...

 <http://localhost:8080/rest/

...

test> dc:title 'Test Title' }" > query.txt

...


curl -d @query.txt -H "Content-Type: application/sparql-update" -X PATCH http://localhost:8080/rest/test/


Please refer to https://wiki.duraspace.org/display/FF/REST+API for more information on what can be done with the REST API and cURL.
And checkout https://wiki.duraspace.org/display/FF/Object+properties+and+SPARQL-UPDATE for how to use the SPARQL update in greater detail.

...