Skip to content

Instantly share code, notes, and snippets.

@daniel-dgi
Last active August 29, 2015 14:22
Show Gist options
  • Save daniel-dgi/31df45b5c8ac69423b5e to your computer and use it in GitHub Desktop.
Save daniel-dgi/31df45b5c8ac69423b5e to your computer and use it in GitHub Desktop.
~ $ curl -X POST "http://localhost:8080/fcrepo/rest"
http://localhost:8080/fcrepo/rest/f5/15/30/ca/f51530ca-bc1d-4682-ba39-063e2c0f7fc5⏎\
~ $ curl -H "Accept: application/ld+json" "http://localhost:8080/fcrepo/rest/f5/15/30/ca/f51530ca-bc1d-4682-ba39-063e2c0f7fc5"
[ {
"@id" : "http://localhost:8080/fcrepo/rest/f5/15/30/ca/f51530ca-bc1d-4682-ba39-063e2c0f7fc5",
"@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:46:27.826Z"
} ],
"http://fedora.info/definitions/v4/repository#createdBy" : [ {
"@value" : "bypassAdmin"
} ],
"http://fedora.info/definitions/v4/repository#exportsAs" : [ {
"@id" : "http://localhost:8080/fcrepo/rest/f5/15/30/ca/f51530ca-bc1d-4682-ba39-063e2c0f7fc5/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:46:27.826Z"
} ],
"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" : "22e03743-d7a5-4ffc-878a-72bbb44d48d0"
} ],
"http://fedora.info/definitions/v4/repository#writable" : [ {
"@type" : "http://www.w3.org/2001/XMLSchema#boolean",
"@value" : "true"
} ]
}, {
"@id" : "http://localhost:8080/fcrepo/rest/f5/15/30/ca/f51530ca-bc1d-4682-ba39-063e2c0f7fc5/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 "@test.sparql" "http://localhost:8080/fcrepo/rest/f5/15/30/ca/f51530ca-bc1d-4682-ba39-063e2c0f7fc5"
~ $ curl -H "Accept: application/ld+json" "http://localhost:8080/fcrepo/rest/f5/15/30/ca/f51530ca-bc1d-4682-ba39-063e2c0f7fc5"
[ {
"@id" : "http://localhost:8080/fcrepo/rest/f5/15/30/ca/f51530ca-bc1d-4682-ba39-063e2c0f7fc5",
"@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:46:27.826Z"
} ],
"http://fedora.info/definitions/v4/repository#createdBy" : [ {
"@value" : "bypassAdmin"
} ],
"http://fedora.info/definitions/v4/repository#exportsAs" : [ {
"@id" : "http://localhost:8080/fcrepo/rest/f5/15/30/ca/f51530ca-bc1d-4682-ba39-063e2c0f7fc5/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:50:05.734Z"
} ],
"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" : "22e03743-d7a5-4ffc-878a-72bbb44d48d0"
} ],
"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/f5/15/30/ca/f51530ca-bc1d-4682-ba39-063e2c0f7fc5/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