Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
Status: 200 OK

Headers:
Content-Type: text/turtle

Body:
<http://localhost:8080/rest/path/to/resource> <http://fedora.info/definitions/v4/repository#hasVersion> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b/jcr:rootVersion/jcr:frozenNode> .

<http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b/jcr:rootVersion/jcr:frozenNode> <http://fedora.info/definitions/v4/repository#primaryType> "nt:frozenNode"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#frozenPrimaryType> "nt:folder"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#frozenMixinTypes> "fedora:resource"^^<http://www.w3.org/2001/XMLSchema#string> , "fedora:object"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#frozenUuid> "19cd1832-a5d7-4965-9564-579b1684a003"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#uuid> "87a0a8c317f1e702f0967e-c1bd-49cf-a78f-7b132fbabbb3"^^<http://www.w3.org/2001/XMLSchema#string> .

Status:

Status
subtletrue
colourGreen
title200
OK

Status
subtletrue
colourRed
title404
Not Found: if the resource is not versioned

 

...


Status
titleGET
Get a previous version of an object

...

Code Block
curl http://localhost:8080/rest/jcr:systemresource/jcrfcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572bversions/87a0a8c317f1e72c658170-624d-40f9-96cb-21ede3392155

Response:

Code Block
Status: 200 OK Headers: Link: http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b?limit=-1&amp;offset=0;rel="first"
Content-Type: text/turtleBody:<http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b> <http://fedora.info/definitions/v4/rest-api#exportsAs> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b/fcr:export?format=jcr/xml> ;
 <http://fedora.info/definitions/v4/rest-api#hasVersions> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b/fcr:versions> .

<http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b/fcr:export?format=jcr/xml> <http://www.w3.org/2000/01/rdf-schema#label> "jcr/xml"^^<http://www.w3.org/2001/XMLSchema#string> .

<http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b> <http://www.w3.org/ns/ldp#nextPage> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b?limit=-1&amp;offset=-1> ;
 <http://www.w3.org/ns/ldp#firstPage> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b?limit=-1&amp;offset=0> ;
 <http://www.w3.org/ns/ldp#inlinedResource> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b/jcr:versionLabels> .

<http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b/jcr:versionLabels> <http://fedora.info/definitions/v4/repository#hasParent> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b> .OK

Response Headers:
ETag: "39f0d8a01a066771e56f70be892a39a7b505843c"
Last-Modified: Tue, 20 May 2014 19:29:10 GMT
Content-Type: text/turtle

Body:

<http://localhost:8080/rest/jcr:systemresource/jcrfcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b> <http://fedora.info/definitions/v4/repository#hasChild> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b/jcr:versionLabels> .

<http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b/jcr:versionLabels>versions/87a0a8c317f1e72c658170-624d-40f9-96cb-21ede3392155> <http://fedora.info/definitions/v4/repository#primaryType> "nt:versionLabelsfrozenNode"^^<http://www.w3.org/2001/XMLSchema#string> .

<http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b> <http://www.w3.org/ns/ldp#inlinedResource> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b/jcr:rootVersion> .

<http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b/jcr:rootVersion>;
    <http://fedora.info/definitions/v4/repository#hasParent> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b> .

<http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b> <http://fedora.info/definitions/v4/repository#hasChild> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b/jcr:rootVersion> .

<http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b/jcr:rootVersion> <http://fedora.info/definitions/v4/repository#primaryType> "nt:versionrepository#frozenPrimaryType> "nt:folder"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#created> "20132014-1205-12T1420T19:3129:5200.41Z192Z"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#uuid>repository#frozenMixinTypes> "85edf2a7-287d-49bd-b834-d49fbaa1ea23fedora:resource"^^<http://www.w3.org/2001/XMLSchema#string> .

<http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b> <http://www.w3.org/ns/ldp#membersInlined> "true, "mix:versionable"^^<http://www.w3.org/2001/XMLSchema#string> ;
 a <http, "fedora:object"^^<http://www.w3.org/ns2001/ldp#Container>XMLSchema#string> ;
 <http://www.w3.org/ns/ldp#membershipSubject> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b> ;
 <http://www.w3.org/ns/ldp#membershipPredicate> <http://fedora.info/definitions/v4/repository#hasChild> ;
 <http://www.w3.org/ns/ldp#membershipObject> <httprepository#lastModified> "2014-05-20T19:29:10.555Z"^^<http://www.w3.org/ns2001/ldp#MemberSubject>XMLSchema#string> ;
   a <http://www.w3.org/ns/ldp#Page> ;
 <httpfedora.info/definitions/v4/repository#frozenUuid> "fed529c6-2121-4b1d-83fc-cc4274563612"^^<http://www.w3.org/ns2001/ldp#pageOf> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b> ;
 <http://fedora.info/definitions/v4/repository#hasParent> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f> .

<http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f>XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#hasChild> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b> .

<http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b> <httprepository#lastModifiedBy> "bypassAdmin"^^<http://www.w3.org/ns/ldp#inlinedResource> <http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f> .

<http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f>2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#primaryType>repository#uuid> "mode:versionHistoryFolder87a0a8c317f1e72c658170-624d-40f9-96cb-21ede3392155"^^<http://www.w3.org/2001/XMLSchema#string> .

<http://localhost:8080/rest/jcr:system/jcr:versionStorage/25/7c/4f/257c4fc463d7db126cf4c9dfe34a6a7b344c572b>;
    <http://fedora.info/definitions/v4/repository#primaryType>repository#createdBy> "nt:versionHistorybypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
    a <http://fedorawww.jcp.infoorg/definitionsjcr/v4/repository#versionableUuid> "19cd1832-a5d7-4965-9564-579b1684a003"^^<httpnt/1.0frozenNode> , <http://www.w3jcp.org/2001/XMLSchema#string> ;
jcr/nt/1.0base> , <http://fedora.info/definitions/v4/repository#uuid> "19cd1832-a5d7-4965-9564-579b1684a003"^^<http://www.w3jcp.org/jcr/2001mix/XMLSchema#string>1.0referenceable> .

Status:

Status
subtletrue
colourGreen
title200
OK

Status
subtletrue
colourRed
title404
Not Found: if the version does not exist

 

...


Status
colourBlue
titlePOST
Create a new version of an object

...

Response:

Code Block
Status: 204 No Content

Note: If versioning is not enabled for the resource, it will be automatically enabled if possible.

Status:

Status
subtletrue
colourGreen
title204
No Content: if a new version is created successfully

Status
subtletrue
colourRed
title404
Not Found: if the resource does not exist

 

...


Status
colourBlue
titlePOST
Create a new named version of an object

...

Code Block
Status: 204 No Content

Status:

Status
subtletrue
colourGreen
title204
No Content: if a new version is created successfully

Status
subtletrue
colourRed
title404
Not Found: if the resource does not exist


...


Anchor
revert
revert
Status
colourBlue
titlePATCH
Revert to a previous version of an object

...

Tip
For previous versions for which explicit names were not provided, you may find the automatically generated name for the version use the UUID property which you can find by parsing the response from the listing of available versions.

...

Code Block
Status: 204 No Content

Status:

Status
subtletrue
colourGreen
title204
No Content: if the version is reverted successfully

Status
subtletrue
colourRed
title404
Not Found: if the version does not exist


...

 

Anchor
delete
delete
Request URI: /path/to/some/resource/fcr:versions/versionName

...

Note

Trying to delete the current version of a resource will result in an error.  To revert to an old version of a resource, first revert to the old version using the PATCH method, and then delete the newer version.

Status:

Status
subtletrue
colourGreen
title204
No Content: if the version is reverted successfully

Status
subtletrue
colourRed
title404
Not Found: if the version does not exist

Status
subtletrue
colourRed
title409
Conflict: if trying to delete the current version