RFC 6861

The "create-form" and "edit-form" Link Relations

πŸ“… published January 2013, from ietf

Okay bestie, let's get into it 🫢 This one is an Independent Submission from I. Dzmanashvili, published January 2013. It's Informational, which means it's just sharing info, not a formal Internet Standards Track spec πŸ’… The ISSN is 2070-1721, and it doesn't obsolete or update any other RFCs. πŸŽ€

The whole vibe is about link relations: ways of saying how one resource on the Web connects to another. RFC 5988 is the one that standardized that whole system 🌸 This doc adds two new relation types, "create-form" and "edit-form," which point at input forms for sending data πŸ’œ

Abstract

Okay so RFC 5988 gave us a way to say how resources on the Web are related to each other ✨ This spec adds link relation types that say how a resource is related to an input form for building data submissions πŸ¦‹


Status of This Memo

This document is not an Internet Standards Track specification; it is published for informational purposes. It's giving "just sharing, no pressure" energy 🧚

This is a contribution to the RFC Series, independently of any other RFC stream. The RFC Editor chose to publish it at their discretion, and they make no statement about its value for implementation or deployment. Documents approved for publication by the RFC Editor are not a candidate for any level of Internet Standard; see Section 2 of RFC 5741. Not me making this a standard πŸ’€

Info about the current status, any errata, and how to give feedback can be found at:

http://www.rfc-editor.org/info/rfc6861

Copyright (c) 2013 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) as they were on the date of publication. Please read those carefully, bestie, because they spell out your rights and restrictions for this doc πŸ“œ


1. Introduction 🌸

RFC 5988 [RFC5988] gave us a standard way to show relationships between resources on the Web. This spec defines link relation types that express how a resource relates to an input form for building data submissions πŸ’–

The "create-form" and "edit-form" link relations are intentionally generic. They can be used with multiple media types across a wide variety of use cases 🌈

2. Notational Conventions πŸ“

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. Those are the official requirement words, so pay attention to them πŸ™ˆ

The following link relations are defined.

When included in a response, the "create-form" link relation points to a target resource that represents a form which can be used to append a new member to the link context.

<html>
  <ul>
    <li>Entry Description 1</li>
    <li>Entry Description 2</li>
  </ul>
  <a href="..." rel="create-form">[Add New Entry]</a>
</html>

or, expressed as a Link header:

Link: <...>; rel="create-form"; title="Add New Entry"

If the form representation includes a submission URI, this URI MUST be used to submit the form. The context URI SHOULD be used otherwise.

If the form representation includes a submission method, this method MUST be used for submit requests. HTTP's POST method SHOULD be used otherwise.

When included in a response, the "edit-form" link relation points to a target resource that represents a form which can be used for updating the context resource.

<html>
 ...
 <ul>
   <li>
     Entry Description 1
     <a href="..." rel="edit-form">[Edit Entry]</a>
   </li>
 </ul>
 ...
</html>

or, expressed as a Link header:

Link: <...>; rel="edit-form"; title="Edit Entry"

If the form representation includes a submission URI, this URI MUST be used to submit the form. The context URI SHOULD be used otherwise.

If the form representation includes a submission method, this method MUST be used for submit requests. HTTP's PUT method SHOULD be used otherwise.

3.3. Error-Handling Example ⭐

When submitting forms in an unsupported media type format, the service may respond to the client with HTTP's 415 Unsupported Media Type status code πŸ™ƒ

  HTTP/1.1 415 Unsupported Media Type
  Link: <...>; rel="create-form"; title="Create new entry"
  Content-Type: text/html
  Content-Length: ...

  <html>
    Use <a href="..." rel="create-form">
      this form
    </a> to create a new entry.
  </html>

4. IANA Considerations 🧚

IANA has registered the "create-form" and "edit-form" link relations below, as per [RFC5988].

Relation Name:

create-form

Description:

The target IRI points to a resource where a submission form can be obtained.

Security considerations:

Automated agents should take care when this relation crosses administrative domains (e.g., the URI has a different authority than the current document).

Reference:

See Section 3.

Relation Name:

edit-form

Description:

The target IRI points to a resource where a submission form for editing the associated resource can be obtained.

Security Considerations:

Automated agents should take care when this relation crosses administrative domains (e.g., the URI has a different authority than the current document).

Reference:

See Section 3.

5. Security Considerations πŸ”₯

See Section 7 of RFC 5988 [RFC5988]. Please go read that section, it's where the real security drama lives 😭

6. Internationalisation Considerations 🌈

See Section 8 of RFC 5988 [RFC5988]. Same deal, go check it out πŸ¦‹

7. Normative References πŸ“š

[RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
           Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC5988]  Nottingham, M., "Web Linking", RFC 5988, October 2010.

Appendix A. Acknowledgements πŸ‘‘

The author gratefully acknowledges the contributions of Jan Algermissen. Iconic shoutout 🫢

Author's Address ✨

Ioseb Dzmanashvili

EMail: ioseb.dzmanashvili@gmail.com

πŸ“¦ where this page comes from