Network Working Group I. Dzmanashvili
Internet-Draft May 12, 2012
Expires: November 13, 2012
The Create-Form and Update-Form Link Relations
draft-ioseb-dzmanashvili-link-relation-04
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 entry submissions, or between any kind of entry and a
pre-populated input form for modifying the associated entry.
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
<https://www.ietf.org/mailman/listinfo/apps-discuss>).
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 November 13, 2012.
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
Dzmanashvili Expires November 13, 2012 [Page 1]
Internet-Draft The Create-Form and Update-Form May 2012
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.
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 entry submissions, or between any kind of entry and a
pre-populated input form for modifying the associated entry.
The 'create-form' and 'update-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. create-form
When included in a resource, the 'create-form' link relation MAY
identify a target resource that represents the form 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"
Dzmanashvili Expires November 13, 2012 [Page 2]
Internet-Draft The Create-Form and Update-Form May 2012
3.1.1. Using the 'create-form' link relation
If the media type, used for constructing submission form, supports
target URI information provisioning, explicitly specified target URI
MUST be used by clients for submitting the populated form. Context
URI MUST be used otherwise.
If the media type, used for constructing submission form, supports
method information provisioning, explicitly specified request method
MUST be used by clients for submitting the populated form. HTTP's
POST method MUST be used otherwise.
If the media type, used for constructing submission form, supports
content encoding information provisioning, form data MUST be encoded
according to the explicitly specified encoding type before
submission. The media type used for constructing form MUST be used
otherwise.
When submitting forms in unsupported media type format, service
SHOULD respond to the client with HTTP's 415 Unsupported Media Type
status code. See example below:
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>
3.2. update-form
When included in a resource which represents particular entry, the
'update-form' link relation identifies a target resource that
represents a pre-populated form for editing associated entry.
<html>
...
<ul>
<li>
Entry Description 1
<a href="..." rel="update-form">[Edit Entry]</a>
</li>
</ul>
...
Dzmanashvili Expires November 13, 2012 [Page 3]
Internet-Draft The Create-Form and Update-Form May 2012
</html>
or, expressed as a Link header
Link: <...>; rel="update-form"; title="Edit Entry"
3.2.1. Using the 'update-form' link relation
If the media type, used for constructing submission form, supports
target URI information provisioning, explicitly specified target URI
MUST be used by clients for submitting the populated form. Context
URI MUST be used otherwise.
If the media type, used for constructing submission form, supports
method information provisioning, explicitly specified request method
MUST be used by clients for submitting the populated form. HTTP's
PUT method MUST be used otherwise.
If the media type, used for constructing submission form, supports
content encoding information provisioning, form data MUST be encoded
according to the explicitly specified encoding type before
submission. The media type used for constructing form MUST be used
otherwise.
When submitting forms in unsupported media type format, service
SHOULD respond to the client with HTTP's 415 Unsupported Media Type
status code. See example below:
HTTP/1.1 415 Unsupported Media Type
Link: <...>; rel="update-form"; title="Edit entry"
Content-Type: text/html
Content-Length: ...
<html>
Use <a href="..." rel="update-form">
this form
</a> to update the entry.
</html>
4. IANA Considerations
IANA is asked to register the 'create-form' and 'update-form' link
relations below as per [RFC5988].
Dzmanashvili Expires November 13, 2012 [Page 4]
Internet-Draft The Create-Form and Update-Form May 2012
4.1. 'create-form' Link Relation Registration
Relation Name:
form
Description:
The target IRI points to a resource that is a representation of a
valid submission form for the data described by the form resource
representation.
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 2.
4.2. 'update-form' Link Relation Registration
Relation Name:
update-form
Description:
The target IRI points to a resource that is a representation of a
valid pre-populated submission form for editing the data
represented by the associated entry.
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 2.
Dzmanashvili Expires November 13, 2012 [Page 5]
Internet-Draft The Create-Form and Update-Form May 2012
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 November 13, 2012 [Page 6]