idnits 2.17.1 draft-snell-activitystreams-actions-06.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 (May 13, 2014) is 3635 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. 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 1286, but no explicit reference was found in the text == Outdated reference: A later version (-09) exists of draft-snell-activitystreams-07 Summary: 0 errors (**), 0 flaws (~~), 4 warnings (==), 2 comments (--). 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: November 14, 2014 SugarCRM 6 May 13, 2014 8 JSON Activity Streams 2.0 - Action Handlers 9 draft-snell-activitystreams-actions-06 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 November 14, 2014. 43 Copyright Notice 45 Copyright (c) 2014 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. Action Handlers . . . . . . . . . . . . . . . . . . . . . . . 3 62 2.1. Content Security Policy . . . . . . . . . . . . . . . . . 6 63 3. HTTP Action Handler . . . . . . . . . . . . . . . . . . . . . 8 64 4. View Action Handler . . . . . . . . . . . . . . . . . . . . . 11 65 5. Embed Action Handler . . . . . . . . . . . . . . . . . . . . 14 66 6. Intent Action Handler . . . . . . . . . . . . . . . . . . . . 17 67 7. Using "service" and "application" objects as action handlers 17 68 8. HTML Form Objects . . . . . . . . . . . . . . . . . . . . . . 18 69 9. Typed Payload Objects . . . . . . . . . . . . . . . . . . . . 19 70 10. URL Template Objects . . . . . . . . . . . . . . . . . . . . 20 71 11. Parameters Object . . . . . . . . . . . . . . . . . . . . . . 21 72 11.1. The Parameter Object . . . . . . . . . . . . . . . . . . 22 73 11.2. Using UrlTemplate and TypedPayload objects as parameter 74 descriptions . . . . . . . . . . . . . . . . . . . . . . 26 75 12. Authentication Object . . . . . . . . . . . . . . . . . . . . 27 76 13. Styles Object . . . . . . . . . . . . . . . . . . . . . . . . 28 77 14. Security Considerations . . . . . . . . . . . . . . . . . . . 30 78 15. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 30 79 16. Normative References . . . . . . . . . . . . . . . . . . . . 30 80 Appendix A. Using Action Handlers From Other Vocabularies . . . 31 81 A.1. Schema.org Actions Proposal . . . . . . . . . . . . . . . 31 82 A.2. Google's "Actions in the Inbox" . . . . . . . . . . . . . 31 83 A.3. Mixing Vocabularies . . . . . . . . . . . . . . . . . . . 32 84 A.4. Example Drawing From Multiple Vocabularies . . . . . . . 33 85 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 35 87 1. Overview 89 The Activity Streams 2.0 [I-D.snell-activitystreams] specification 90 introduces the notion of "actions" that can be associated with 91 objects. Using the "actions" property described in Sections 3.6 and 92 3.6.1 of the Activity Streams 2.0 document, the producer of an object 93 can declare a specific set of verbs appropriate for the object and 94 map each of those to one or more objects ("action handlers") or 95 resources capable of "carrying out" the verb. This document expands 96 on that mechanism by defining and describing a core set of action 97 handler object types. 99 2. Action Handlers 101 An action handler is an Activity Streams 2.0 object whose objectType 102 and member properties instruct a consuming application how to carry 103 out the verb the action handler has been associated with. For 104 instance, given the following example: 106 { 107 "objectType": "note", 108 "displayName": "Title of the note", 109 "content": "This is a simple note.", 110 "actions": { 111 "share": { 112 "objectType": "ViewActionHandler", 113 "url": "http://example.org/share", 114 "target": "_blank" 115 }, 116 "like": { 117 "objectType": "EmbedActionHandler", 118 "mediaType": "text/plain", 119 "content": "Hello World" 120 } 121 } 122 } 124 The "note" object has two declared actions, "share" and "like". Each 125 of those is associated with one action handler object. The "share" 126 action has a action handler of type "ViewActionHandler", while the 127 "like" action has an "EmbedActionHandler". 129 As illustrated in the example, action handlers are represented as 130 Activity Streams 2.0 objects. All such objects share a common set of 131 base member properties as defined in the following table: 133 +----------+-----------------------------+--------------------------+ 134 | Property | Value | Description | 135 +----------+-----------------------------+--------------------------+ 136 | confirm | Boolean | True if the consuming | 137 | | | application ought to | 138 | | | seek confirmation prior | 139 | | | to using the action | 140 | | | handler to carry out | 141 | | | it's associated action. | 142 | | | Defaults to False. | 143 | context | JSON Object | Contextual information | 144 | | | associated with the | 145 | | | action handler, | 146 | | | represented as a JSON | 147 | | | Object without any | 148 | | | particular structure. | 149 | | | How the context is used | 150 | | | is dependent entirely on | 151 | | | the action handler | 152 | | | definition and on how a | 153 | | | consuming application | 154 | | | chooses to implement the | 155 | | | action handler. | 156 | expects | Link Value | For action handlers with | 157 | | [I-D.snell-activitystreams] | a distinct input | 158 | | | requirement (e.g. | 159 | | | HttpActionHandler), the | 160 | | | expects property | 161 | | | provides a description | 162 | | | of the expected input. | 163 | | | The value is expressed | 164 | | | as either a String | 165 | | | containing a fully | 166 | | | qualified IRI, an | 167 | | | Activity Stream Object, | 168 | | | or an Array of IRI's or | 169 | | | Objects. When multiple | 170 | | | values are provided, | 171 | | | they MUST be considered | 172 | | | as mutually exclusive | 173 | | | alternatives. | 174 | returns | Link Value | For action handlers with | 175 | | [I-D.snell-activitystreams] | a distinct output, the | 176 | | | returns property | 177 | | | provides a description | 178 | | | of the expected output. | 179 | | | The value is expressed | 180 | | | as either a String | 181 | | | containing a fully | 182 | | | qualified IRI, an | 183 | | | Activity Stream Object, | 184 | | | or an Array of IRI's or | 185 | | | Objects. When multiple | 186 | | | values are provided, | 187 | | | they MUST be considered | 188 | | | as mutually exclusive | 189 | | | alternatives. | 190 | auth | Authentication Value | For action handlers with | 191 | | (Section 12) | specific authentication | 192 | | | requirements, the "auth" | 193 | | | property provides | 194 | | | information about the | 195 | | | specific authentication | 196 | | | mechanisms supported. | 197 | requires | Link Value | An optional Link Value | 198 | | [I-D.snell-activitystreams] | whose value(s) describe | 199 | | | features or behaviors an | 200 | | | implementation MUST | 201 | | | support in order to | 202 | | | carry out the action. | 203 | | | Requirements are | 204 | | | designed to be | 205 | | | intentionally open-ended | 206 | | | and will vary depending | 207 | | | on specific Action | 208 | | | Handler type. Any | 209 | | | implementation that does | 210 | | | not support any | 211 | | | specified required | 212 | | | feature MUST ignore the | 213 | | | Action Handler. | 214 | prefers | Link Value | An optional Link Value | 215 | | [I-D.snell-activitystreams] | whose value(s) describe | 216 | | | features or behaviors an | 217 | | | implementation SHOULD | 218 | | | support in order to | 219 | | | carry out the action. | 220 | | | Requirements are | 221 | | | designed to be | 222 | | | intentionally open-ended | 223 | | | and will vary depending | 224 | | | on specific Action | 225 | | | Handler type. Any | 226 | | | implementation that does | 227 | | | not support any | 228 | | | specified preferred | 229 | | | feature MAY ignore the | 230 | | | feature. | 231 +----------+-----------------------------+--------------------------+ 233 This specification defines four specific base types of action 234 handler: 236 o The HTTP Action Handler (Section 3), 238 o The View Action Handler (Section 4), 239 o The Embed Action Handler (Section 5), and 241 o The Intent Action Handler (Section 6). 243 Implementations are free to use Activity Stream objects of any 244 objectType as an action handler. Consuming applications MAY ignore 245 any object it encounters that use objectTypes that are not recognized 246 or supported as action handlers. Alternatively, the consuming 247 application MAY treat such objects as implied Intent Action Handlers 248 (Section 6). 250 Multiple independent action handlers can be associated with any 251 single verb using a JSON Array. The ordering of objects within such 252 an array is not considered to be significant. 254 For example, in the following, the "share" action has two associated 255 action handlers: 257 { 258 "objectType": "event", 259 "displayName": "Party!", 260 "content": "We're going to party like it's 1999!", 261 "id": "urn:example:events:123", 262 "actions": { 263 "share": [ 264 { 265 "objectType": "HttpActionHandler", 266 "method": "POST", 267 "url": "http://example.org/share-this/123", 268 "returns": { 269 "objectType": "TypedPayload", 270 "mediaType": "text/html" 271 } 272 }, 273 { 274 "objectType": "EmbedActionHandler", 275 "mediaType": "text/html", 276 "content": "
...
" 277 } 278 ] 279 } 280 } 282 2.1. Content Security Policy 284 Note that all Action Handler types are subject to any relevant active 285 Content Security Policy [W3C.WD-CSP11-20140211], or CSP, that is in- 286 scope for the context in which the Action Handler is being invoked. 288 The specific CSP directive that applies to a particular action 289 handler type may vary depending on the Action Handler's objectType. 291 Because the successful application of the Content Security Policy 292 depends on the ability to determine the Origin [RFC6454] with which 293 content is associated, the following rules for determining the origin 294 for an Action Handler apply: 296 If the Action Handler contains a "url" property, and that property 297 is being used to invoke the handler, the URL specified is used to 298 establish the origin as defined in [RFC6454], Section 4. 300 Otherwise, the Origin is derived from the Base URI of the Action 301 Handler as determined by following the guidelines specified in 302 Section 6.1 of the JSON-LD specification 303 [W3C.REC-json-ld-20140116]. 305 For instance, the example below illustrates an HTTP response carrying 306 an Activity Streams object with three separate Action Handlers, each 307 with a distinct Origin: 309 HTTP/1.1 200 OK 310 Content-Type: application/activity+json 311 Content-Location: http://example.net/baz 313 { 314 "objectType": "note", 315 "content": "This is a simple note", 316 "actions": { 317 "view": { 318 { 319 "objectType": "ViewActionHandler", 320 "url": "http://example.org/foo" 321 }, 322 { 323 "objectType": "EmbedActionHandler", 324 "content": "
This is fun
", 325 "@context": { 326 "@base": "https://example.com:8443/bar" 327 } 328 }, 329 { 330 "objectType": "IntentActionHandler", 331 "context": { 332 "a": "b", 333 "b": "c" 334 } 335 } 336 } 337 } 338 } 340 The Origin for the "ViewActionHandler" is determined to be "http:// 341 example.org:80"; the Origin for the "EmbedActionHandler" is "http:// 342 example.com:8443"; and the Origin for the "IntentActionHandler" is 343 "http://example.net". 345 3. HTTP Action Handler 347 An HTTP Action Handler describes an HTTP request/response flow used 348 to carry out an action. It is identified using an objectType value 349 of "HttpActionHandler". 351 The defining characteristic of the HttpActionHandler is that the the 352 HTTP request and response flow occur independently of any browser or 353 navigation context. In other words, invocation of the handler MUST 354 NOT directly cause the user agent to navigate to or visually display 355 the results of the HTTP request. This makes the HttpActionHandler 356 suited primarily for RESTful API style operations in much the same 357 way that a web application developer would use the XMLHttpRequest 358 object. 360 +----------+------------------------+-------------------------------+ 361 | Property | Value | Description | 362 +----------+------------------------+-------------------------------+ 363 | url | Link Value | Specifies the HTTP or HTTPS | 364 | | | URL to which the HTTP request | 365 | | | is directed. | 366 | method | HTTP Method String | The HTTP method to use. | 367 | | (e.g. "GET", "POST", | Defaults to "GET" | 368 | | "PUT", etc) | | 369 +----------+------------------------+-------------------------------+ 371 For example: 373 { 374 "objectType": "note", 375 "displayName": "A simple note object", 376 "content": "This is a simple note.", 377 "actions": { 378 "share": { 379 "objectType": "HttpActionHandler", 380 "url": "http://example.org/foo", 381 "method": "POST" 382 } 383 } 384 } 386 In the Activity Streams 2.0 format, the "url" property is defined as 387 a "Link Value", this means that it is possible for the value of the 388 "url" property to be an Activity Stream object that a consuming 389 application can use to resolve the actual target URL. This 390 specification defines a new UrlTemplate (Section 10) objectType 391 specifically intended for such use. 393 The UrlTemplate object can be used within an HTTP Action Handler, for 394 instance, whenever carrying out the HTTP request requires the 395 construction of a new URL that includes variable parameters: 397 { 398 "objectType": "note", 399 "displayName": "A simple note object", 400 "content": "This is a simple note.", 401 "actions": { 402 "review": { 403 "objectType": "HttpActionHandler", 404 "url": { 405 "objectType": "UrlTemplate", 406 "template": "http://example.org/note/123{?rating}", 407 "parameters": { 408 "rating": { 409 "displayName": "Rating", 410 "maxInclusive": 5, 411 "minInclusive": 1, 412 "type": "unsignedInt" 413 } 414 } 415 }, 416 "method": "POST" 417 } 418 } 419 } 421 If the HTTP request requires an input payload, the HttpActionHandler 422 object can contain an "expects" property. The value of "expects" is 423 an Activity Streams 2.0 "Link Value" represented either as a simple 424 JSON string containing a fully qualified IRI, an Activity Stream 425 object, or an array of IRI's or Objects. This specification defines 426 a new HtmlForm (Section 8) objectType to be used whenever the input 427 of the HTTP request is an HTML Form POST. A new TypedPayload 428 (Section 9) objectType is defined for use whenever the input is an 429 arbitrary MIME media type. 431 For example, the following describes an HTML Form post with a single 432 "foo" parameter submitted using the "application/x-www-form- 433 urlencoded" format: 435 { 436 "objectType": "note", 437 "displayName": "A simple note object", 438 "content": "This is a simple note.", 439 "actions": { 440 "share": { 441 "objectType": "HttpActionHandler", 442 "method": "POST", 443 "url": "http://example.org/foo", 444 "expects": { 445 "objectType": "HtmlForm", 446 "mediaType": "application/x-www-form-urlencoded", 447 "parameters": { 448 "foo": { 449 "type": "string", 450 "displayName": "Foo Property" 451 } 452 } 453 } 454 } 455 } 456 } 458 When a Content Security Policy is in effect, invocation of the HTTP 459 Action Handler is always governed by the "connect-src" directive 460 defined in Section 3.2.5.3 of [W3C.WD-CSP11-20140211]. Further, when 461 the HTTP Action Hander specifies any method other than "GET", and the 462 input when invoking the action handler is an HTML Form, the handler 463 is additionally governed by the CSP "form-action" directive 464 (Section 3.2.5.6). 466 4. View Action Handler 468 The View Action Handler describes an action that causes either an 469 existing or new browser context to be navigated to the identified 470 resource. It is specified using an objectType value of 471 "ViewActionHandler". 473 ViewActionHandler is roughly equivalent to the HTML anchor tag in 474 that invocation of the handler causes the user agent to navigate to 475 the identified resource. Unlike the anchor tag, however, the 476 ViewActionHandler can specify the HTTP method, input payload and 477 expected output. 479 +----------+---------------+----------------------------------------+ 480 | Property | Value | Description | 481 +----------+---------------+----------------------------------------+ 482 | url | Link Value | Specifies the HTTP or HTTPS URL to | 483 | | | which the HTTP request is directed. | 484 | method | HTTP Method | The HTTP method to use. Defaults to | 485 | | String (e.g. | "GET" | 486 | | "GET", | | 487 | | "POST", | | 488 | | "PUT", etc) | | 489 | target | Browsing | Specifies the Browsing Context Name or | 490 | | Context Name | keyword, as defined by | 491 | | or Keyword | [W3C.CR-html5-20140429], that will be | 492 | | | used when the action handler is | 493 | | | invoked. | 494 | sandbox | HTML5 | An optional string specifying HTML5 | 495 | | "sandbox" | [W3C.CR-html5-20140429] sandbox | 496 | | restrictions | restrictions that ought to be applied | 497 | | | to the content referenced by the "url" | 498 | | | property. | 499 +----------+---------------+----------------------------------------+ 501 { 502 "objectType": "note", 503 "displayName": "A simple note object", 504 "content": "This is a simple note.", 505 "actions": { 506 "view": { 507 "objectType": "ViewActionHandler", 508 "url": "http://example.org/foo", 509 "target": "_new" 510 } 511 } 512 } 514 As a shortcut, ViewActionHandlers that use the "GET" method can be 515 specified using a JSON string containing the absolute URL. For 516 instance: 518 { 519 "objectType": "note", 520 "displayName": "A simple note object", 521 "content": "This is a simple note.", 522 "actions": { 523 "view": "http://example.org/foo" 524 } 525 } 527 In such cases, the "target" property is assumed to be unspecified. 529 If the intended HTTP request uses the GET method, and the target URL 530 is to be constructed by expanding a URL Template, the UrlTemplate 531 object itself can be used directly as the action handler. 533 In other words, the following example: 535 { 536 "objectType": "note", 537 "displayName": "A simple note object", 538 "content": "This is a simple note.", 539 "actions": { 540 "view": { 541 "objectType": "ViewActionHandler", 542 "method": "GET", 543 "url": { 544 "objectType": "UrlTemplate", 545 "template": "http://example.org/note/{noteid}", 546 "parameters": { 547 "noteid": { 548 "type": "nonNegativeInteger", 549 "totalDigits": 5 550 } 551 } 552 } 553 } 554 } 555 } 557 Can, instead, be specified as: 559 { 560 "objectType": "note", 561 "displayName": "A simple note object", 562 "content": "This is a simple note.", 563 "actions": { 564 "view": { 565 "objectType": "UrlTemplate", 566 "template": "http://example.org/note/{noteid}", 567 "parameters": { 568 "noteid": { 569 "type": "nonNegativeInteger", 570 "totalDigits": 5 571 } 572 } 573 } 574 } 575 } 577 When a Content Security Policy is in effect, View Action Handlers are 578 subject to the same processing requirements as HTML anchor and form 579 elements. For instance, the "child_src" directive governs whether or 580 not the View Action Handler is permitted to create nested or 581 auxiliary browsing contexts, while the "form_action" directive 582 governs a View Action Handler that uses any method other than "GET" 583 and whose input is an HTML Form. 585 5. Embed Action Handler 587 An Embed Action Handler defines static or dynamic content to be 588 visually rendered to carry out an action. Examples of embeds can 589 include static HTML, images, videos, gadgets and applications. It is 590 identified using an objectType value of "EmbedActionHandler". 592 The defining characteristic that differentiates an Embed Action 593 Handler from a View Action Handler is that the former always implies 594 the use of the current browsing context and that content is expected 595 to be displayed inline as embedded content (similar to the way HTML5 596 img, audio, video and iframe tags are handled). 598 +-----------+--------------+----------------------------------------+ 599 | Property | Value | Description | 600 +-----------+--------------+----------------------------------------+ 601 | url | Link Value | The URL from which to retrieve the | 602 | | | content for this embed. | 603 | content | String | The character based "static" content | 604 | | | to be embeded. The "mediaType" | 605 | | | parameter specifies the MIME media | 606 | | | type of the content. | 607 | mediaType | MIME Media | The MIME Media Type of the embedded | 608 | | Type | content. | 609 | style | Styles | Visual CSS styling hints to apply to | 610 | | Object | the element containing the embedded | 611 | | (Section 13) | content. | 612 | preview | Link Value | A reference to a "preview" | 613 | | | representation of the embedded | 614 | | | content. Typically, this would a URL | 615 | | | to a thumbnail or screenshot image of | 616 | | | the content. | 617 | sandbox | HTML5 | An optional string specifying HTML5 | 618 | | "sandbox" | [W3C.CR-html5-20140429] sandbox | 619 | | restrictions | restrictions that ought to be applied | 620 | | | to the content referenced by the "url" | 621 | | | property. | 622 +-----------+--------------+----------------------------------------+ 624 In the following example, the "view" action is associated with an 625 "EmbedActionHandler" containing a static fragment of HTML markup: 627 { 628 "objectType": "note", 629 "displayName": "A simple note object", 630 "content": "This is a simple note.", 631 "actions": { 632 "view": { 633 "objectType": "EmbedActionHandler", 634 "content": "
This is some bit of embedded HTML
", 635 "mediaType": "text/html", 636 "style": { 637 "height": "100px", 638 "width": "100px", 639 "box-shadow": "10px 10px 5px #888888" 640 }, 641 "displayName": "Some embedded content", 642 "preview": "http://example.org/preview/123.jpg" 643 } 644 } 645 } 647 Alternatively, the embedded content can be referenced by URL: 649 { 650 "objectType": "note", 651 "displayName": "A simple note object", 652 "content": "This is a simple note.", 653 "actions": { 654 "view": { 655 "objectType": "EmbedActionHandler", 656 "url": "http://example.org/foo", 657 "mediaType": "text/html" 658 } 659 } 660 } 662 The mediaType parameter specifies the type of content to be embedded. 663 Consuming applications MAY ignore Embed Action Handlers that specify 664 unrecognized or unsupported mediaTypes. 666 Example: 668 { 669 "objectType": "note", 670 "displayName": "A simple note object", 671 "content": "This is a simple note.", 672 "actions": { 673 "view": { 674 "objectType": "EmbedActionHandler", 675 "url": "http://example.org/foo.mpg", 676 "mediaType": "video/mpeg" 677 } 678 } 679 } 681 Exactly how the content referenced by the Action Handler is embedded 682 and displayed is dependent on the implementation and may vary by 683 content type. For instance, an implementation invoking an Embed 684 Action Handler that references an image resource (e.g. "image/png") 685 might use the HTML5 img tag to embed the content. 687 When a Content Security Policy is in effect, the specific directives 688 that apply will be entirely dependent on the type of content being 689 embedded and how the implementation chooses to embed it. For 690 instance, embedded image resources will be governed by the 691 "image_src" directive while embedded video will be governed by the 692 "media_src" directive. Please refer to the Content Security Policy 693 [W3C.WD-CSP11-20140211] specification for a detailed explanation of 694 each of the directives that may apply. 696 6. Intent Action Handler 698 An Intent Action Handler provides a generic way for the publisher of 699 an Activity object to tell the consuming application to figure out 700 how to handle the action on it's own. The consumer can, for 701 instance, pass the object off to some other native platform 702 application. It is identified using an objectType value of 703 "IntentActionHandler". 705 For example: 707 { 708 "objectType": "note", 709 "displayName": "A simple note object", 710 "content": "This is a simple note.", 711 "actions": { 712 "share": { 713 "objectType": "IntentActionHandler", 714 "displayName": "Share This", 715 "context": { 716 "foo": "ABC", 717 "bar": 123 718 } 719 } 720 } 721 } 723 Whether and how the Intent Action Handler is invoked is dependent 724 entirely on the implementation. Regardless of how the handler is 725 invoked, the implementation MUST, at a minimum, pass the value of the 726 "context" property along. 728 7. Using "service" and "application" objects as action handlers 730 The "service" and "application" object are existing objectTypes 731 defined by the Activity Streams 1.0 core schema. While these objects 732 were not originally designed to be used as action handlers, they can 733 be. Specifically, the "service" objectType can be used when the 734 action is to be carried out using some specific third party service 735 interface; the "application" objectType can be used when the action 736 is to be carried out by deferring some some specific native platform 737 application. When such objectTypes are used as actions handlers, 738 they are to be treated as specializations of Intent Action Handler. 740 For example: 742 { 743 "objectType": "note", 744 "displayName": "A simple note object", 745 "content": "This is a simple note.", 746 "actions": { 747 "share": { 748 "objectType": "service", 749 "displayName": "My Sharing Service", 750 "url": "http://share.example.org/api" 751 }, 752 "save": { 753 "objectType": "application", 754 "displayName": "Read this later!", 755 "platform": "android", 756 "id": "123", 757 "url": "http://play.google.com/..." 758 } 759 } 760 } 762 8. HTML Form Objects 764 +------------+----------------+-------------------------------------+ 765 | Property | Value | Description | 766 +------------+----------------+-------------------------------------+ 767 | mediaType | MIME Media | Defaults to "application/x-www- | 768 | | Type | form-urlencoded" | 769 | parameters | Parameters | Defines the HTML form parameters. | 770 | | Object | | 771 | | (Section 11) | | 772 +------------+----------------+-------------------------------------+ 773 For example: 775 { 776 "objectType": "note", 777 "displayName": "A simple note object", 778 "content": "This is a simple note.", 779 "actions": { 780 "review": { 781 "objectType": "ViewActionHandler", 782 "method": "POST", 783 "target": "_new", 784 "url": "http://example.org/foo", 785 "expects": { 786 "objectType": "HtmlForm", 787 "mediaType": "application/x-www-form-urlencoded", 788 "parameters": { 789 "foo": { 790 "displayName": "Foo", 791 "type": "string", 792 "placeholder": "Foo" 793 }, 794 "bar": { 795 "type": "string", 796 "value": "Provided Value" 797 } 798 } 799 } 800 } 801 } 802 } 804 Is roughly equivalent to the following HTML form: 806
807 808 809 810 811
813 9. Typed Payload Objects 814 +-----------+-----------------------------+-------------------------+ 815 | Property | Value | Description | 816 +-----------+-----------------------------+-------------------------+ 817 | mediaType | MIME Media Type | The MIME Media Type of | 818 | | | the Payload | 819 | type | Type Value | An optional Type Value | 820 | | [I-D.snell-activitystreams] | that describes the | 821 | | | payloads semantic type. | 822 | schema | Link Value | An optional Link Value | 823 | | [I-D.snell-activitystreams] | whose value(s) describe | 824 | | | the structure of the | 825 | | | payload data. The value | 826 | | | is represented either | 827 | | | as a String with a | 828 | | | fully qualified IRI, an | 829 | | | Activity Stream object, | 830 | | | or an Array of IRIs and | 831 | | | Objects. If multiple | 832 | | | values are provided, | 833 | | | they are to be | 834 | | | considered mutually | 835 | | | exclusive alternatives. | 836 +-----------+-----------------------------+-------------------------+ 838 For example: 840 { 841 "objectType": "note", 842 "displayName": "A simple note object", 843 "content": "This is a simple note.", 844 "actions": { 845 "review": { 846 "objectType": "HttpActionHandler", 847 "method": "POST", 848 "url": "http://example.org/foo", 849 "expects": { 850 "objectType": "TypedPayload", 851 "mediaType": "text/json", 852 } 853 } 854 } 855 } 857 10. URL Template Objects 859 Objects with the "UrlTemplate" object type represent [RFC6570] URL 860 Templates. 862 +------------+-------------------------+----------------------------+ 863 | Property | Value | Description | 864 +------------+-------------------------+----------------------------+ 865 | template | URL Template | The [RFC6570] URL Template | 866 | parameters | Parameters Object | Defines the URL Template | 867 | | (Section 11) | parameters | 868 +------------+-------------------------+----------------------------+ 870 { 871 "objectType": "note", 872 "displayName": "A simple note object", 873 "content": "This is a simple note.", 874 "actions": { 875 "review": { 876 "objectType": "UrlTemplate", 877 "template": "http://example.org/notes/{noteid}", 878 "parameters": { 879 "noteid": { 880 "type": "nonNegativeInteger", 881 "totalDigits": 5 882 } 883 } 884 } 885 } 886 } 888 If the given URL template includes any parameter tokens that do not 889 appear within the "parameters" property, the parameter value type is 890 assumed to be a UTF-8 encoded xsd:string with no maximum length. 892 11. Parameters Object 894 A Parameters Object is used to provide descriptions of the variable 895 inputs of objects such as HTML Forms (Section 8) and URL Templates 896 (Section 10). The object is expressed as a JSON dictionary mapping 897 parameter names to parameter descriptions which take the form of 898 either an XML Schema type name [W3C.REC-xmlschema-2-20041028], an 899 absolute IRI, a parameter object (Section 11.1), or in some limited 900 cases, TypedPayload or UrlTemplate objects. 902 By default, all parameters are assumed to be required. When a 903 parameter is described using an object, the object MAY contain a 904 boolean "required" member. If "required" is false, use of the 905 parameter is assumed to be optional. 907 Using the Parameters Object in UrlTemplate objects: 909 { 910 "objectType": "UrlTemplate", 911 "template": "http://example.org{/foo,bar}" 912 "parameters": { 913 "foo": "string", 914 "bar": { 915 "type": "string", 916 "required": false 917 } 918 } 919 } 921 In this example, both the "foo" and "bar" parameters conform to the 922 XML Schema type "xsd:string". The "foo" parameter is required while 923 the "bar" parameter is optional. 925 Using the Parameters Object in HtmlForm objects: 927 { 928 "objectType": "HtmlForm", 929 "mediaType": "application/x-www-form-urlencoded", 930 "parameters": { 931 "foo": { 932 "displayName": "Foo", 933 "type": "string" 934 }, 935 "bar": { 936 "displayName": "Bar", 937 "type": "string", 938 "required": false 939 } 940 } 941 } 943 11.1. The Parameter Object 945 Parameter objects provide a rich description of a single parameter in 946 a manner that is aligned with the commonly used XML Schema type 947 system [W3C.REC-xmlschema-2-20041028]. 949 +-------------+--------------------------+--------------------------+ 950 | Property | Value | Description | 951 +-------------+--------------------------+--------------------------+ 952 | displayName | Natural Language Value [ | An Activity Streams 2.0 | 953 | | I-D.snell-activitystream | Natural Language Value. | 954 | | s] | | 955 | required | boolean | True if the parameter is | 956 | | | required. Defaults to | 957 | | | true. | 958 | repeated | boolean | True if the parameter | 959 | | | can be repeated zero or | 960 | | | more times. Defaults to | 961 | | | false. | 962 | value | (Any) | Provides a fixed value | 963 | | | for the parameter. When | 964 | | | specified, | 965 | | | implementations MUST use | 966 | | | the specified value. | 967 | default | (Any) | Provides a default value | 968 | | | for the parameter. When | 969 | | | specified, | 970 | | | implementations MUST use | 971 | | | the specified value if | 972 | | | no other value is not | 973 | | | supplied. | 974 | type | XSD [W3C.REC-xmlschema-2 | Identifies the value | 975 | | -20041028] type name or | type using either an XML | 976 | | IRI | Schema [W3C.REC-xmlschem | 977 | | | a-2-20041028] simple | 978 | | | type name or an absolute | 979 | | | IRI. If an | 980 | | | implementation | 981 | | | encounters a type it | 982 | | | does not recognize, the | 983 | | | property MAY be ignored. | 984 | | | When not specified, the | 985 | | | value type is assumed to | 986 | | | be a UTF-8 encoded | 987 | | | "xsd:string". | 988 | enumeration | Array of (Any) | Provides a fixed array | 989 | | | of possible values for | 990 | | | the parameter. When | 991 | | | specified, | 992 | | | implementations MUST use | 993 | | | one of the specified | 994 | | | values. | 995 | minLength | Non-Negative Integer | Specifies the minimum | 996 | | | "unit of length" for the | 997 | | | value. The "unit of | 998 | | | length" depends entirely | 999 | | | on the value type as | 1000 | | | specified by the "type" | 1001 | | | property. For instance, | 1002 | | | For xsd:string, the | 1003 | | | length is determined by | 1004 | | | the number of | 1005 | | | characters; for | 1006 | | | xsd:hexBinary, the | 1007 | | | length is determined by | 1008 | | | the number of encoded | 1009 | | | 8-bit octets. | 1010 | maxLength | Non-Negative Integer | Specifies the maximum | 1011 | | | "unit of length" for the | 1012 | | | value. The "unit of | 1013 | | | length" depends entirely | 1014 | | | on the value type as | 1015 | | | specified by the "type" | 1016 | | | property. For instance, | 1017 | | | For xsd:string, the | 1018 | | | length is determined by | 1019 | | | the number of | 1020 | | | characters; for | 1021 | | | xsd:hexBinary, the | 1022 | | | length is determined by | 1023 | | | the number of encoded | 1024 | | | 8-bit octets. | 1025 | maxInclusiv | (Any) | A value that is | 1026 | e | | considered to be the | 1027 | | | inclusive upper bound of | 1028 | | | a range of possible | 1029 | | | values. This would | 1030 | | | typically be used only | 1031 | | | with numeric parameters. | 1032 | maxExclusiv | (Any) | A value that is | 1033 | e | | considered to be the | 1034 | | | exclusive upper bound of | 1035 | | | a range of possible | 1036 | | | values. This would | 1037 | | | typically be used only | 1038 | | | with numeric parameters. | 1039 | minInclusiv | (Any) | A value that is | 1040 | e | | considered to be the | 1041 | | | inclusive lower bound of | 1042 | | | a range of possible | 1043 | | | values. This would | 1044 | | | typically be used only | 1045 | | | with numeric parameters. | 1046 | minExclusiv | (Any) | A value that is | 1047 | e | | considered to be the | 1048 | | | exclusive lower bound of | 1049 | | | a range of possible | 1050 | | | values. This would | 1051 | | | typically be used only | 1052 | | | with numeric parameters. | 1053 | step | Non-negative Number | Specifies the legal | 1054 | | | numeric interval between | 1055 | | | acceptable values for | 1056 | | | the parameter. The step | 1057 | | | value MUST be a number | 1058 | | | and MUST conform to the | 1059 | | | specified type. For | 1060 | | | instance, if type is | 1061 | | | "unsignedInt", then | 1062 | | | step=2 would indicate | 1063 | | | legal values of 0, 2, 4, | 1064 | | | 6, and so on. The step | 1065 | | | property MAY be ignored | 1066 | | | if it's value does not | 1067 | | | correspond to the | 1068 | | | expected type. | 1069 | totalDigits | Non-negative integer | Specifies the maximum | 1070 | | | number of digits | 1071 | | | (integer and fractional) | 1072 | | | that can be included in | 1073 | | | numeric values. The | 1074 | | | totalDigits property | 1075 | | | MUST be ignored if the | 1076 | | | value type identified by | 1077 | | | the type property is not | 1078 | | | a numeric type. | 1079 | fractionDig | Non-negative integer | Specifies the maximum | 1080 | its | | number of fractional | 1081 | | | digits that can be | 1082 | | | included in numeric | 1083 | | | values. The | 1084 | | | fractionDigits property | 1085 | | | MUST be ignored if the | 1086 | | | value type identified by | 1087 | | | the type property is not | 1088 | | | a numeric type. | 1089 | pattern | String or Array of | One or more Regular | 1090 | | Strings | Expressions that | 1091 | | | describe the acceptable | 1092 | | | structure of the value. | 1093 | | | Typically used when the | 1094 | | | value is a string. | 1095 | | | Multiple patterns are | 1096 | | | mutually exclusive | 1097 | | | options. That is, the | 1098 | | | parameter value is | 1099 | | | expected to conform to | 1100 | | | at least one of the | 1101 | | | given patterns. | 1102 | placeholder | Natural Language Value [ | An optional Natural | 1103 | | I-D.snell-activitystream | Language Value providing | 1104 | | s] | a text hint that | 1105 | | | describes the expected | 1106 | | | value of the parameter. | 1107 +-------------+--------------------------+--------------------------+ 1109 Using the Parameter Object in HtmlForm objects: 1111 { 1112 "objectType": "HtmlForm", 1113 "mediaType": "application/x-www-form-urlencoded", 1114 "parameters": { 1115 "foo": "string", 1116 "bar": { 1117 "displayName": "Bar", 1118 "required": false, 1119 "repeated": false, 1120 "type": "unsignedInt", 1121 "default": 3, 1122 "minInclusive": 1, 1123 "maxInclusive": 5 1124 } 1125 } 1126 } 1128 11.2. Using UrlTemplate and TypedPayload objects as parameter 1129 descriptions 1131 In certain cases, when the value of a parameter is expected to be 1132 either a URI or IRI, the UrlTemplate objectType (Section 10) MAY be 1133 used as the parameter description. In such cases, the "required", 1134 "repeated", "default" and "placeholder" properties from the Parameter 1135 objectType (Section 11.1) can be used as additional properties within 1136 the UrlTemplate object. 1138 For example: 1140 { 1141 "objectType": "HtmlForm", 1142 "mediaType": "application/x-www-form-urlencoded", 1143 "parameters": { 1144 "foo": "http://example.org/FooProperty", 1145 "bar": { 1146 "objectType": "UrlTemplate", 1147 "template": "http://example.org{/baz}", 1148 "displayName": "Bar", 1149 "required": false, 1150 "repeated": false 1151 } 1152 } 1153 } 1155 Likewise, when the value of a parameter is expected to be an instance 1156 of a specific MIME media type, the TypedPayload objectType 1157 (Section 9) can be used. 1159 { 1160 "objectType": "HtmlForm", 1161 "mediaType": "multipart/form-data", 1162 "parameters": { 1163 "file": { 1164 "objectType": "TypedPayload", 1165 "mediaType": "image/*", 1166 "repeated": true 1167 } 1168 } 1169 } 1171 12. Authentication Object 1173 An Authentication Object is used by Action Handlers that require 1174 specific authentication options to be supported in order to carry out 1175 the Action. The object is expresed as a JSON dictionary mapping 1176 authentication schema labels to JSON dictionaries that provide a 1177 specific description of properties and requirements specific to the 1178 scheme. 1180 Example Authentication details: 1182 { 1183 "objectType": "note", 1184 "displayName": "A simple note object", 1185 "content": "This is a simple note", 1186 "actions": { 1187 "view": { 1188 "objectType": "ViewActionHandler", 1189 "method": "GET", 1190 "url": "http://example.org/notes/1", 1191 "target": "_new", 1192 "auth": { 1193 "basic": { 1194 "realm": "http://example.org" 1195 }, 1196 "oauth": { 1197 "scopes": [ 1198 "some.oauth.scope", 1199 "another.oauth.scope" 1200 ] 1201 } 1202 } 1203 } 1204 } 1205 } 1207 This specification does not define the authentication schemes or 1208 their associated properties. Unrecognized authentication schemes MAY 1209 be ignored. However, if an implementation fails to recognize any of 1210 the authentication schemes specified by an Action Handler, it might 1211 not be possible to successfully carry out the Action. 1213 13. Styles Object 1215 A Styles Object is used by EmbedActionHandlers to provide CSS style 1216 hints for the container within which embedded content is to be 1217 displayed. The object is expressed as either a single JSON 1218 dictionary object mapping CSS property names to appropriate CSS 1219 values, or an array of JSON dictionary objects. An optional "media" 1220 member can be included within the dictionary providing a CSS Media 1221 Query. 1223 Example style hints: 1225 { 1226 "objectType": "note", 1227 "displayName": "A simple note object", 1228 "content": "This is a simple note.", 1229 "actions": { 1230 "view": { 1231 "objectType": "EmbedActionHandler", 1232 "content": "Some plain text content", 1233 "mediaType": "text/plain", 1234 "style": { 1235 "height": "100px", 1236 "width": "100px", 1237 "box-shadow": "10px 10px 5px #888888" 1238 } 1239 } 1240 } 1241 } 1243 Multiple style hints for specific media query targets: 1245 { 1246 "objectType": "note", 1247 "displayName": "A simple note object", 1248 "content": "This is a simple note.", 1249 "actions": { 1250 "view": { 1251 "objectType": "EmbedActionHandler", 1252 "content": "Some plain text content", 1253 "mediaType": "text/plain", 1254 "style": [ 1255 { 1256 "media": "print", 1257 "height": "100px", 1258 "width": "100px", 1259 "box-shadow": "10px 10px 5px #888888" 1260 }, 1261 { 1262 "media": "screen and (orientation: landscape)", 1263 "height": "100px", 1264 "width": "100px", 1265 "box-shadow": "10px 10px 5px #888888" 1266 } 1267 ] 1268 } 1269 } 1270 } 1272 14. Security Considerations 1274 TBD 1276 15. IANA Considerations 1278 TBD 1280 16. Normative References 1282 [I-D.snell-activitystreams] 1283 Snell, J., "JSON Activity Streams 2.0", draft-snell- 1284 activitystreams-07 (work in progress), April 2014. 1286 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1287 Requirement Levels", BCP 14, RFC 2119, March 1997. 1289 [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, December 1290 2011. 1292 [RFC6570] Gregorio, J., Fielding, R., Hadley, M., Nottingham, M., 1293 and D. Orchard, "URI Template", RFC 6570, March 2012. 1295 [W3C.CR-html5-20140429] 1296 Berjon, R., Faulkner, S., Leithead, T., Navara, E., 1297 O'Connor, E., and S. Pfeiffer, "HTML5", World Wide 1298 Web Consortium CR CR-html5-20140429, April 2014, 1299 . 1301 [W3C.REC-json-ld-20140116] 1302 Sporny, M., Kellogg, G., and M. Lanthaler, "JSON-LD 1.0", 1303 World Wide Web Consortium Recommendation REC-json- 1304 ld-20140116, January 2014, 1305 . 1307 [W3C.REC-xmlschema-2-20041028] 1308 Biron, P. and A. Malhotra, "XML Schema Part 2: Datatypes 1309 Second Edition", World Wide Web Consortium Recommendation 1310 REC-xmlschema-2-20041028, October 2004, 1311 . 1313 [W3C.WD-CSP11-20140211] 1314 Barth, A., Veditz, D., and M. West, "Content Security 1315 Policy 1.1", World Wide Web Consortium WD WD- 1316 CSP11-20140211, February 2014, 1317 . 1319 Appendix A. Using Action Handlers From Other Vocabularies 1321 The Activity Streams 2.0 Actions mechanism is specifically designed 1322 to allow Action Handlers from multiple vocabularies. 1324 A.1. Schema.org Actions Proposal 1326 Based on http://www.w3.org/wiki/images/b/b9/Actionsinschema.org.pdf: 1328 { 1329 "objectType": "video", 1330 "displayName": "A simple note object", 1331 "content": "This is a simple note.", 1332 "actions": { 1333 "watch": [ 1334 { 1335 "objectType": "http://schema.org/WebPageHandler", 1336 "url": "http://movies.example.com/player?id=123" 1337 }, 1338 { 1339 "objectType": "http://schema.org/AndroidHandler", 1340 "url": "http://movies.example.com/player?id=123", 1341 "package": "com.movies" 1342 } 1343 ] 1344 } 1345 } 1347 A.2. Google's "Actions in the Inbox" 1349 Based on https://developers.google.com/gmail/actions/reference/ 1350 review-action: 1352 { 1353 "objectType": "note", 1354 "displayName": "A simple note object", 1355 "content": "This is a simple note.", 1356 "actions": { 1357 "review": { 1358 "objectType": "http://schema.org/ReviewAction", 1359 "review": { 1360 "objectType": "http://schema.org/Review", 1361 "itemReviewed": { 1362 "objectType": "http://schema.org/FoodEstablishment", 1363 "name": "Joe's Diner" 1364 }, 1365 "reviewRating": { 1366 "objectType": "http://schema.org/Rating", 1367 "bestRating": "5", 1368 "worstRating": "1" 1369 } 1370 }, 1371 "handler": { 1372 "objectType": "http://schema.org/HttpActionHandler", 1373 "url": "http://reviews.com/review?id=123", 1374 "requiredProperty": { 1375 "objectType": "http://schema.org/Property", 1376 "name": "review.reviewRating.ratingValue" 1377 }, 1378 "method": "http://schema.org/HttpRequestMethod/POST" 1379 } 1380 } 1381 } 1382 } 1384 A.3. Mixing Vocabularies 1385 { 1386 "objectType": "video", 1387 "displayName": "A simple note object", 1388 "content": "This is a simple note.", 1389 "actions": { 1390 "watch": [ 1391 { 1392 "objectType": "ViewActionHandler", 1393 "url": "http://movies.example.com/player?id=123", 1394 "target": "_new" 1395 }, 1396 { 1397 "objectType": "http://schema.org/AndroidHandler", 1398 "url": "http://movies.example.com/player?id=123", 1399 "package": "com.movies" 1400 } 1401 ] 1402 } 1403 } 1405 A.4. Example Drawing From Multiple Vocabularies 1407 { 1408 "objectType": "video", 1409 "displayName": "A Movie!", 1410 "displayName": "A simple note object", 1411 "content": "This is a simple note.", 1412 "actions": { 1413 "watch": [ 1414 { 1415 "objectType": "EmbedActionHandler", 1416 "displayName": "HD", 1417 "mediaType": "video/mpeg", 1418 "url": "http://cdn.example.org?id=123amp;fmt=HD", 1419 }, 1420 { 1421 "objectType": "EmbedActionHandler", 1422 "displayName": "SD", 1423 "mediaType": "video/mpeg", 1424 "url": "http://cdn.example.org?id=123&fmt=SD", 1425 }, 1426 { 1427 "objectType": "application", 1428 "displayName": "Watch on Netflix", 1429 "url": "http://netflix.com..." 1430 } 1431 ], 1432 "like": { 1433 "objectType": "EmbedActionHandler", 1434 "mediaType": "text/html", 1435 "url": "http://www.facebook.com/plugins/like.php...", 1436 "style": { 1437 "width": "150px", 1438 "height": "50px" 1439 } 1440 }, 1441 "share": [ 1442 { 1443 "objectType": "ViewActionHandler", 1444 "displayName": "Twitter", 1445 "url": "https://twitter.com/share?url=...", 1446 "target": "dialog" 1447 }, 1448 { 1449 "objectType": "ViewActionHandler", 1450 "displayName": "Facebook", 1451 "url": "https://www.facebook.com/sharer/sharer.php?u=...", 1452 "target": "dialog" 1453 } 1454 ], 1455 "save": [ 1456 { 1457 "objectType": "service", 1458 "id": "http://getpocket.com", 1459 "displayName": "Pocket", 1460 "context": { 1461 "url": "http://example.org/movie?id=123", 1462 "title": "A Movie!", 1463 "tags": "foo, bar, baz" 1464 } 1465 }, 1466 { 1467 "objectType": "service", 1468 "id": "http://instapaper.com", 1469 "displayName": "Instapaper", 1470 "context": { 1471 "url": "http://example.org/movie?id=123", 1472 "title": "A Movie!", 1473 "selection": "An action movie!" 1474 } 1475 } 1476 ], 1477 "review": { 1478 "objectType": "HttpActionHandler", 1479 "displayName": "Rate this movie!", 1480 "url": "http://review.example.org/movie?id=123", 1481 "method": "POST", 1482 "expects": { 1483 "objectType": "HtmlForm", 1484 "mediaType": "application/x-www-form-urlencoded", 1485 "parameters": { 1486 "rating": { 1487 "maxInclusive": 5, 1488 "minInclusive": 0, 1489 "fractionDigits": 2, 1490 "totalDigits": 3 1491 "type": "float", 1492 "displayName": "Rating" 1493 }, 1494 "comments": { 1495 "displayName": "Comments", 1496 "type": "string", 1497 "required": false 1498 } 1499 } 1500 } 1501 } 1502 } 1503 } 1505 Authors' Addresses 1507 James M Snell 1508 IBM 1510 Email: jasnell@gmail.com 1512 Matthew Marum 1513 SugarCRM 1515 Email: mgmarum@gmail.com