Created
November 11, 2013 16:34
-
-
Save escowles/7416103 to your computer and use it in GitHub Desktop.
SPARQL Update example using curl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# create collection object | |
curl -X POST http://localhost:8080/rest/objects/col1?mixin=fedora:object | |
echo | |
# create work object | |
curl -X POST http://localhost:8080/rest/objects/work1?mixin=fedora:object | |
echo | |
# link work to collection | |
echo "insert data { <http://localhost:8080/rest/objects/work1> <http://fedora.info/definitions/v4/rels-ext#isMemberOfCollection> <http://localhost:8080/rest/objects/col1> . }" | curl -X PATCH --upload-file - http://localhost:8080/rest/objects/work1 | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment