idnits 2.17.1 draft-snell-activitystreams-05.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 date (November 04, 2013) is 3824 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: 'RFC6963' is defined on line 1340, but no explicit reference was found in the text ** Obsolete normative reference: RFC 4627 (Obsoleted by RFC 7158, RFC 7159) ** Obsolete normative reference: RFC 5988 (Obsoleted by RFC 8288) Summary: 2 errors (**), 0 flaws (~~), 2 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, Ed. 3 Internet-Draft IBM 4 Intended status: Standards Track November 04, 2013 5 Expires: May 08, 2014 7 JSON Activity Streams 2.0 8 draft-snell-activitystreams-05 10 Abstract 12 This specification details a model for representing potential and 13 completed activities using the JSON format. 15 Author's Note 17 This draft is heavily influenced by the original JSON Activity 18 Streams 1.0 specification that was originally co-authored by Martin 19 Atkins, Will Norris, Chris Messina, Monica Wilkinson, Rob Dolin and 20 James Snell. The author is very thankful for their significant 21 contributions and gladly stands on their shoulders. Some portions of 22 the original text of Activity Streams 1.0 are used in this document. 24 The Activity Streams 1.0 and 2.0 specifications are works produced by 25 the Activity Streams Working Group (http://activitystrea.ms/) 26 operating independently of the IETF. Discussion and feedback about 27 this specification is invited and should be directed to the Activity 28 Streams Mailing List (see https://groups.google.com/forum/#!forum/ 29 activity-streams). 31 Status of This Memo 33 This Internet-Draft is submitted in full conformance with the 34 provisions of BCP 78 and BCP 79. 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF). Note that other groups may also distribute 38 working documents as Internet-Drafts. The list of current Internet- 39 Drafts is at http://datatracker.ietf.org/drafts/current/. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 This Internet-Draft will expire on May 08, 2014. 48 Copyright Notice 50 Copyright (c) 2013 IETF Trust and the persons identified as the 51 document authors. All rights reserved. 53 This document is subject to BCP 78 and the IETF Trust's Legal 54 Provisions Relating to IETF Documents 55 (http://trustee.ietf.org/license-info) in effect on the date of 56 publication of this document. Please review these documents 57 carefully, as they describe your rights and restrictions with respect 58 to this document. Code Components extracted from this document must 59 include Simplified BSD License text as described in Section 4.e of 60 the Trust Legal Provisions and are provided without warranty as 61 described in the Simplified BSD License. 63 Table of Contents 65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 66 1.1. Relationship to JSON Activity Streams 1.0 . . . . . . . . 3 67 1.2. Relationship to JSON-LD 1.0 . . . . . . . . . . . . . . . 4 68 1.3. Syntax Conventions . . . . . . . . . . . . . . . . . . . 5 69 2. Example Activities . . . . . . . . . . . . . . . . . . . . . 5 70 2.1. Example 1: Minimal Activity . . . . . . . . . . . . . . . 5 71 2.2. Example 2: Basic activity with some additional detail . . 6 72 2.3. Example 3: An extended activity . . . . . . . . . . . . . 6 73 3. Object Model . . . . . . . . . . . . . . . . . . . . . . . . 8 74 3.1. Object . . . . . . . . . . . . . . . . . . . . . . . . . 8 75 3.2. Natural Language Values . . . . . . . . . . . . . . . . . 9 76 3.3. Type Values . . . . . . . . . . . . . . . . . . . . . . . 9 77 3.4. Link Values . . . . . . . . . . . . . . . . . . . . . . . 11 78 3.5. Activity . . . . . . . . . . . . . . . . . . . . . . . . 14 79 3.5.1. Considerations on the use of "priority" . . . . . . . 15 80 3.5.2. Audience Targeting Properties . . . . . . . . . . . . 16 81 3.6. Additional Object Properties . . . . . . . . . . . . . . 18 82 3.6.1. Action Values . . . . . . . . . . . . . . . . . . . . 21 83 3.7. Collection . . . . . . . . . . . . . . . . . . . . . . . 22 84 3.7.1. Using Collections as Summary Values . . . . . . . . . 23 85 4. The Activity Stream JSON Document . . . . . . . . . . . . . . 24 86 5. Reserved Object Types and Verbs . . . . . . . . . . . . . . . 25 87 5.1. Object Types . . . . . . . . . . . . . . . . . . . . . . 25 88 5.2. Verbs . . . . . . . . . . . . . . . . . . . . . . . . . . 25 89 6. Deprecated Activity Streams 1.0 Syntax . . . . . . . . . . . 26 90 7. Comparison of Identifier Values . . . . . . . . . . . . . . . 27 91 8. Extensibility . . . . . . . . . . . . . . . . . . . . . . . . 27 92 9. Security Considerations . . . . . . . . . . . . . . . . . . . 27 93 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 28 94 10.1. application/activity+xml Media Type . . . . . . . . . . 28 95 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 29 96 11.1. Normative References . . . . . . . . . . . . . . . . . . 29 97 11.2. Informational References . . . . . . . . . . . . . . . . 30 98 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 30 99 Appendix B. Processing as JSON-LD . . . . . . . . . . . . . . . 31 100 Appendix C. Motivational Use Cases . . . . . . . . . . . . . . . 32 101 C.1. Internationalization (i18n) . . . . . . . . . . . . . . . 32 102 C.2. Extensibility (e11y) . . . . . . . . . . . . . . . . . . 34 103 C.2.1. Publishing Extension objectType and verb Libraries . 35 104 C.3. First Class Links . . . . . . . . . . . . . . . . . . . . 36 105 C.4. Use of External Vocabularies . . . . . . . . . . . . . . 37 106 C.5. Embedded Actions . . . . . . . . . . . . . . . . . . . . 38 107 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 39 109 1. Introduction 111 In the most basic sense, an "activity" is a semantic description of 112 potential or completed actions. In the former case, the activity 113 expresses what can be done with a particular object, while in the 114 latter case, it expresses what has already been done. 116 It is the goal of this specification to provide a JSON-based syntax 117 that is sufficient to express metadata about activities in a rich, 118 human-friendly, machine-processable and extensible manner. This may 119 include constructing natural-language descriptions or visual 120 representations about the activity, associating actionable 121 information with various types of objects, communicating or recording 122 activity logs, or delegation of potential actions to other 123 applications. 125 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 126 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 127 document are to be interpreted as described in [RFC2119]. 129 1.1. Relationship to JSON Activity Streams 1.0 131 The JSON Activity Streams 1.0 [activitystreams-1.0] specification was 132 published in May of 2011 and provided a baseline extensible syntax 133 for the expression of completed activities. This specification 134 builds upon that initial foundation by incorporating lessons learned 135 through extensive implementation, community feedback and related work 136 being performed in other standards development communities. 138 While the syntax defined by this specification diverges somewhat from 139 that defined by JSON Activity Streams 1.0, the verbs, objectTypes, 140 extensions and fundamental model defined by that original 141 specification remain intact. 143 Refer to Section 6 for more detail about the differences between the 144 1.0 and 2.0 syntax and for a listing of specific backwards 145 compatibility requirements. 147 This specification incorporates several existing extensions to the 148 1.0 syntax directly into the 2.0 model. These include portions of 149 the Activity Streams 1.0 Base Schema [base-schema], Audience 150 Targeting [audience], Responses [responses], and Priority [priority] 151 extensions. 153 1.2. Relationship to JSON-LD 1.0 155 The JSON-based Serialization for Linked Data (JSON-LD) 156 [W3C.WD-json-ld-20130411] describes a rich syntax for the 157 serialization of semantically-rich metadata using the JSON format. 158 While the updated Activity Streams representation provided by this 159 document is not defined as a "JSON-LD Vocabulary", the syntax is 160 designed to be closely compatible with JSON-LD. 162 There are a few differences between JSON-LD and the serialization 163 syntax described here, specifically: 165 o JSON-LD uses certain field names with a leading "@" character, 166 such as "@id" and "@language". In this specification, the leading 167 "@" is omitted. 169 o While JSON-LD allows using relative IRI references in the values 170 of "id" properties, this specification limits identifiers to 171 absolute IRIs. 173 o While it is possible to derive a JSON-LD "@context" description 174 for the Activity Streams 2.0 JSON syntax one is not normatively 175 provided by this specification. 177 When processing an Activity Streams document as JSON-LD, the 178 following rules apply: 180 o The "objectType" property MUST be treated as an alias of JSON-LD 181 "@type". 183 o The "id" property MUST be treated as an alias of JSON-LD "@id". 185 o The "language" property MUST be treated as an alias of JSON-LD 186 "@language". 188 o A JSON array used to convey Link (Section 3.4) values MUST be 189 treated as an unordered JSON-LD @set (@container = @set). 191 o The JSON array value for the "items" property defined in 192 Section 3.7 MUST be treated as an ordered JSON-LD @list 193 (@container = @list). 195 o The "displayName", "title", "content" and "summary" properties 196 defined in Section 3.1 and Section 3.6 MUST be treated as JSON-LD 197 Language Maps (@container = @language). 199 1.3. Syntax Conventions 201 This specification defines a JSON-based [RFC4627] serialization 202 syntax. 204 When serialized, absent properties are represented by either (a) 205 setting the property value to null, or (b) by omitting the property 206 declaration altogether at the option of the publisher; these 207 representations are semantically equivalent. If a property has an 208 array value, the absence of any items in that array MUST be 209 represented by omitting the property entirely or by setting the value 210 to null. 212 This specification uses IRIs [RFC3987]. Every URI [RFC3986] is also 213 an IRI, so a URI may be used wherever an IRI is named. There are two 214 special considerations: (1) when an IRI that is not also a URI is 215 given for dereferencing, it MUST be mapped to a URI using the steps 216 in Section 3.1 of [RFC3987] and (2) when an IRI is serving as an "id" 217 value, it MUST NOT be so mapped. 219 Unless otherwise specified, all properties with date and time values 220 MUST conform to the "date-time" production in [RFC3339], with an 221 uppercase "T" character used to separate date and time, and an 222 uppercase "Z" character in the absence of a numeric time zone offset. 223 All such timestamps SHOULD be represented relative to Coordinated 224 Universal Time (UTC). 226 2. Example Activities 228 Following are three examples of activities with varying degrees of 229 detail. 231 2.1. Example 1: Minimal Activity 233 Expresses the statement "'urn:example:person:martin' posted 'http:// 234 example.org/foo.jpg'". No additional detail is given. 236 { 237 "verb": "post", 238 "actor": "urn:example:person:martin", 239 "object": "http://example.org/foo.jpg" 240 } 242 2.2. Example 2: Basic activity with some additional detail 244 Expresses the statement "Martin Smith posted an article to the blog 245 'Martin's Blog' at 3:04 PM GMT on February 2, 2011." Some additional 246 details about the article, actor and target blog are given. 248 { 249 "verb": "post", 250 "published": "2011-02-10T15:04:55Z", 251 "language": "en", 252 "actor": { 253 "objectType": "person", 254 "id": "urn:example:person:martin", 255 "displayName": "Martin Smith", 256 "url": "http://example.org/martin", 257 "image": { 258 "url": "http://example.org/martin/image.jpg", 259 "mediaType": "image/jpeg", 260 "width": 250, 261 "height": 250 262 } 263 }, 264 "object" : { 265 "objectType": "article", 266 "id": "urn:example:blog:abc123/xyz" 267 "url": "http://example.org/blog/2011/02/entry", 268 "displayName": "Why I love Activity Streams" 269 }, 270 "target" : { 271 "objectType": "blog", 272 "id": "urn:example:blog:abc123", 273 "displayName": "Martin's Blog", 274 "url": "http://example.org/blog/" 275 } 276 } 278 2.3. Example 3: An extended activity 280 A more extensive, single-entry "Activity Stream" follows. In 281 addition to containing a number of required and optional core 282 properties, the example contains the additional, undefined extension 283 properties "foo" and "foo2" for illustrative purposes only. 285 { 286 "totalItems": 1, 287 "items" : [ 288 { 289 "verb": "post", 290 "language": "en", 291 "published": "2011-02-10T15:04:55Z", 292 "foo": "some extension property", 293 "generator": "http://example.org/activities-app", 294 "provider": "http://example.org/activity-stream", 295 "displayName": { 296 "en": "Martin posted a new video to his album.", 297 "ga": "Martin phost le fisean nua a albam." 298 }, 299 "actor": { 300 "objectType": "person", 301 "id": "urn:example:person:martin", 302 "displayName": "Martin Smith", 303 "url": "http://example.org/martin", 304 "foo2": "some other extension property", 305 "image": { 306 "url": "http://example.org/martin/image", 307 "mediaType": "image/jpeg", 308 "width": 250, 309 "height": 250 310 } 311 }, 312 "object" : { 313 "objectType": { 314 "id": "http://example.org/Photo", 315 "displayName": "Photo" 316 }, 317 "id": "urn:example:album:abc123/my_fluffy_cat", 318 "url": "http://example.org/album/my_fluffy_cat.jpg", 319 "image": { 320 "url": "http://example.org/album/my_fluffy_cat_thumb.jpg", 321 "mediaType": "image/jpeg", 322 "width": 250, 323 "height": 250 324 } 325 }, 326 "target": { 327 "objectType": { 328 "id": "http://example.org/PhotoAlbum", 329 "displayName": "Photo-Album" 330 }, 331 "id": "urn:example.org:album:abc123", 332 "url": "http://example.org/album/", 333 "displayName": { 334 "en": "Martin's Photo Album", 335 "ga": "Grianghraif Mairtin" 336 }, 337 "image": { 338 "url": "http://example.org/album/thumbnail.jpg", 339 "mediaType": "image/jpeg", 340 "width": 250, 341 "height": 250 342 } 343 } 344 } 345 ] 346 } 348 3. Object Model 350 3.1. Object 352 The following "core properties" apply to all JSON objects serialized 353 within an Activity Stream document. 355 +--------------+-------------+--------------------------------------+ 356 | Property | Value | Description | 357 +--------------+-------------+--------------------------------------+ 358 | id | IRI | Provides a permanent, universally | 359 | | | unique identifier for the object in | 360 | | | the form of an absolute IRI | 361 | | | [RFC3987]. Objects SHOULD contain a | 362 | | | single "id" property. If an object | 363 | | | does not contain an "id" property, | 364 | | | consumers MAY use the value of the | 365 | | | "url" property as a less-reliable, | 366 | | | non-unique identifier. | 367 | objectType | Type value | Identifies the type of object. An | 368 | | (Section | object MAY contain a "objectType" | 369 | | 3.3) | property whose value is a Type value | 370 | | | (Section 3.3). If no "objectType" | 371 | | | property is specified, the object | 372 | | | has no specific type. | 373 | language | [RFC5646] | Establishes the default language | 374 | | Language | assumed for human-readable, natural- | 375 | | Tag | language metadata values included in | 376 | | | the object. An object MAY contain a | 377 | | | "language" property whose value MUST | 378 | | | be a [RFC5646] Language-Tag. | 379 | displayName | Natural | A simple human-readable, plain-text | 380 | | Language | name for the object. HTML markup | 381 | | value | MUST NOT be included. An object MAY | 382 | | (Section | contain a "displayName" property. If | 383 | | 3.2) | the object does not specify a | 384 | | | "objectType" property, the object | 385 | | | SHOULD specify a "displayName". | 386 | url | Link | A Link (Section 3.4) value | 387 | | (Section | describing a resource that provides | 388 | | 3.4) value | a representation of the object. An | 389 | | | object MAY contain a "url" property. | 390 +--------------+-------------+--------------------------------------+ 392 3.2. Natural Language Values 394 Natural Language values represent human-readable character sequences 395 in one or more languages. They are expressed as either (1) a single 396 JSON string or (2) a JSON dictionary mapping [RFC5646] Language-Tags 397 to localized, equivalent translations of the same string value. 399 For instance, the "displayName" property in all objects is a Natural 400 Language value. 402 A single String value using the default language: 404 { 405 "language": "en", 406 "displayName": "This is the title" 407 } 409 Multiple, language-specific values: 411 { 412 "displayName": { 413 "en": "This is the title", 414 "fr": "C'est le titre", 415 "sp": "Este es el titulo" 416 } 417 } 419 Each key in the JSON dictionary MUST be an [RFC5646] Language Tag. 420 The associated values MUST be Strings. 422 3.3. Type Values 423 Type values represent references to or descriptions of an abstract 424 type. They are expressed as either: (1) a String conforming to 425 either the "isegment-nz-nc" or "IRI" productions in [RFC3987] or (2) 426 an Object (Section 3.1). When represented as a String, the use of 427 relative references other than a simple name is not allowed. When 428 represented as an Object, the "id" property MUST be specified. 430 Within the Activity Streams 2.0, Type values are used only by the 431 "objectType" and "verb" properties. 433 Object type as a simple name (isegment-nz-nc): 435 { 436 "objectType": "person", 437 "displayName": "John" 438 } 440 Object type as an absolute IRI: 442 { 443 "objectType": "http://example.org/Person", 444 "displayName": "John" 445 } 447 Object type as an object: 449 { 450 "objectType": { 451 "id": "http://example.org/Person", 452 "displayName": "Person" 453 }, 454 "displayName": "John" 455 } 457 Because the second and third examples above each specify "http:// 458 example.org/Person", the two examples are considered to specify the 459 same type. 461 Verb as a simple name (isegment-nz-nc): 463 { 464 "verb": "post", 465 "actor": "acct:john.doe@example.org", 466 "object": "http://example.org/123" 467 } 469 Verb as an absolute IRI: 471 { 472 "verb": "http://example.com/Upload", 473 "actor": "acct:john.doe@example.org", 474 "object": "http://example.org/123" 475 } 477 Verb as an object: 479 { 480 "verb": { 481 "id": "http://example.com/Upload", 482 "displayName": "Upload" 483 }, 484 "actor": "acct:john.doe@example.org", 485 "object": "http://example.org/123" 486 } 488 Allowing verbs and object types to be represented as objects rather 489 than simple names or IRIs is intended to simplify the use of 490 extensions that an implementation might not have encountered 491 previously. The object properties provide additional information and 492 metadata about the new verb or object type. 494 It is important to note that because the "id" property is strictly 495 limited to absolute IRI values, the object representation cannot be 496 used to describe types with simple names. 498 3.4. Link Values 500 Link values represent references to other objects and resources. 501 They are expressed as either: (1) a String containing an absolute or 502 relative IRI, (2) an Object (Section 3.1), or (3) a JSON Array 503 containing a mixture of IRIs or Objects (Section 3.1). Link values 504 are closely related to the conceptual model of Links as established 505 in [RFC5988]. 507 For example, as defined previously, all objects (Section 3.1) can 508 contain an "image" property whose value describes a graphical 509 representation of the containing object. This property will 510 typically be used to provide the URL to a JPEG, GIF or PNG type 511 resource that can be displayed to the user. Any given object might 512 have multiple such visual representations -- multiple screenshots, 513 for instance, or the same image at different resolutions. Using Link 514 values, there are essentially three ways of describing such 515 references. 517 To reference a single image without any additional metadata, the link 518 value can be expressed as a simple JSON string containing an absolute 519 or relative IRI: 521 { 522 "objectType": "application", 523 "id": "http://example.org/application/123", 524 "displayName": "My Application", 525 "image": "http://example.org/application/123.png" 526 } 528 Alternatively, if additional metadata is required, the link can be 529 expressed as an object containing the url property. 531 { 532 "objectType": "application", 533 "id": "http://example.org/application/123", 534 "displayName": "My Application", 535 "image": { 536 "url": "http://example.org/application/123.png", 537 "mediaType": "image/png", 538 "height": 320, 539 "width": 320 540 } 541 } 543 If more than one link value is to be expressed, A JSON Array with a 544 mix of string and object elements can be used: 546 { 547 "objectType": "application", 548 "id": "http://example.org/application/123", 549 "displayName": "My Application", 550 "image": [ 551 "http://example.org/application/abc.gif", 552 { 553 "url": "http://example.org/application/123.png", 554 "mediaType": "image/png", 555 "height": 320, 556 "width": 320 557 } 558 ] 559 } 561 Individual items contained in such an array are independent of the 562 others and no significance is given to the ordering of those items. 564 RFC 5988 defines that all Links have a "link relation" that describes 565 the contextual purpose of the link. Within an object (Section 3.1), 566 in the absence of a specific "rel" property within the link object 567 itself, the name of the property whose value is a link serves as the 568 "link relation". Any valid link relation value, as defined by RFC 569 5988, can be used as a property with a link value in any Activity 570 Streams object, except where the link relation might conflict with 571 any other property defined by this specification. 573 In the following example, two separate links are provided. The link 574 relation of the first is "image", while the link relation of the 575 second is "preview". Both links, however, can be used as alternative 576 visual representations of the "application" object. 578 { 579 "objectType": "application", 580 "image": [ 581 "http://example.org/foo.jpg", 582 { 583 "url": "http://example.org/screens/1.jpg", 584 "rel": "preview", 585 "mediaType": "image/jpeg" 586 } 587 ] 588 } 590 When an object (Section 3.1) is used to represent a Link value, the 591 following additional properties MAY be used: 593 +-------------+--------------+--------------------------------------+ 594 | Property | Value | Description | 595 +-------------+--------------+--------------------------------------+ 596 | rel | RFC 5988 | The RFC 5988 Link Relation | 597 | | Link | associated with this link value. If | 598 | | Relation | absent, the name of the property is | 599 | | | assumed to specify the link | 600 | | | relation. | 601 | mediaType | MIME Media | The MIME media type of the resource | 602 | | Type | being referenced. | 603 +-------------+--------------+--------------------------------------+ 605 3.5. Activity 607 Activity objects are specializations of the base Object (Section 3.1) 608 type that provide metadata about potential or completed actions. 610 Within an Activity object, the "verb" property is used to identify 611 the type of activity. All existing verb definitions used in JSON 612 Activity Streams 1.0 implementations can continue to be used and 613 retain their existing semantics. If the "verb" is not specified, the 614 "objectType" property MAY be used as an alternative means of 615 determining the activity type. 617 Activity objects extend the core object (Section 3.1) definition with 618 the following additional, optional properties: 620 +-----------+------------+------------------------------------------+ 621 | Property | Value | Description | 622 +-----------+------------+------------------------------------------+ 623 | verb | Type value | Identifies the type of activity. An | 624 | | (Section | activity SHOULD contain a "verb" | 625 | | 3.3) | property whose value is a Type value | 626 | | | (Section 3.3). If the "verb" property | 627 | | | is not specified, the activity MUST | 628 | | | contain a "objectType" property. | 629 | actor | Link | Describes one or more entities that | 630 | | (Section | either peformed or are expected to | 631 | | 3.4) value | perform the activity. | 632 | object | Link | Describes the primary object of the | 633 | | (Section | activity. For instance, in the activity, | 634 | | 3.4) value | "John saved a movie to his wishlist", | 635 | | | the object of the activity is "movie". | 636 | | | An activity SHOULD contain an "object" | 637 | | | property. If the "object" property is | 638 | | | not contained, the primary object of the | 639 | | | activity MAY be implied by context. | 640 | target | Link | Describes the target of the activity. | 641 | | (Section | The precise meaning of the activity's | 642 | | 3.4) value | target is dependent on the activities | 643 | | | "verb", but will often be the object the | 644 | | | English preposition "to". For instance, | 645 | | | in the activity, "John saved a movie to | 646 | | | his wishlist", the target of the | 647 | | | activity is "wishlist". The activity | 648 | | | target MUST NOT be used to identity an | 649 | | | indirect object that is not a target of | 650 | | | the activity. | 651 | result | Link | Describes the result of the activity. | 652 | | (Section | For instance, if a particular action | 653 | | 3.4) value | results in the creation of a new | 654 | | | resource, the "result" property can be | 655 | | | used to describe that new resource. | 656 | priority | Decimal | An indicator of the relative priority or | 657 | | Number | importance that the creator of an | 658 | | between | activity considers the it to have. | 659 | | 0.00 and | Represented as a numeric decimal between | 660 | | 1.00 | 0.00 and 1.00, with two decimal places | 661 | | | of precision. If the property is omitted | 662 | | | or set to null, the assumption is that a | 663 | | | default priority can be assumed. The | 664 | | | value 0.00 represents the lowest | 665 | | | possible priority while 1.00 represents | 666 | | | the highest. | 667 +-----------+------------+------------------------------------------+ 669 3.5.1. Considerations on the use of "priority" 671 The presence of the "priority" property does not impose any specific 672 processing or display requirements on the part of any entity 673 consuming the activity. 675 Expressing the value as a range of numeric decimal values is intended 676 to provide the greatest level of flexibility in the expression and 677 consumption of prioritization detail. It is expected that 678 implementors consuming activity objects containing "priority" will 679 utilize and expose the additional information in a number of 680 different ways depending on the unique requirements of each 681 application use case. 683 Many existing systems do not represent priority values as numeric 684 ranges. Such systems might use fixed, labeled brackets such as 685 "low", "normal" and "high" or "urgent". Similar mechanisms can be 686 established, by convention, when using the "priority" property. In 687 typical use, it is RECOMMENDED that implementations wishing to work 688 with such defined categories treat "priority" property values in the 689 range 0.00 to 0.25 as "low" priority; values greater than 0.25 to 690 0.75 as "normal" priority; and values greater than 0.75 to 1.00 as 691 "high" priority. Specific implementations are free to establish 692 alternative conventions for the grouping of priority values with the 693 caveat that such conventions likely will not be understood by all 694 implementations. 696 3.5.2. Audience Targeting Properties 698 Every Activity has both a Primary and Secondary audience. The 699 Primary audience consists of those entities either directly involved 700 in the performance of the activity or who "own" the objects involved. 701 The Secondary audience consists of the collection of entities sharing 702 an interest in the activity but who are not directly involved (e.g. 703 "followers"). 705 For instance, suppose a social network of three individuals: Bob, Joe 706 and Jane. Bob and Joe are each friends with Jane but not friends 707 with one another. Bob has chosen to "follow" activities for which 708 Jane is directly involved. Jane shares a file with Joe. 710 In this example, Jane and Joe are each directly involved in the file 711 sharing activity and together make up the Primary Audience for that 712 event. Bob, having an interest in activities involving Jane, is the 713 Secondary Audience. Knowing this, a system that produces or consumes 714 the activity can intelligently notify each person of the event. 716 While there are means, based on the verb, actor, object and target of 717 the activity, to infer the primary audience for many types of 718 activities, those do not work in every case and do not provide a 719 means of identifying the secondary audience. The "to", "cc", "bto" 720 and "bcc" properties MAY be used within an Activity to explicitly 721 identify the Primary and Secondary audiences. 723 +--------------+--------------------+-------------------------------+ 724 | Property | Value | Description | 725 +--------------+--------------------+-------------------------------+ 726 | to | Link (Section 3.4) | Specifies the public primary | 727 | | value | audience. | 728 | cc | Link (Section 3.4) | Specifies the public | 729 | | value | secondary audience. | 730 | bto | Link (Section 3.4) | Specifies the private primary | 731 | | value | audience. | 732 | bcc | Link (Section 3.4) | Specifies the private | 733 | | value | secondary audience. | 734 +--------------+--------------------+-------------------------------+ 736 The prototypical use case for an Activity containing these properties 737 is the publication and redistribution of Activities through an 738 intermediary. That is, an event source generates the activity and 739 publishes it to the intermediary which determines a subset of events 740 to display to specific individual users or groups. Such a 741 determination can be made, in part, by identifying the Primary and 742 Secondary Audiences for each activity. 744 When the event source generates the activity and specifies values for 745 the to and cc fields, the intermediary SHOULD redistribute that event 746 with the values of those fields intact, allowing any processor to see 747 who the activity has been targeted to. This is precisely the same 748 model used by the to and cc fields in email systems. 750 There are situations, however, in which disclosing the identity of 751 specific members of the audience may be inappropriate. For instance, 752 a user may not wish to let other users know that they are interested 753 in various topics, individuals or types of events. To support this 754 option, an event source generating an activity MAY use the "bto" and 755 "bcc" properties to list entities to whom the activity should be 756 privately targeted. When an intermediary receives an activity 757 containing these properties, it MUST remove those values prior to 758 redistributing the activity. The intent is that systems MUST 759 consider entities listed within the "bto" and "bcc" properties as 760 part of the Primary and Second audience but MUST NOT disclose that 761 fact to any other party. 763 Audience targeting information included within an Activity only 764 describes the intent of the activity creator. With clear exception 765 given to the appropriate handling of "bto" and "bcc", this 766 specification leaves it up to implementations to determine how the 767 audience targeting information is used. 769 3.6. Additional Object Properties 771 The following "additional properties" MAY be used with any JSON 772 Object serialized within an Activity Stream document. 774 +--------------+-------------+--------------------------------------+ 775 | Property | Value | Description | 776 +--------------+-------------+--------------------------------------+ 777 | alias | IRI | Provides a contextually meaningful | 778 | | | alternative label for the object in | 779 | | | addition to the "id". For instance, | 780 | | | within some systems, groups can be | 781 | | | identified both by a unique global | 782 | | | ID and a more "human-friendly" label | 783 | | | such as "@friends" or "@network". | 784 | | | The value of the "alias" property | 785 | | | MUST match either the "isegment-nz- | 786 | | | nc" or the "IRI" production in | 787 | | | [RFC3987]. The use of a relative | 788 | | | reference other than a simple name | 789 | | | is not allowed. | 790 | attachments | Link | A Link (Section 3.4) value | 791 | | (Section | referencing one or more objects | 792 | | 3.4) value | associated with the containing | 793 | | | object. These are similiar in | 794 | | | concept to files attached to an | 795 | | | email message. | 796 | author | Link | A Link (Section 3.4) value | 797 | | (Section | referencing one or more entity that | 798 | | 3.4) value | created or authored the object. | 799 | content | Natural | A Natural-language description of | 800 | | Language | the object encoded as a single JSON | 801 | | value | String containing HTML markup. | 802 | | (Section | Visual elements such as thumbnail | 803 | | 3.2) | images MAY be included. | 804 | duplicates | Link | A Link (Section 3.4)value | 805 | | (Section | referencing one or more objects that | 806 | | 3.4) value | are semantically equivalent to this | 807 | | | object or duplicate this objects | 808 | | | content. An object SHOULD contain a | 809 | | | "duplicates" property when there are | 810 | | | known objects, possibly in a | 811 | | | different system, that are | 812 | | | semantically equivalent or duplicate | 813 | | | the content. | 814 | icon | Link | A Link (Section 3.4) value | 815 | | (Section | referencing one or more visual, | 816 | | 3.4) value | graphic representations of the | 817 | | | object, intended for human | 818 | | | consumption. The visual element | 819 | | | SHOULD have an aspect ratio of one | 820 | | | (horizontal) to one (vertical) and | 821 | | | SHOULD be suitable for presentation | 822 | | | at a small size. | 823 | image | Link | A Link (Section 3.4) value | 824 | | (Section | referencing one or more visual, | 825 | | 3.4) value | graphic represenations of the | 826 | | | object. Unlike the "icon" property, | 827 | | | there are no aspect ratio or display | 828 | | | restrictions. | 829 | location | Link | A Link (Section 3.4) value | 830 | | (Section | describing one or more physical or | 831 | | 3.4) value | virtual locations associated with | 832 | | | which the object. | 833 | published | [RFC3339] | The date and time at which the | 834 | | date-time | object was published. | 835 | generator | Link | A Link (Section 3.4) value | 836 | | (Section | referencing the application that | 837 | | 3.4) value | generated the object. | 838 | provider | Link | A Link (Section 3.4) value | 839 | | (Section | referencing the application that | 840 | | 3.4) value | published the object. Note that this | 841 | | | is not necessarily the same entity | 842 | | | that generated the object. | 843 | summary | Natural | A Natural-language summarization of | 844 | | Language | the object encoded as a single JSON | 845 | | value | String containing a fragment of HTML | 846 | | (Section | markup. Visual elements such as | 847 | | 3.2) | thumbnail images can be included. | 848 | updated | [RFC3339] | The date and time at which a | 849 | | date-time | previously published object has been | 850 | | | modified. | 851 | startTime | [RFC3339] | A date-time describing the actual or | 852 | | date-time | expected starting time of the | 853 | | | object. When used within an Activity | 854 | | | object, for instance, the | 855 | | | "startTime" specifies the moment the | 856 | | | activity began or is scheduled to | 857 | | | begin. | 858 | endTime | [RFC3339] | A date-time describing the actual or | 859 | | date-time | expected ending time of the object. | 860 | | | When used within an Activity object, | 861 | | | for instance, the "endTime" | 862 | | | specifies the moment the activity | 863 | | | concluded or is scheduled to | 864 | | | conclude. | 865 | rating | Decimal | A quality rating expressed as a | 866 | | Number | number between 1.0 and 5.0 | 867 | | between 1.0 | (inclusive) with one decimal place | 868 | | and 5.0 | of precision. | 869 | tags | Link | A Link (Section 3.4) value | 870 | | (Section | referencing one or more resources | 871 | | 3.4) value | that are loosely associated with the | 872 | | | containing object. The "tags" and | 873 | | | "attachments" properties differ from | 874 | | | one another in that the "tags" | 875 | | | property asserts "association by | 876 | | | reference" while "attachments" | 877 | | | asserts "association by enclosure". | 878 | title | Natural | A Natural-language title for the | 879 | | Language | object expressed as a fragment of | 880 | | (Section | HTML markup. The "title" and | 881 | | 3.2) value | "displayName" properties are closely | 882 | | | related and overlap in function with | 883 | | | the key difference being that | 884 | | | "title" is permitted to contain HTML | 885 | | | markup, while "displayName" is not. | 886 | duration | Integer or | When the object describes a time- | 887 | | [RFC3339] | based resource, such as audio or | 888 | | duration | video, the "duration" property | 889 | | | indicates the approximate duration | 890 | | | of time expressed as an either an | 891 | | | RFC 3339 "duration" (e.g. a | 892 | | | duration of 5 seconds is represented | 893 | | | as "PT5S") or as a non-negative | 894 | | | integer specifying the duration in | 895 | | | seconds. | 896 | height | Integer | When the object describes a visual | 897 | | | resource, such as an image, video or | 898 | | | embeddable HTML page, the "height" | 899 | | | property indicates the recommended | 900 | | | display height in pixels. | 901 | width | Integer | When the object describes a visual | 902 | | | resource, such as an image, video or | 903 | | | embeddable HTML page, the "width" | 904 | | | property indicates the recommended | 905 | | | display width in pixels. | 906 | inReplyTo | Link | A Link (Section 3.4) value | 907 | | (Section | identifying one or more other | 908 | | 3.4) value | objects to which the containing | 909 | | | object can be considered a response. | 910 | actions | Action | An optional Action (Section 3.6.1) | 911 | | (Section | value that describes potential | 912 | | 3.6.1) | activities that can be performed | 913 | | value | with the object. | 914 | scope | Link | A Link (Section 3.4) value | 915 | | (Section | identifying one or more resources | 916 | | 3.4) value | that define the total population of | 917 | | | entities for which the object is | 918 | | | considered to be relevant. | 919 +--------------+-------------+--------------------------------------+ 921 3.6.1. Action Values 923 The "actions" property on an Activity Streams object is used to 924 describe the kinds of activities that can be taken with regards to 925 the object. The value is expressed as a JSON dictionary mapping 926 verbs to Link (Section 3.4) values referencing resources or objects 927 that can be used to carry out those verbs. 929 For instance, a hypothetical object with "video" as the objectType 930 might have "watch", "share" and "embed" as potential actions: 932 { 933 "objectType": "video", 934 "id": "http://example.org/cats.mpg", 935 "actions": { 936 "watch": "movie://example.org/cats.mpg", 937 "share": { 938 "objectType": "service", 939 "displayName": "My Sharing Service", 940 "url": "http://example.net/share" 941 }, 942 "embed": [ 943 "http://example.org/gadgets/video.xml?v=cats.mpg", 944 { 945 "objectType": "inline-html", 946 "content": "