Skip to content

Instantly share code, notes, and snippets.

@daniel-dgi
Created May 28, 2015 18:06
Show Gist options
  • Save daniel-dgi/644f8b4ba9b20ca9babb to your computer and use it in GitHub Desktop.
Save daniel-dgi/644f8b4ba9b20ca9babb to your computer and use it in GitHub Desktop.
~ $ curl -X POST "http://localhost:8080/fcrepo/rest"
http://localhost:8080/fcrepo/rest/5a/cb/b1/1b/5acbb11b-af93-4e4d-9610-6ab7804ce5d1⏎ ~ $
curl -X PATCH -H "Content-Type: application/sparql-update" --data-binary "@test.sparql" "http://localhost:8080/fcrepo/rest/5a/cb/b1/1b/5acbb11b-af93-4e4d-9610-6ab7804ce5d1"
~ $ curl -H "Accept: application/ld+json" "http://localhost:8080/fcrepo/rest/5a/cb/b1/1b/5acbb11b-af93-4e4d-9610-6ab7804ce5d1"
[ {
"@id" : "http://localhost:8080/fcrepo/rest/5a/cb/b1/1b/5acbb11b-af93-4e4d-9610-6ab7804ce5d1",
"@type" : [ "http://www.w3.org/ns/ldp#RDFSource", "http://www.w3.org/ns/ldp#Container", "http://www.jcp.org/jcr/nt/1.0folder", "http://www.jcp.org/jcr/nt/1.0hierarchyNode", "http://www.jcp.org/jcr/nt/1.0base", "http://www.jcp.org/jcr/mix/1.0created", "http://fedora.info/definitions/v4/repository#Container", "http://fedora.info/definitions/v4/repository#Resource", "http://www.jcp.org/jcr/mix/1.0lastModified", "http://www.jcp.org/jcr/mix/1.0referenceable" ],
"http://fedora.info/definitions/v4/repository#created" : [ {
"@type" : "http://www.w3.org/2001/XMLSchema#dateTime",
"@value" : "2015-05-28T17:58:17.375Z"
} ],
"http://fedora.info/definitions/v4/repository#createdBy" : [ {
"@value" : "bypassAdmin"
} ],
"http://fedora.info/definitions/v4/repository#exportsAs" : [ {
"@id" : "http://localhost:8080/fcrepo/rest/5a/cb/b1/1b/5acbb11b-af93-4e4d-9610-6ab7804ce5d1/fcr:export?format=jcr/xml"
} ],
"http://fedora.info/definitions/v4/repository#hasParent" : [ {
"@id" : "http://localhost:8080/fcrepo/rest/"
} ],
"http://fedora.info/definitions/v4/repository#lastModified" : [ {
"@type" : "http://www.w3.org/2001/XMLSchema#dateTime",
"@value" : "2015-05-28T17:58:50.704Z"
} ],
"http://fedora.info/definitions/v4/repository#lastModifiedBy" : [ {
"@value" : "bypassAdmin"
} ],
"http://fedora.info/definitions/v4/repository#mixinTypes" : [ {
"@value" : "fedora:Container"
}, {
"@value" : "fedora:Resource"
} ],
"http://fedora.info/definitions/v4/repository#primaryType" : [ {
"@value" : "nt:folder"
} ],
"http://fedora.info/definitions/v4/repository#uuid" : [ {
"@value" : "a9ab9b5f-219c-4e8a-a841-b4a41f0e20d5"
} ],
"http://fedora.info/definitions/v4/repository#writable" : [ {
"@type" : "http://www.w3.org/2001/XMLSchema#boolean",
"@value" : "true"
} ],
"http://purl.org/dc/terms/title" : [ {
"@value" : "Stuff"
} ]
}, {
"@id" : "http://localhost:8080/fcrepo/rest/5a/cb/b1/1b/5acbb11b-af93-4e4d-9610-6ab7804ce5d1/fcr:export?format=jcr/xml",
"http://purl.org/dc/elements/1.1/format" : [ {
"@id" : "http://fedora.info/definitions/v4/repository#jcr/xml"
} ]
} ]⏎ ~ $
curl -X PATCH -H "Content-Type: application/sparql-update" --data-binary "@test2.sparql" "http://localhost:8080/fcrepo/rest/5a/cb/b1/1b/5acbb11b-af93-4e4d-9610-6ab7804ce5d1"
~ $ curl -H "Accept: application/ld+json" "http://localhost:8080/fcrepo/rest/5a/cb/b1/1b/5acbb11b-af93-4e4d-9610-6ab7804ce5d1"
[ {
"@id" : "http://localhost:8080/fcrepo/rest/5a/cb/b1/1b/5acbb11b-af93-4e4d-9610-6ab7804ce5d1",
"@type" : [ "http://www.w3.org/ns/ldp#RDFSource", "http://www.w3.org/ns/ldp#Container", "http://www.jcp.org/jcr/nt/1.0folder", "http://www.jcp.org/jcr/nt/1.0hierarchyNode", "http://www.jcp.org/jcr/nt/1.0base", "http://www.jcp.org/jcr/mix/1.0created", "http://fedora.info/definitions/v4/repository#Container", "http://fedora.info/definitions/v4/repository#Resource", "http://www.jcp.org/jcr/mix/1.0lastModified", "http://www.jcp.org/jcr/mix/1.0referenceable" ],
"http://fedora.info/definitions/v4/repository#created" : [ {
"@type" : "http://www.w3.org/2001/XMLSchema#dateTime",
"@value" : "2015-05-28T17:58:17.375Z"
} ],
"http://fedora.info/definitions/v4/repository#createdBy" : [ {
"@value" : "bypassAdmin"
} ],
"http://fedora.info/definitions/v4/repository#exportsAs" : [ {
"@id" : "http://localhost:8080/fcrepo/rest/5a/cb/b1/1b/5acbb11b-af93-4e4d-9610-6ab7804ce5d1/fcr:export?format=jcr/xml"
} ],
"http://fedora.info/definitions/v4/repository#hasParent" : [ {
"@id" : "http://localhost:8080/fcrepo/rest/"
} ],
"http://fedora.info/definitions/v4/repository#lastModified" : [ {
"@type" : "http://www.w3.org/2001/XMLSchema#dateTime",
"@value" : "2015-05-28T18:05:00.876Z"
} ],
"http://fedora.info/definitions/v4/repository#lastModifiedBy" : [ {
"@value" : "bypassAdmin"
} ],
"http://fedora.info/definitions/v4/repository#mixinTypes" : [ {
"@value" : "fedora:Container"
}, {
"@value" : "fedora:Resource"
} ],
"http://fedora.info/definitions/v4/repository#primaryType" : [ {
"@value" : "nt:folder"
} ],
"http://fedora.info/definitions/v4/repository#uuid" : [ {
"@value" : "a9ab9b5f-219c-4e8a-a841-b4a41f0e20d5"
} ],
"http://fedora.info/definitions/v4/repository#writable" : [ {
"@type" : "http://www.w3.org/2001/XMLSchema#boolean",
"@value" : "true"
} ]
}, {
"@id" : "http://localhost:8080/fcrepo/rest/5a/cb/b1/1b/5acbb11b-af93-4e4d-9610-6ab7804ce5d1/fcr:export?format=jcr/xml",
"http://purl.org/dc/elements/1.1/format" : [ {
"@id" : "http://fedora.info/definitions/v4/repository#jcr/xml"
} ]
} ]⏎
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment