Network Working Group I. Dzmanashvili Internet-Draft October 16, 2012 Expires: April 19, 2013 The Create-Form and Edit-Form Link Relations draft-ioseb-dzmanashvili-link-relation-08 Abstract RFC 5988 [RFC5988] defined the way of indicating resources on the Web. This specification defines link relation types which may be used to express the relationships between a resource and an input form for constructing data submissions. Editorial Note (To be removed by RFC Editor) Distribution of this document is unlimited. Comments should be sent to the IETF Apps-Discuss mailing list (see ). Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on April 19, 2013. 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 Dzmanashvili Expires April 19, 2013 [Page 1] Internet-Draft The Create-Form and Edit-Form October 2012 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. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Notational Conventions . . . . . . . . . . . . . . . . . . . . 3 3. Link Relations . . . . . . . . . . . . . . . . . . . . . . . . 3 3.1. The "create-form" Link Relation Type . . . . . . . . . . . 3 3.1.1. Using the "create-form" Link Relation . . . . . . . . . 3 3.2. The "edit-form" Link Relation Type . . . . . . . . . . . . 4 3.2.1. Using the "edit-form" Link Relation . . . . . . . . . . 4 3.3. Error Handling Example . . . . . . . . . . . . . . . . . . 5 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5 4.1. The Link Relation Registration "create-form" . . . . . . . 5 4.2. The Link Relation Registration "edit-form" . . . . . . . . 5 5. Security Considerations . . . . . . . . . . . . . . . . . . . . 6 6. Internationalisation Considerations . . . . . . . . . . . . . . 6 7. Normative References . . . . . . . . . . . . . . . . . . . . . 6 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . . 6 Dzmanashvili Expires April 19, 2013 [Page 2] Internet-Draft The Create-Form and Edit-Form October 2012 1. Introduction RFC 5988 [RFC5988] defined the way of indicating resources on the Web. This specification defines link relation types which may be used to express the relationships between a resource and an input form for constructing data submissions. The "create-form" and "edit-form" link relations are intentionally generic, and they can be used with multiple media types in 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]. 3. Link Relations The following link relations are defined. 3.1. The "create-form" Link Relation Type When included in a response, the "create-form" link relation indicates a target resource that represents a form that can be used to append a new member to the link context. [Add New Entry] or, expressed as a Link header Link: <...>; rel="create-form"; title="Add New Entry" 3.1.1. Using the "create-form" Link Relation 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. Dzmanashvili Expires April 19, 2013 [Page 3] Internet-Draft The Create-Form and Edit-Form October 2012 3.2. The "edit-form" Link Relation Type When included in a response, the "edit-form" link relation indicates a target resource that represents a form that can be used for updating the context resource. ... ... or, expressed as a Link header Link: <...>; rel="edit-form"; title="Edit Entry" 3.2.1. Using the "edit-form" Link Relation 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. Dzmanashvili Expires April 19, 2013 [Page 4] Internet-Draft The Create-Form and Edit-Form October 2012 3.3. Error Handling Example When submitting forms in unsupported media type format, 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: ... Use this form to create a new entry. 4. IANA Considerations IANA is asked to register the "create-form" and "edit-form" link relations below as per [RFC5988]. 4.1. The Link Relation Registration "create-form" 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. 4.2. The Link Relation Registration "edit-form" Relation Name: Dzmanashvili Expires April 19, 2013 [Page 5] Internet-Draft The Create-Form and Edit-Form October 2012 edit-form Description: The target IRI points to a resource where a submission form for editing 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 RFC5988 [RFC5988]. 6. Internationalisation Considerations See Section 8 of RFC5988 [RFC5988]. 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. Author's Address Ioseb Dzmanashvili EMail: ioseb.dzmanashvili@gmail.com Dzmanashvili Expires April 19, 2013 [Page 6]