Abstract

This specification describes the Activity vocabulary.

Author's Note

This section is non-normative.

This draft is heavily influenced by the JSON Activity
Streams 1.0 specification originally co-authored by Martin
Atkins, Will Norris, Chris Messina, Monica Wilkinson, Rob Dolin and
James Snell. The author is very thankful for their significant
contributions and gladly stands on their shoulders. Some portions of
the original text of Activity Streams 1.0 are used in this document.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

Publication as a Working Draft does not imply endorsement by the W3C
Membership. This is a draft document and may be updated, replaced or obsoleted by other
documents at any time. It is inappropriate to cite this document as other than work in
progress.

1. Introduction

The Activity Streams 2.0 Vocabulary defines a set of abstract classes
and properties that describe past, present and future Activities.
The vocabulary is defined in two parts:

A Core set of properties describing the generalized structure of an
Activity; and

An Extended set of properties that cover specific types of Activities
and Artifacts common to many social Web application systems.

While not all Activity Streams 2.0 implementations are expected to
implement support for the Extended properties, all implementations MUST
at least be capable of serializing and deserializing the Extended
properties in accordance with the
Activity Streams 2.0 Core Syntax.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119].

1.1 Conventions

The examples included in this document use the normative JSON
serialization defined by this specification along with generally
equivalent, non-normative Microdata, RDFa, Microformats, and Turtle
serializations. These non-JSON alternatives are included solely for
illustrative purposes.

1.1.1 Editor's Note

This section is non-normative.

The Microdata, RDFa and Microformats examples included in this
document are purely informative and may not currently reflect actual
implementation experience or accepted best practices for each
format. These alternate serializations may be removed from future
iterations of this document and moved to a separate informative WG
Note.

2. Core Classes

The Activity Vocabulary Core Classes provide the basis for the rest of
the vocabulary.

A Link is an indirect, qualified reference to a resource identified
by a URL. The fundamental model for links is established by
[RFC5988]. Many of the properties defined by the Activity
Vocabulary allow values that are either instances of
Object or Link. When
a Link is used, it establishes a
qualified relation
connecting the subject (the containing object) to the resource
identified by the href.

<divitemscopeitemtype="http://www.w3.org/ns/activitystreams#Activity"><spanitemscopeitemtype="http://www.w3.org/ns/activitystreams#Person"itemprop="actor"><spanitemprop="name">Sally</span></span>
did something to
<spanitemscopeitemtype="http://www.w3.org/ns/activitystreams#Note"itemprop="object"><spanitemprop="name">A Note</span></span></div>

Example 13

<divvocab="http://www.w3.org/ns/activitystreams#"typeof="Activity"><spantypeof="Person"property="actor"><spanproperty="name">Sally</span></span>
did something to
<spantypeof="Note"property="object"><spanproperty="name">A Note</span></span></div>

An Activity is a subclass of Object that
describes some form of action that may happen, is currently
happening, or has already happened. The Activity
class itself serves as an abstract base class for all types of
activities. It is important to note that the Activity
class itself does not carry any specific semantics about the kind
of action being taken.

<divitemscopeitemtype="http://www.w3.org/ns/activitystreams#Travel"><metaitemscopeitemtype="http://www.w3.org/ns/activitystreams#Person"itemprop="actor"><metaitemprop="name">Sally</meta></meta>
is traveling to
<metaitemscopeitemtype="http://www.w3.org/ns/activitystreams#Place"itemprop="target"><metaitemprop="name">Work</meta></meta></div>

Example 18

<divvocab="http://www.w3.org/ns/activitystreams#"typeof="Travel"><metatypeof="Person"property="actor"><metaproperty="name">Sally</meta></meta>
is traveling to
<metatypeof="Place"property="target"><metaproperty="name">Work</meta></meta></div>

Example 19

<divclass="h-travel"><spanclass="p-author h-card">Sally</span>
is traveling to
<spanclass="h-geo"><spanclass="p-name">Work</span></span></div>

Support for specific extended vocabulary classes is expected to vary,
with implementations only selecting the extended classes and properties
that make sense within the specific context and requirements of those
applications. However, to avoid possible interoperability issues,
implementations MUST avoid using extension classes or properties that
unduly overlap with or duplicate the extended vocabulary defined here.

3.1 Activity Types

All Activity Types inherit the properties of the base Activity
class. Some specific Activity Types are subclasses or specializations
of more generalized Activity Types (for instance, the
Invite Activity Type is a more specific form of the
Offer Activity Type).

Indicates that the actor accepts the
object. The target property can be used
in certain circumstances to indicate the context into which the
object has been accepted. For instance, when
expressing the activity, "Sally accepted Joe into the Club", the
"target" would identify the "Club".

Indicates that the actor has added the
object to the target. If the
target property is not explicitly specified, the
target would need to be determined implicitly by context. The
origin can be used to identify the context from
which the object originated.

<divitemscopeitemtype="http://www.w3.org/ns/activitystreams#Arrive"><spanitemprop="actor"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Person"><spanitemprop="name">Sally</span></span>
arrived at
<spanitemprop="location"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Place"><spanitemprop="name">Work</span></span>
from
<spanitemprop="origin"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Place"><spanitemprop="name">Home</span></span></div>

Example 68

<divvocab="http://www.w3.org/ns/activitystreams#"typeof="Arrive"><spanproperty="actor"typeof="Person"><spanproperty="name">Sally</span></span>
arrived at
<spanproperty="location"typeof="Place"><spanproperty="name">Work</span></span>
from
<spanproperty="origin"typeof="Place"><spanproperty="name">Home</span></span></div>

An IntransitiveActivity that indicates that
the actor has arrived at the location.
The origin can be used to identify the context from
which the actor originated. The target
typically has no defined meaning.

<divitemscopeitemtype="http://www.w3.org/ns/activitystreams#Follow"><spanitemprop="actor"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Person"><spanitemprop="name">Sally</span></span>
followed
<spanitemprop="object"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Person"><spanitemprop="name">John</span></span></div>

Example 83

<divvocab="http://www.w3.org/ns/activitystreams#"typeof="Follow"><spanproperty="actor"typeof="Person"><spanproperty="name">Sally</span></span>
followed
<spanproperty="object"typeof="Person"><spanitemprop="name">John</span></span></div>

Indicates that the actor is "following" the
object. Following is defined in the sense typically
used within Social systems in which the actor is interested in
any activity performed by or on the object. The
target and origin typically have no
defined meaning.

<divitemscopeitemtype="http://www.w3.org/ns/activitystreams#Leave"><spanitemprop="actor"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Person"><spanitemprop="name">Sally</span></span>
left
<spanitemprop="object"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Place"><spanitemprop="name">Work</span></span></div>

Example 98

<divvocab="http://www.w3.org/ns/activitystreams#"typeof="Leave"><spanproperty="actor"typeof="Person"><spanproperty="name">Sally</span></span>
left
<spanproperty="object"typeof="Place"><spanproperty="name">Work</span></span></div>

Indicates that the actor is undoing the
object. In most cases, the object
will be an Activity describing some
previously performed action (for instance, a person may
have previously "liked" an article but, for whatever reason,
might choose to undo that like at some later point in time).

<divitemscopeitemtype="http://www.w3.org/ns/activitystreams#Move"><spanitemprop="actor"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Person"><spanitemprop="name">Sally</span></span>
moved to
<aitemprop="object"href="http://example.org/posts/1">
"http://example.org/posts/1"
</a>
from
<spanitemprop="origin"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Collection"><spanitemprop="name">List A</span></span>
to
<spanitemprop="target"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Collection"><spanitemprop="name">List B</span></span></div>

<divitemscopeitemtype="http://www.w3.org/ns/activitystreams#Travel"><spanitemprop="actor"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Person"><spanitemprop="name">Sally</span></span>
is traveling to
<spanitemprop="target"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Place"><spanitemprop="name">Home</span></span>
from
<spanitemprop="origin"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Place"><spanitemprop="name">Work</span></span></div>

Example 173

<divvocab="http://www.w3.org/ns/activitystreams#"typeof="Travel"><spanproperty="actor"typeof="Person"><spanproperty="name">Sally</span></span>
is traveling to
<spanproperty="target"typeof="Place"><spanproperty="name">Home</span></span>
from
<spanproperty="origin"typeof="Place"><spanproperty="name">Work</span></span></div>

Example 174

<divclass="h-as-travel"><spanclass="p-author h-card">Sally</span>
is traveling to
<spanclass="p-as-target h-geo"><spanclass="p-name">Home</span></span>
from
<spanclass="p-as-origin h-geo"><spanclass="p-name">Work</span></span></div>

Indicates that the actor is traveling to
target from origin. Travel
is an IntransitiveObject whose actor
specifies the direct object. If the target or
origin are not specified, either can be determined
by context.

<divitemscopeitemtype="http://www.w3.org/ns/activitystreams#Announce"><spanitemprop="actor"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Person"itemid="http://sally.example.org"><spanitemprop="name">Sally</span></span>
announced
<spanitemprop="object"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Arrive"><spanitemprop="actor"itemscope="Person"itemid="http://sally.example.org">her</span><spanitemprop="location"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Place">
at <spanitemprop="name">Work</span></span></span></div>

Example 178

<divvocab="http://www.w3.org/ns/activitystreams#"typeof="Announce"><spanproperty="actor"typeof="Person"resource="http://sally.example.org"><spanproperty="name">Sally</span></span>
announced
<spanproperty="object"typeof="Arrive"><spanproperty="actor"typeof="Person"resource="http://sally.example.org">her</span><spanproperty="location"typeof="Place">
at <spanproperty="name">Work</span></span></span></div>

Example 179

<divclass="h-as-announce"><spanclass="p-author h-card">Sally</span>
announced
<spanclass="p-item h-as-arrive">
her arrival at
<spanclass="p-location h-geo">work</span></span></div>

Indicates that the actor is blocking the
object. Blocking is a stronger form of
Ignore. The typical use is to support social
systems that allow one user to block activities or content of
other users. The target and origin
typically have no defined meaning.

{"@context":"http://www.w3.org/ns/activitystreams","type":"Question","name":"What is the answer?","oneOf":[{"type":"Note","name":"Option A"},{"type":"Note","name":"Option B"}]}

Example 197

<divitemscopeitemtype="http://www.w3.org/ns/activitystreams#Question"><h2itemprop="name">
What is the answer?
</h2><ul><liitemprop="oneOf"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Note"><spanitemprop="name">Option A</span></li><liitemprop="oneOf"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Note"><spanitemprop="name">Option B</span></li><ul></div>

Example 198

<divvocab="http://www.w3.org/ns/activitystreams#"typeof="Question"><h2property="name">What is the answer?</h2><ol><liproperty="oneOf"typeof="Note"><spanproperty="name">
Option A
</span></li><liproperty="oneOf"typeof="Note"><spanproperty="name">
Option B
</span></li></ol></div>

Example 199

<divclass="h-as-question"><h2class="p-name">
What is the answer?
</h2><ulclass="p-as-one-of"><liclass="h-entry"><spanclass-"p-name">Option A</span></li><liclass="h-entry"><spanclass-"p-name">Option B</span></li><ul></div>

Represents a question being asked. Question objects are an
extension of IntransitiveActivity. That is,
the Question object is an Activity, but the direct object is
the question itself and therefore it would not contain an
object property.

Either of the anyOf and
oneOf properties MAY be used to express
possible answers, but a Question object MUST NOT have
both properties.

3.3 Object and Link Types

All Object Types inherit the properties of the base Object class.
Link Types inherit the properties of the base Link class.
Some specific Object Types are subclasses or specializations of more
generalized Object Types (for instance, the Person
Object Type is a more specific form of the Actor class).

The "Domain" indicates the type of Object the property term applies to.
The "Range" indicates the type of value the property term can have.
Certain properties are marked as a "Subproperty Of" another term, meaning
that the term is a specialization of the referenced term. For instance,
actor is a subproperty of
attributedTo. Properties marked as being "Functional"
can have only one value. Items not marked as "Functional" can have
multiple values.

Identifies the context within which the object exists or an
activity was performed.

The notion of "context" used is intentionally vague. The intended
function is to serve as a means of grouping objects and activities
that share a common originating context or purpose. An example
could be all activities relating to a common project or event.

<divitemscopeitemtype="http://www.w3.org/ns/activitystreams#Collection"><metaitemprop="totalItems"content="3"/><aitemprop="first"href="http://example.org/collection?page=0">
First Page</a></div>

Example 353

<divvocab="http://www.w3.org/ns/activitystreams#"typeof="Collection"><metaproperty="totalItems"content="3"datatype="xsd:nonNegativeInteger"/><aproperty="first"href="http://example.org/collection?page=0">
First Page</a></div>

Example 354

<divclass="h-as-collection"><metaclass="p-as-total-items"name="totalItems"content="3"/><arel="first"href="http://example.org/collection?page=0">
First Page</a></div>

{"@context":"http://www.w3.org/ns/activitystreams","type":"Listen","actor":{"type":"Person","name":"Sally"},"object":"http://example.org/foo.mp3","instrument":{"type":"Service","name":"Acme Music Service"}}

Example 397

<divitemscopeitemtype="http://www.w3.org/ns/activitystreams#Listen"><spanitemprop="actor"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Person"><spanitemprop="name">Sally</span></span>
listened to
<aitemprop="object"href="http://example.org/foo.mp3"/>
using
<spanitemprop="instrument"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Service"><spanitemprop="name">
Acme Music Service
</span></span></div>

Example 398

<divvocab="http://www.w3.org/ns/activitystreams#"typeof="Listen"><spanproperty="actor"typeof="Person"><spanproperty="name">Sally</span></span>
listened to
<aproperty="object"href="http://example.org/foo.mp3">
http://example.org/foo.mp3
>
using
<spanproperty="instrument"typeof="Service"><spanproperty="name">
Acme Music Service
</span></span></div>

Example 399

<divclass="h-entry"><spanclass="p-author h-card">Sally</span>
listened to
<ahref="http://example.org/foo.mp3"/>
using
<spanclass="h-entry p-name>
Acme Music Service
</span></div>

<divitemscopeitemtype="http://www.w3.org/ns/activitystreams#Collection"><metaitemprop="totalItems"content="5"/><aitemprop="last"href="http://example.org/collection?page=1">
Last Page</a></div>

Example 403

<divvocab="http://www.w3.org/ns/activitystreams#"typeof="Collection"><metaproperty="totalItems"content="3"datatype="xsd:nonNegativeInteger"/><aproperty="last"href="http://example.org/collection?page=1">
Last Page</a></div>

Example 404

<divclass="h-as-collection"><metaclass="p-as-total-items"name="totalItems"content="3"/><arel="last"href="http://example.org/collection?page=1">
Last Page</a></div>

<divitemscopeitemtype="http://www.w3.org/ns/activitystreams#Person"><spanitemprop="name">Sally</span>
is at
<spanitemprop="location"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Place">
Latitude
<spanitemprop="latitude">56.78</span>,
Longitude
<spanitemprop="longitude">12.34</span>,
at an altitude of
<spanitemprop="altitude">90</span><metaitemprop="units"content="m">meters</meta></span></div>

Example 413

<divvocab="http://www.w3.org/ns/activitystreams#"typeof="Person"><spanproperty="name">Sally</span>
is at
<spanproperty="location"typeof="Place">
Latitude
<spanproperty="latitude"datatype="xsd:float">56.78</span>,
Longitude
<spanproperty="longitude"datatype="xsd:float">12.34</span>,
at an altitude of
<spanproperty="altitude"datatype="xsd:float">90</span><metaproperty="units">meters</meta></span></div>

Example 414

<divclass="h-entry"><spanclass="h-card">Sally</span>
is at
<spanclass="p-location h-geo">
Latitude
<spanclass="p-latitude">56.78</span>,
Longitude
<spanclass="p-longitude">12.34</span>,
at an altitude of
<spanclass="p-altitude">90</span><metaclass="p-as-units"content="m">meters</meta></span></div>

{"@context":"http://www.w3.org/ns/activitystreams","type":"Question","name":"What is the answer?","oneOf":[{"type":"Note","name":"Option A"},{"type":"Note","name":"Option B"}]}

Example 427

<divitemscopeitemtype="http://www.w3.org/ns/activitystreams#Question"><h2itemprop="name">
What is the answer?
</h2><ul><liitemprop="oneOf"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Note"><spanitemprop="name">Option A</span></li><liitemprop="oneOf"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Note"><spanitemprop="name">Option B</span></li><ul></div>

Example 428

<divvocab="http://www.w3.org/ns/activitystreams#"typeof="Question"><h2property="name">
What is the answer?
</h2><ul><liproperty="oneOf"typeof="Note"><spanproperty="name">Option A</span></li><liproperty="oneOf"typeof="Note"><spanproperty="name">Option B</span></li><ul></div>

Example 429

<divclass="h-as-question"><h2class="p-name">
What is the answer?
</h2><ulclass="p-as-one-of"><liclass="h-entry"><spanclass-"p-name">Option A</span></li><liclass="h-entry"><spanclass-"p-name">Option B</span></li><ul></div>

{"@context":"http://www.w3.org/ns/activitystreams","type":"Question","name":"What is the answer?","anyOf":[{"type":"Note","name":"Option A"},{"type":"Note","name":"Option B"}]}

Example 432

<divitemscopeitemtype="http://www.w3.org/ns/activitystreams#Question"><h2itemprop="name">
What is the answer?
</h2><ul><liitemprop="anyOf"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Note"><spanitemprop="name">Option A</span></li><liitemprop="anyOf"itemscopeitemtype="http://www.w3.org/ns/activitystreams#Note"><spanitemprop="name">Option B</span></li><ul></div>

Example 433

<divvocab="http://www.w3.org/ns/activitystreams#"typeof="Question"><h2property="name">
What is the answer?
</h2><ul><liproperty="anyOf"typeOf="Note"><spanproperty="name">Option A</span></li><liproperty="anyOf"typeof="Note"><spanproperty="name">Option B</span></li><ul></div>

Example 434

<divclass="h-as-question"><h2class="p-name">
What is the answer?
</h2><ulclass="p-as-any-of"><liclass="h-entry"><spanclass-"p-name">Option A</span></li><liclass="h-entry"><spanclass-"p-name">Option B</span></li><ul></div>

Describes an indirect object of the activity from which
the activity is directed. The precise meaning of the origin is the
object of the English preposition "from". For instance, in the
activity "John moved an item to List B from List A", the origin of
the activity is "List A".