...
Code Block |
---|
POST /rest/fcr:new create a new child object with an automatically generated unique identifier POST /rest/sufia:123456789?mixin=fedora:datastream create a new child datastream for /sufia:123456789 with an automatically generated unique identifier |
/rest/{path}/fcr:new/fcr:contentcontent
- GET the bytes from {path}/jcr:content/jcr:data
- POST create a new nt:file under at {path} with a binary value of the request entity
- PUT mutate the binary value of the nt:file at {path}
- DELETE remove the jcr:content child from the node at {path}
Code Block |
---|
POSTGET /rest/sufia:123456789/fcr:newDS1/fcr:content create a new child datastreamget the binary content of DS1 POST /rest/sufia:123456789/THUMBNAIL/fcr:content (with ana automaticallyrequest generatedbody) unique identifier)add withthe thebinary content providedfrom by the request body to THUMBNAIL POSTPUT /rest/sufia:123456789/THUMBNAIL/fcr:content (with a/named/datastream request body) update the binary content in the THUMBNAIL DELETE /rest/sufia:123456789/THUMBNAIL/fcr:content (can I do this?) |
remove the binary content from THUMBNAIL (but leave the JCR node there..)
PATCH /rest/sufia:123456789/THUMBNAIL/fcr:content
(I assume PATCH will work.. that'd be pretty cool) |
/rest/{path}/fcr:new/fcr:content
- POST create a new nt:file under {path} with a binary value of the request entity
Code Block |
---|
POST /rest/sufia:123456789/fcr:new/fcr:content
create a new child datastream (with an automatically generated unique identifier) with the content provided by the request body |
Describe
/rest/{path}/fcr:describe
- GET profile or description [repo describe at root, profiles by type]
- POST unsupported?
- PUT unsupported?
- DELETE unsupported?
Code Block |
---|
GET /rest/fcr:describe describe the fcrepo4 repository GET /rest/sufia:123456789/fcr:describe describe the object sufia:123456789 (equivalent to the fcrepo 3.x "object profile") GET /rest/sufia:123456789/content/fcr:describe describe the datastream sufia:123456789/content (equivalent to the fcrepo 3.x "datastream profile") GET /rest/some/arbitrary/jcr\:path/to/sufia:123456789/the/tree/continues/fcr:describe describe the node at /rest/some/arbitrary/jcr\:path/to/sufia:123456789/the/tree/continues (equivalent to the fcrepo3.x "datastream profile"). If the node resolves to a JCR "nt:file", we treat it as a datastream. Else, an object (or collection) |
...
Versioning
/rest/{path}/fcr:contentversions
- GET the bytes from {path}/jcr:content/jcr:data
- POST create a new nt:file at {path} with a binary value of the request entity
- PUT mutate the binary value of the nt:file at {path}
- DELETE remove the jcr:content child from the node at {path}version history of the nt:file or the nt:folder (as appropriate) at {path}
Code Block |
---|
GET /rest/sufia:123456789/fcr:versions
get the version history of sufia:123456789 fedora object (not sure what the response looks like, though)
GET /rest/sufia:123456789/THUMBNAIL/fcr:versions
get the version history of the THUMBNAIL datastream |
Datastream Batch Operations
/rest/{path}/fcr:datastreams is is batch DS operations
- GET
- POST
- DELETE
Code Block |
---|
GET /rest/sufia:123456789/fcr:datastreams?dsid=DC&dsid=RELS-EXT&dsid=CONTENT_METADATA receive a multipart/mixed response of the 3 named datastreams under sufia:123456789 POST /rest/sufia:123456789/fcr:datastreams (with a multipart body) create any number of datastreams under sufia:123456789 DELETE /rest/sufia:123456789/fcr:datastreams?dsid=THUMBNAIL&dsid=CONTENT delete the two named datastreams under sufia:123456789 |
Fixity
/rest/{path}/fcr:fixity
- GET get the fixity report for the the nt:file at at {path}
Code Block |
---|
GET /rest/ |
...
sufia:123456789/THUMBNAIL/fcr:fixity retrieve the fixity report for the /sufia:123456789/THUMBNAIL node |
versions
- GET the version history of the nt:file or the nt:folder (as appropriate) at {path}