idnits 2.17.1 draft-snell-activitystreams-actions-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (December 12, 2013) is 3781 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'RFC2119' is defined on line 539, but no explicit reference was found in the text == Outdated reference: A later version (-09) exists of draft-snell-activitystreams-05 Summary: 0 errors (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Activity Streams (http://activitystrea.ms) J. Snell 3 Internet-Draft IBM 4 Intended status: Standards Track M. Marum 5 Expires: June 15, 2014 SugarCRM 6 December 12, 2013 8 JSON Activity Streams 2.0 - Action Handlers 9 draft-snell-activitystreams-actions-00 11 Abstract 13 This specification defines Action Handlers for use with the Activity 14 Streams 2.0 format. 16 Author's Note 18 Note that this document is a work-in-progress draft specification 19 that does not yet represent a "standard". It is the intention of 20 this specification to propose a few new ideas and openly solicit 21 feedback on their definition and use. While this document might 22 eventually evolve into an RFC the ideas described herein have not yet 23 been broadly implemented and have definitions that will evolve 24 through successive iterations of this draft. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on June 15, 2014. 43 Copyright Notice 45 Copyright (c) 2013 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 2 61 2. Common Action Handler Properties . . . . . . . . . . . . . . 2 62 3. HTTP Action Handler . . . . . . . . . . . . . . . . . . . . . 3 63 4. Embed Action Handler . . . . . . . . . . . . . . . . . . . . 6 64 5. Intent Action Handler . . . . . . . . . . . . . . . . . . . . 8 65 6. HTML Form Objects . . . . . . . . . . . . . . . . . . . . . . 9 66 7. URL Template Objects . . . . . . . . . . . . . . . . . . . . 10 67 8. Parameters Object . . . . . . . . . . . . . . . . . . . . . . 10 68 9. Styles Object . . . . . . . . . . . . . . . . . . . . . . . . 11 69 10. Security Considerations . . . . . . . . . . . . . . . . . . . 13 70 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 71 12. Normative References . . . . . . . . . . . . . . . . . . . . 13 72 Appendix A. Using Action Handlers From Other Vocabularies . . . 13 73 A.1. Schema.org Actions Proposal . . . . . . . . . . . . . . . 13 74 A.2. Google's "Actions in the Inbox" . . . . . . . . . . . . . 14 75 A.3. Mixing Vocabularies . . . . . . . . . . . . . . . . . . . 15 76 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 15 78 1. Overview 80 TBD 82 2. Common Action Handler Properties 84 Common base properties available for all Action Handler objects: 86 +-----------+-----------------------------+-------------------------+ 87 | Property | Value | Description | 88 +-----------+-----------------------------+-------------------------+ 89 | confirm | Boolean | Optional. True if | 90 | | | confirmation is | 91 | | | required before the | 92 | | | action is carried out. | 93 | context | JSON Object | Contextual information | 94 | | | associated with the | 95 | | | action handler, | 96 | | | represented as a JSON | 97 | | | Object with no | 98 | | | particular structure. | 99 | | | How the context is used | 100 | | | is dependent entirely | 101 | | | on the action handler | 102 | | | definition and on how | 103 | | | an application chooses | 104 | | | to implement the Action | 105 | | | Handler. | 106 | expects | Type Value [I-D.snell- | For action handlers | 107 | | activitystreams] | with a distinct input | 108 | | | requirement (e.g. | 109 | | | HttpActionHandler), the | 110 | | | expects property | 111 | | | provides a description | 112 | | | of the expected input. | 113 | returns | Type Value [I-D.snell- | For action handlers | 114 | | activitystreams] | with a distinct output, | 115 | | | the returns property | 116 | | | provides a description | 117 | | | of the expected output. | 118 +-----------+-----------------------------+-------------------------+ 120 3. HTTP Action Handler 122 +-------------+-------------------------+---------------------------+ 123 | Property | Value | Description | 124 +-------------+-------------------------+---------------------------+ 125 | url | Link Value | Required. | 126 | method | HTTP Method String | Optional. Defaults to | 127 | | (e.g. "GET", "POST", | "GET" | 128 | | "PUT", etc) | | 129 | objectType | "HttpActionHandler" | | 130 | target | "DEFAULT", "NONE", | Optional. Specifies the | 131 | | "NEW", "CURRENT", or | intended target of the | 132 | | other token value | HTTP action. This | 133 | | | determines whether the | 134 | | | action results in a new | 135 | | | navigation context (e.g. | 136 | | | new browser window) or | 137 | | | whether the action is | 138 | | | "hidden". Defaults to | 139 | | | "DEFAULT". | 140 +-------------+-------------------------+---------------------------+ 141 Example: 143 { 144 "objectType": "note", 145 ..., 146 "actions": { 147 "view": { 148 "objectType": "HttpActionHandler", 149 "url": "http://example.org/foo", 150 "method": "GET" 151 } 152 } 153 } 155 Equivalent: 157 { 158 "objectType": "note", 159 ..., 160 "actions": { 161 "view": "http://example.org/foo" 162 } 163 } 165 "GET" HttpActionHandler using a URL Template: 167 { 168 "objectType": "note", 169 ..., 170 "actions": { 171 "review": { 172 "objectType": "HttpActionHandler", 173 "url": { 174 "objectType": "UrlTemplate", 175 "template": "http://example.org/note/123{?rating}", 176 "parameters": { 177 "rating": { 178 "id": "http://schema.org/ratingValue", 179 "displayName": "Rating", 180 "bestRating": 5, 181 "worstRating": 1 182 } 183 } 184 }, 185 "method": "GET", 186 "target": "NEW" 187 } 188 } 189 } 191 "GET" HttpActionHandler shortcut using a URL Template: 193 { 194 "objectType": "note", 195 ..., 196 "actions": { 197 "review": { 198 "objectType": "UrlTemplate", 199 "template": "http://example.org/note/123{?rating}", 200 "parameters": { 201 "rating": { 202 "id": "http://schema.org/ratingValue", 203 "displayName": "Rating", 204 "bestRating": 5, 205 "worstRating": 1 206 } 207 } 208 } 209 } 210 } 212 4. Embed Action Handler 214 +--------------+--------------------------+-------------------------+ 215 | Property | Value | Description | 216 +--------------+--------------------------+-------------------------+ 217 | url | Link Value | Required if "content" | 218 | | | is not specified. URL | 219 | | | from which to retrieve | 220 | | | the content for this | 221 | | | embed. | 222 | content | String | Required if "url" is | 223 | | | not specified. Textual | 224 | | | content for this embed. | 225 | mediaType | MIME Media Type | The MIME Media Type of | 226 | | | the embedded content. | 227 | style | Styles Object (Section | Optional CSS Styling | 228 | | 9) | hints to apply to the | 229 | | | element containing the | 230 | | | embedded content. | 231 | preview | Link Value | Optional | 232 | objectType | "EmbedActionHandler" | | 233 | target | "DEFAULT", "INLINE" or | | 234 | | other | | 235 +--------------+--------------------------+-------------------------+ 237 Example: 239 { 240 "objectType": "note", 241 ..., 242 "actions": { 243 "view": { 244 "objectType": "EmbedActionHandler", 245 "content": "