RFC 6573

The Item and Collection Link Relations

πŸ“… published April 2012, from ietf

okay bestie, RFC 6573 πŸŽ€ was written by Mike Amundsen and published in April 2012. It's Informational, so it's just here to share info, not a Standards Track thing 🌸 It's also ISSN 2070-1721. The header doesn't list anything it obsoletes or updates, so it's doing its own thing ✨

Abstract

RFC 5988 gave us a way to say how resources on the Web relate to each other πŸ¦‹ This doc adds a pair of reciprocal link relation types that can describe the relationship between a collection and its members 🫢


Status of This Memo

This doc is not an Internet Standards Track spec. It's published for info purposes πŸ“š

It's a product of the IETF, which means it has the consensus of the IETF community, got public review, and was approved for publication by the Internet Engineering Steering Group (IESG). Not every IESG-approved doc is a candidate for any level of Internet Standard, though. See Section 2 of RFC 5741 πŸ’…

For the current status, errata, and how to give feedback, check http://www.rfc-editor.org/info/rfc6573 πŸ”

Copyright (c) 2012 IETF Trust and the persons identified as the document authors. All rights reserved. ©️

This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as in effect on the date of publication. Please read them carefully, because they spell out your rights and restrictions for this doc πŸ“œ Code Components extracted from this doc must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Simplified BSD License 🫢

1. Introduction ✨

RFC 5988 gave us a way to say how resources on the Web relate to each other. This doc 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 used in a wide range of use cases across multiple media types. For example, the 'collection' and 'item' link relation types show up 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]

The following link relations are defined, bestie πŸ’œ

2.1. 'item'

When it's included in a resource that represents a collection, the 'item' link relation identifies a target resource that represents a member of that collection. It's giving organized πŸ“¦

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"

2.2. 'collection'

When it's included in a resource that represents a member of a collection, the 'collection' link relation identifies a target resource that represents a collection that the context resource is a member of. Main character energy πŸ‘‘

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

<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 a resource could be a member of multiple collections, multiple 'collection' link relations may appear in the same representation πŸ’…

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

The target resource representation doesn't need to be restricted to representing a list. It may simply be a document that gives details on the collection the context resource is a member of πŸ“–

Link: <...>; rel="collection";
      title="Shakespeare's Collected Works - A History"

It should also be noted that the same link might represent an 'item' in one collection as well as a 'collection' itself. In this case, both link relation values can be applied to the same link 🀯

Link: <...>; rel="collection item";
      title="A Review of Issac Asimov's Collected Works - Vol. I"

3. IANA Considerations 🌈

IANA has registered the 'collection' and 'item' link relations below, as per [RFC5988].

  • Relation Name: item
  • Description: The target IRI points to a resource that is a member of the collection represented by the context IRI.
  • Reference: See Section 2
  • Relation Name: collection
  • Description: The target IRI points to a resource that represents the collection resource for the context IRI.
  • Reference: See Section 2

4. Security Considerations πŸ”’

The two link relation types defined in this doc don't introduce any new security issues beyond the ones discussed in Section 7 of RFC5988 [RFC5988]. Still, go check that section, it's serious business πŸ™ˆ

5. Internationalisation Considerations 🌍

The 'item' and 'collection' link relation types don't have any internationalization considerations other than the ones discussed in Section 8 of RFC5988 [RFC5988] 🫢

6. References πŸ“š

6.1. Normative References

6.2. Informative References

Appendix A. Acknowledgements πŸ’œ

The author gratefully acknowledges the contributions of Julian Reschke and Mykyta Yevstifeyev. Iconic team effort 🫢

Author's Address πŸ¦‹

Mike Amundsen

πŸ“¦ where this page comes from