Network Working Group I. Dzmanashvili Internet-Draft January 31, 2013 Intended status: Informational Expires: August 4, 2013 The "action" Link Relation draft-ioseb-dzmanashvili-action-link-relation-00 Abstract RFC 5988 [RFC5988] defined the way of indicating resources on the Web. This specification defines link relation type that may be used to express the relationships between a resource and associated actions that may be performed against context resource. 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 August 4, 2013. Copyright Notice 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) in effect on the date of publication of this document. Please review these documents Dzmanashvili Expires August 4, 2013 [Page 1] Internet-Draft The action Link Relation January 2013 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. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Notational Conventions . . . . . . . . . . . . . . . . . . . . 3 3. Link Relations . . . . . . . . . . . . . . . . . . . . . . . . 3 3.1. The "action" Link Relation Type . . . . . . . . . . . . . . 3 3.1.1. Using the "action" Link Relation . . . . . . . . . . . 5 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5 4.1. The Link Relation Registration "action" . . . . . . . . . . 6 5. Security Considerations . . . . . . . . . . . . . . . . . . . . 6 6. Internationalisation Considerations . . . . . . . . . . . . . . 6 7. Normative References . . . . . . . . . . . . . . . . . . . . . 6 Dzmanashvili Expires August 4, 2013 [Page 2] Internet-Draft The action Link Relation January 2013 1. Introduction RFC 5988 [RFC5988] defined the way of indicating resources on the Web. This specification defines link relation type that may be used to express the relationships between a resource and associated actions that may be performed against context resource. The "action" link relation is intentionally generic, and it 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 "action" Link Relation Type When included in a response, the "action" link relation indicates a target resource that is responsible for performing action which MAY: o Affect state of the context resource; or o Initiate process. The "action" link relation can be used to indicate the availability of actions that MAY be performed by the target resource. Examples of such actions include: o Enable/disable o Publish/unpublish o Reset resource to its initial state o Restart service o Replicate or migrate data Dzmanashvili Expires August 4, 2013 [Page 3] Internet-Draft The action Link Relation January 2013 Example "action" link expressed as a Link header field: Link: ; rel="action"; title="Publish" Actual function to be performed by the server, MAY be advertised by including an extension link relation types as defined per Section 4.2 of [RFC5988]. For example: Link: ; rel="action http://rels.domain.org/publish"; title="Publish" indicates that a target resource is responsible for accepting request and performing action(signified by the "action" link relation), and the "http://rels.domain.org/publish" extension link relation indicates that successful request will change the state of the context resource from unpublished to published. Dzmanashvili Expires August 4, 2013 [Page 4] Internet-Draft The action Link Relation January 2013 3.1.1. Using the "action" Link Relation In order to perform action, clients SHOULD send an empty POST request to the target resource. Interaction Diagram: Client Server | | | 1) POST to Target URI | |-------------------------------------->| | | | 2) Validate Request | | +-------------------| | | | | +------------------>| | | | 2.1) If Error: Respond with | | a 4xx status code | |<--------------------------------------| | | | 3) Perform Requested Action | | +-------------------| | | | | +------------------>| | | | 4) Respond with a 2xx or 3xx | | Status Code | |<--------------------------------------| 1. The client sends an empty POST request to the target URI. 2. The server validates request. 2.1. If error, the server responds with a 4xx status code. 3. The server performs requested action. 4. The server responds with a 2xx or 3xx status code. 4. IANA Considerations IANA is asked to register the "action" link relation below as per [RFC5988]. Dzmanashvili Expires August 4, 2013 [Page 5] Internet-Draft The action Link Relation January 2013 4.1. The Link Relation Registration "action" Relation Name: action Description: The target IRI points to a resource that is responsible to perform an action that may affect state of the context resource or initiate process. 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. Author's Address Ioseb Dzmanashvili EMail: ioseb.dzmanashvili@gmail.com Dzmanashvili Expires August 4, 2013 [Page 6]