...
Code Block |
---|
curl -X POST -d "@export.xml" "http://localhost:8080/rest/path/to/some/resource/fcr:import?format=jcr/xml"
Body:
<?xml version="1.0" encoding="UTF-8"?><sv:node xmlns:dc="http://purl.org/dc/terms/" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:ns001="http://purl.org/dc/elements/1.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:test="info:fedora/test/" xmlns:image="http://www.modeshape.org/images/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fedorarelsext="http://fedora.info/definitions/v4/rels-ext#" xmlns:mix="http://www.... |
...
Status | ||||||||
---|---|---|---|---|---|---|---|---|
|
Status | ||||||
---|---|---|---|---|---|---|
|
Versioning
Request URI: /path/to/some/resource/fcr:versions
...
Response:
Code Block |
---|
Status: 200 OK
Body:
/tmp/fcrepo4-data/path/to/backup/directory |
...
Status | ||||||
---|---|---|---|---|---|---|
|
...
fcr:restore Restore a backup file into the repository Status colour Blue title POST
...
Status | ||||||||
---|---|---|---|---|---|---|---|---|
|
Transactions
Request URI: /fcr:tx; /path/to/transaction/fcr:tx
...
Info |
---|
After retrieving a transaction resource, the client can execute any REST API method prefixed by the transaction location. |
Warning |
---|
Transactions are automatically closed and rolled back after (3 minutes?) of inactivity. Transactions can be refreshed by POSTing to /rest/tx:83e34464-144e-43d9-af13-b3464a1fb9b5/fcr:tx |
Example:
Code Block |
---|
curl -X POST "http://localhost:8080/rest/fcr:tx" |
...
Code Block |
---|
Status: 201 Created Headers: Location: http://localhost:8080/rest/tx:123456789:83e34464-144e-43d9-af13-b3464a1fb9b5 Expires: Sat, 16 Nov 2013 00:32:57 GMT |
Usage:
Code Block |
---|
curl -X POST "http://localhost:8080/rest/tx:12345678983e34464-144e-43d9-af13-b3464a1fb9b5/path/to/object/to/create" curl -X DELETE "http://localhost:8080/rest/tx:123456789/83e34464-144e-43d9-af13-b3464a1fb9b5/path/to/resource/to/delete" curl -X POST "http://localhost:8080/rest/tx:!2345678983e34464-144e-43d9-af13-b3464a1fb9b5/fcr:tx/fcr:commit |
Status:
Status | ||||||
---|---|---|---|---|---|---|
|
...
Save and commit an open transaction. Status colour Blue title POST
...
Status | ||||||||
---|---|---|---|---|---|---|---|---|
|
...
Rollback and close an open transaction Status colour Blue title POST
...
Status | ||||||||
---|---|---|---|---|---|---|---|---|
|
Fixity
Request URI: /path/to/some/resource/fcr:fixity
...
Get the fixity report for an object Status title GET
Note |
---|
Checking fixity requires retrieving the content from the binary store and may take some time. In the event of fixity corruption, in some cases, this will be automatically repaired. See Self-healing storage (link me!) |
Request Headers:
Status | ||||
---|---|---|---|---|
|
...
Response:
Code Block |
---|
Status: 200 OK Headers: Content-Type: text/turtle Body: <x> <y> <z> <http://localhost:8080/rest/path/to/some/binary/resource> a <http://fedora.info/definitions/v4/rest-api#resource> , <http://fedora.info/definitions/v4/rest-api#datastream> ; <http://fedora.info/definitions/v4/repository#hasFixityResult> [ <http://fedora.info/definitions/v4/repository#computedChecksum> <urn:sha1:5441456941dd8b3ee0832b991ee93ba0c0a558f7> ; <http://fedora.info/definitions/v4/repository#computedSize> "471019"^^<http://www.w3.org/2001/XMLSchema#long> ; <http://fedora.info/definitions/v4/repository#hasLocation> </org.infinispan.loaders.file.FileCacheStore:FedoraRepositoryBinaryData:org.infinispan.loaders.file.FileCacheStore:/var/folders/v3/wl82s37145b6jydsh9y5n8l40000gp/T//fcrepo4-data/fcrepo.ispn.binary.CacheDirPath> ; <http://fedora.info/definitions/v4/repository#isFixityResultOf> <http://localhost:8080/rest/path/to/some/binary/resource> ; <http://fedora.info/definitions/v4/repository#status> "SUCCESS" ] . |
Status:
Status | ||||||
---|---|---|---|---|---|---|
|
Status | ||||||
---|---|---|---|---|---|---|
|
Workspaces
Request URI: /fcr:workspaces/(workspace name)
...