Internet Engineering Task Force (IETF) | A. Brown |
Request for Comments: 5829 | G. Clemm |
Category: Informational | IBM |
ISSN: 2070-1721 | J. Reschke, Editor |
greenbytes | |
April 2010 |
This specification defines a set of link relation types that may be used on Web resources for navigation between a resource and other resources related to version control, such as past versions and working copies.¶
This document is not an Internet Standards Track specification; it is published for informational purposes.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see Section 2 of RFC 5741.¶
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc5829.¶
Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.¶
This specification defines a set of link relation types that may be used on Web resources that exist in a system that supports versioning to navigate among the different resources available, such as past versions and working copies.¶
These link relations are used in the AtomPub ([RFC5023]) bindings of the "Content Management Interoperability Services" (CMIS). See Section 3.4.3.3 of [CMIS] for further information.¶
Versioned Resource ¶
Version History ¶
Predecessor, Successor ¶
Working Copy ¶
Checkout ¶
Checkin ¶
The following link relations are defined.¶
When included on a versioned resource, this link points to a resource containing the version history for this resource.¶
When included on a versioned resource, this link points to a resource containing the latest (e.g., current) version.¶
The latest version is defined by the system. For linear versioning systems, this is probably the latest version by timestamp. For systems that support branching, there will be multiple latest versions, one for each branch in the version history.¶
Some systems may allow more than one of these link relations.¶
When included on a versioned resource, this link points to a working copy for this resource.¶
Some systems may allow more than one of these link relations.¶
When included on a working copy, this link points to the versioned resource from which this working copy was obtained.¶
When included on a versioned resource, this link points to a resource containing the predecessor version in the version history.¶
Some systems may allow more than one of these link relations in the case of multiple branches merging.¶
When included on a versioned resource, this link points to a resource containing the successor version in the version history.¶
Some systems may allow more than one of these link relations in order to support branching.¶
The link relations below have been registered by IANA per Section 7.1 of [RFC4287]:¶
version-history
See Section 3.1.
Undefined; this relation can be used for background processing or to provide extended functionality without displaying its value.
See Section 5.
latest-version
See Section 3.2.
Undefined; this relation can be used for background processing or to provide extended functionality without displaying its value.
See Section 5.
working-copy
See Section 3.3.
Undefined; this relation can be used for background processing or to provide extended functionality without displaying its value.
See Section 5.
working-copy-of
See Section 3.4.
Undefined; this relation can be used for background processing or to provide extended functionality without displaying its value.
See Section 5.
predecessor-version
See Section 3.5.
Undefined; this relation can be used for background processing or to provide extended functionality without displaying its value.
See Section 5.
successor-version
See Section 3.6.
Undefined; this relation can be used for background processing or to provide extended functionality without displaying its value.
See Section 5.
Automated agents should take care when these relations cross administrative domains (e.g., the URI has a different authority than the current document). Such agents should also take care to detect circular references.¶
Care should be applied when versioned resources are subject to differing access policies. In this case, exposing links may leak information even if the linked resource itself is properly secured. In particular, the syntax of the link target could expose sensitive information (see Section 16.2 of [RFC3253] for a similar consideration in WebDAV Versioning). Note that this applies to exposing link metadata in general, not only to links related to versioning.¶
Thanks to the members of Content Management Interoperability Services (CMIS) Technical Committee (TC) at OASIS for the initial proposal, and to Jan Algermissen for feedback during IETF review.¶
The link relations defined in Section 3 correspond to various properties used in WebDAV Versioning [RFC3253] and JCR [JSR-283]:¶
version-history ¶
latest-version ¶
working-copy ¶
working-copy-of ¶
predecessor-version ¶
successor-version ¶
The "Web Linking" specification ([WEB-LINKING]) generalizes Atom link relations, and also reintroduces the HTTP "Link" header as a way to expose link relations in HTTP responses. This will make it possible to expose version links independently from a specific vocabulary, be it the Atom Feed Format ([RFC4287]) or WebDAV properties ([RFC3253]).¶
For instance, a response to a VERSION-CONTROL request ([RFC3253], Section 3.5) could expose a newly created version-history and checked-in version as link relations:¶
>> Request:
VERSION-CONTROL /docs/test.txt HTTP/1.1 Host: example.net
>> Response:
HTTP/1.1 204 No Content Link: </system/v/84345634/1>; rel=latest-version; anchor=</docs/test.txt> Link: </system/vh/84345634>; rel=version-history; anchor=</docs/test.txt>
(Note that in this case, the anchor parameter is used, as the response to a VERSION-CONTROL request is not a representation of the resource at the Request-URI.)
A subsequent HEAD request on that resource could expose the version-history and latest-version relations as well:¶
>> Request:
HEAD /docs/test.txt HTTP/1.1 Host: example.net
>> Response:
HTTP/1.1 200 OK Content-Type: text/plain; charset=UTF-8 Content-Length: 12345 Link: </system/v/84345634/1>; rel=latest-version Link: </system/vh/84345634>; rel=version-history
After creating more versions, following the latest-version would then expose predecessors of a version:¶
>> Request:
HEAD /system/v/84345634/3 HTTP/1.1 Host: example.net
>> Response:
HTTP/1.1 200 OK Content-Type: text/plain; charset=UTF-8 Content-Length: 12323 Link: </system/v/84345634/2>; rel=predecessor-version