Network Working Group I. Dzmanashvili Internet-Draft August 27, 2013 Intended status: Informational Expires: February 28, 2014 The "action" Link Relation draft-ioseb-dzmanashvili-action-link-relation-01 Abstract RFC 5988 [RFC5988] standardized a means of indicating the relationships between resources on the Web. This specification defines the "action" link relation type that may be used to express the relationships between a resource and associated actions that may be performed against the 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 February 28, 2014. 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 Dzmanashvili Expires February 28, 2014 [Page 1] Internet-Draft The action Link Relation August 2013 publication of this document. Please review these documents 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. The "action" Link Relation Type . . . . . . . . . . . . . . . . 3 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5 4.1. The Link Relation Registration "action" . . . . . . . . . . 5 4.2. Action Type Registry . . . . . . . . . . . . . . . . . . . 5 4.2.1. Initial Registry Contents . . . . . . . . . . . . . . . 5 5. Security Considerations . . . . . . . . . . . . . . . . . . . . 6 6. Internationalisation Considerations . . . . . . . . . . . . . . 6 7. Normative References . . . . . . . . . . . . . . . . . . . . . 6 Dzmanashvili Expires February 28, 2014 [Page 2] Internet-Draft The action Link Relation August 2013 1. Introduction RFC 5988 [RFC5988] standardized a means of indicating the relationships between resources on the Web. This specification defines the "action" link relation type that may be used to express the relationships between a resource and associated actions that may be performed against the 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. 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 type can be used to indicate the availability of actions supported by the target resource. Examples of such actions include: o Enable/Disable o Publish/Unpublish o Start/Stop The "action" link relation type doesn't convey any semantics other than that an indicated resources represent machine readable description of a particular action and representation SHOULD contain all necessary details such as: request method, action URI and other related details to enable agents to be able to construct requests without relying on out-of-band information. Exact type of action SHOULD be indicated through the "action-type" link-extension value as per [RFC5988] and for maintaining shared understanding of action types current specification introduces the registry of actions with initial values of widely accepted and well understood action types. For example, if a resource represents a service, that same representation may include links to resources that represent actions Dzmanashvili Expires February 28, 2014 [Page 3] Internet-Draft The action Link Relation August 2013 supported by the service: Link: ; rel="action"; action-type="restart" Link: ; rel="action"; action-type="stop" In order to perform action, agent SHOULD dereference a resource that represents action, construct a request according to the rules provided in action description and send the request to the server. Performing action may include several steps as shown in the interaction diagram below: Interaction Diagram: Client Server | | | 1) GET to Target URI | |-------------------------------------->| | | | 2) Respond with a Corresponding | | Status Code | |<--------------------------------------| | | | 3) Construct Action Request | |-------------------+ | | | | |<------------------+ | | | | 4) Send Action Request | | to Target URI | |-------------------------------------->| | | | 5) Validate Action Request | | +-------------------| | | | | +------------------>| | | | 6) Perform Requested Action | | +-------------------| | | | | +------------------>| | | | 7) Respond with a 2xx or 3xx | | Status Code | |<--------------------------------------| | | Dzmanashvili Expires February 28, 2014 [Page 4] Internet-Draft The action Link Relation August 2013 1. The client sends a GET request to retrieve representation that describes the action. 2. The server responds with representation describing the action. 3. The client constructs request according to action representation. 4. The client sends action request to the server. 5. The server validates request. 6. The server performs requested action. 7. 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]. 4.1. The Link Relation Registration "action" Relation Name: action Description: The target IRI points to a resource identifying an action supported by the link's context. 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. Action Type Registry This specification establishes the Action Type Registry. The registration template is: o Action Type Name: o Description: o Reference: 4.2.1. Initial Registry Contents The Action Type registry's initial contents are: o Action Type Name: publish Dzmanashvili Expires February 28, 2014 [Page 5] Internet-Draft The action Link Relation August 2013 o Description: [TBD] o Reference: this o Action Type Name: unpublish o Description: [TBD] o Reference: this o Action Type Name: start o Description: [TBD] o Reference: this o Action Type Name: stop o Description: [TBD] o Reference: this o Action Type Name: restart o Description: [TBD] o Reference: this o Action Type Name: reset o Description: [TBD] o Reference: this o Action Type Name: enable o Description: [TBD] o Reference: this o Action Type Name: disable o Description: [TBD] o Reference: this 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. Dzmanashvili Expires February 28, 2014 [Page 6] Internet-Draft The action Link Relation August 2013 Author's Address Ioseb Dzmanashvili EMail: ioseb.dzmanashvili@gmail.com Dzmanashvili Expires February 28, 2014 [Page 7]