The Item and Collection Link Relations
RFC 6573

Document Type RFC - Informational (April 2012; No errata)
Last updated 2013-02-12
Stream IETF
Formats plain text pdf html
Stream WG state (None)
Consensus Unknown
Document shepherd No shepherd assigned
IESG IESG state RFC 6573 (Informational)
Telechat date
Responsible AD Barry Leiba
Send notices to mca@amundsen.com, draft-amundsen-item-and-collection-link-relations@ietf.org, stpeter@stpeter.im
Internet Engineering Task Force (IETF)                       M. Amundsen
Request for Comments: 6573                                    April 2012
Category: Informational
ISSN: 2070-1721

                 The Item and Collection Link Relations

Abstract

   RFC 5988 standardized a means of indicating the relationships between
   resources on the Web. This specification defines a pair of reciprocal
   link relation types that may be used to express the relationship
   between a collection and its members.

Status of This Memo

   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/rfc6573.

Copyright Notice

   Copyright (c) 2012 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.

Amundsen                      Informational                     [Page 1]
RFC 6573         The Item and Collection Link Relations       April 2012

1.  Introduction

   RFC 5988 standardized a means of indicating the relationships between
   resources on the Web. This specification defines a pair of reciprocal
   link relation types that may be used to express the relationship
   between a collection and its members.

   These link relation types can be applied to a wide range of use cases
   across multiple media types.  For example, the 'collection' and
   'item' link relation types are used in these media types:

   1.  OpenSearch 1.1: see Section 4.5.4.1 of [OpenSearch]

   2.  Maze+XML: see [Maze]

   3.  Collection+JSON: see [CollectionJSON]

2.  Link Relations

   The following link relations are defined.

2.1.  'item'

   When included in a resource that represents a collection, the 'item'
   link relation identifies a target resource that represents a member
   of that collection.

   For example, if a resource represents a catalog of products, that
   same representation may include one or more links to resources that
   represent members of that catalog.

   <html>
   ...
     <h1>Product Group X Listing</h1>
     ...
     <a href="..." rel="item">View Product X001</a>
     <a href="..." rel="item">View Product X002</a>
     ...
   </html>

   or, in the case of a Link Header field

   Link: <...>; rel="item"; title="View Product X001"
   Link: <...>; rel="item"; title="View Product X002"

Amundsen                      Informational                     [Page 2]
RFC 6573         The Item and Collection Link Relations       April 2012

2.2.  'collection'

   When included in a resource that represents a member of a collection,
   the 'collection' link relation identifies a target resource that
   represents a collection of which the context resource is a member.

   For example, if a resource represents a single product in a catalog,
   that same representation may include a link to a resource that
   represents a product group to which this single product belongs:

   <a href="..." rel="collection">Return to Product Group X</a>

   or, in the case of a Link Header field

   Link: <...>; rel="collection"; title="Return to Product Group X"

   Since it is possible that a resource could be a member of multiple
   collections, multiple 'collection' link relations may appear within
   the same representation:

   <a href="..." rel="collection">View other widgets</a>
   <a href="..." rel="collection">View all discontinued items</a>
Show full document text