TOC 
Activity Streams Working GroupJ. Snell
 IBM
 M. Atkins
 SAY Media
 D. Recordon
 Six Apart, Facebook
 C. Messina
 Citizen Agency, Google
 M. Keller
 MySpace, Facebook
 A. Steinberg
 Facebook
 R. Dolin
 Microsoft
 August 30, 2012


Activity Base Schema (Draft)

Abstract

This document presents a base set of Object types and Verbs for use with Activity Streams.

Requirements Language

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 RFC 2119 (Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels,” March 1997.) [RFC2119].



Table of Contents

1.  Introduction
    1.1.  Notational Conventions
2.  Verbs
3.  Object Types
    3.1.  Audio and Video Objects
    3.2.  Binary Objects
    3.3.  Event
    3.4.  Issue
    3.5.  Place
    3.6.  Task
4.  Base Extension Properties
    4.1.  Context
    4.2.  Location
    4.3.  Mood
    4.4.  Rating
    4.5.  Result
    4.6.  Source
    4.7.  Starting and Ending Timestamps
    4.8.  Tags
5.  Multi-page Collections
6.  External Vocabularies
    6.1.  "dc"
    6.2.  "geojson"
    6.3.  "ld"
    6.4.  "links"
        6.4.1.  Link Objects
    6.5.  "odata"
    6.6.  "opengraph"
    6.7.  "schema_org"
7.  Normative References
§  Authors' Addresses




 TOC 

1.  Introduction

This document presents a base set of object types and verbs for use with Activity Streams.



 TOC 

1.1.  Notational Conventions

This specification allows the use of IRIs (Duerst, M. and M. Suignard, “Internationalized Resource Identifiers (IRIs),” January 2005.) [RFC3987]. Every URI (Berners-Lee, T., Fielding, R., and L. Masinter, “Uniform Resource Identifier (URI): Generic Syntax,” January 2005.) [RFC3986] is also an IRI, so a URI MAY be used wherever an IRI is named. When an IRI that is not also a URI is given for dereferencing, it MUST be mapped to a URI using the steps in Section 3.1 of [RFC3987] (Duerst, M. and M. Suignard, “Internationalized Resource Identifiers (IRIs),” January 2005.). When an IRI is serving as an identifier, it MUST NOT be so mapped.

Unless otherwise specified, all properties specifying date and time values MUST conform to the "date-time" production in [RFC3339] (Klyne, G., Ed. and C. Newman, “Date and Time on the Internet: Timestamps,” July 2002.). In addition, an uppercase "T" character MUST be used to separate date and time, and an uppercase "Z" character MUST be present in the absence of a numeric time zone offset.



 TOC 

2.  Verbs

This specification defines the following core verbs in addition to the default post verb that is defined in Section 6 of [activitystreams] (Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.):

VerbDescription
accept  Indicates that that the actor has accepted the object. For instance, a person accepting an award, or accepting an assignment.
access  Indicates that the actor has accessed the object. For instance, a person accessing a room, or accessing a file.
acknowledge  Indicates that the actor has acknowledged the object. This effectively signals that the actor is aware of the object's existence.
add  Indicates that the actor has added the object to the target. For instance, adding a photo to an album.
agree  Indicates that the actor agrees with the object. For example, a person agreeing with an argument, or expressing agreement with a particular issue.
append  Indicates that the actor has appended the object to the target. For instance, a person appending a new record to a database.
approve  Indicates that the actor has approved the object. For instance, a manager might approve a travel request.
archive  Indicates that the actor has archived the object.
assign  Indicates that the actor has assigned the object to the target.
at  Indicates that the actor is currently located at the object. For instance, a person being at a specific physical location.
attach  Indicates that the actor has attached the object to the target. For instance, a person attaching a file to a wiki page or an email.
attend  Indicates that the actor has attended the object. For instance, a person attending a meeting.
author  Indicates that the actor has authored the object. Note that this is a more specific form of the verb "create".
authorize  Indicates that the actor has authorized the object. If a target is specified, it means that the authorization is specifically in regards to the target. For instance, a service can authorize a person to access a given application; in which case the actor is the service, the object is the person, and the target is the application. In contrast, a person can authorize a request; in which case the actor is the person and the object is the request and there might be no explicit target.
borrow  Indicates that the actor has borrowed the object. If a target is specified, it identifies the entity from which the object was borrowed. For instance, if a person borrows a book from a library, the person is the actor, the book is the object and the library is the target.
build  Indicates that the actor has built the object. For example, if a person builds a model or compiles code.
cancel  Indicates that the actor has canceled the object. For instance, canceling a calendar event.
close  Indicates that the actor has closed the object. For instance, the object could represent a ticket being tracked in an issue management system.
complete  Indicates that the actor has completed the object.
confirm  Indicates that the actor has confirmed or agrees with the object. For instance, a software developer might confirm an issue reported against a product.
consume  Indicates that the actor has consumed the object. The specific meaning is dependent largely on the object's type. For instance, an actor may "consume" an audio object, indicating that the actor has listened to it; or an actor may "consume" a book, indicating that the book has been read. As such, the "consume" verb is a more generic form of other more specific verbs such as "read" and "play".
checkin  Indicates that the actor has checked-in to the object. For instance, a person checking-in to a Place.
create  Indicates that the actor has created the object.
delete  Indicates that the actor has deleted the object. This implies, but does not require, the permanent destruction of the object.
deliver  Indicates that the actor has delivered the object. For example, delivering a package.
deny  Indicates that the actor has denied the object. For example, a manager may deny a travel request.
disagree  Indicates that the actor disagrees with the object.
dislike  Indicates that the actor dislikes the object. Note that the "dislike" verb is distinct from the "unlike" verb which assumes that the object had been previously "liked".
experience  Indicates that the actor has experienced the object in some manner. Note that, depending on the specific object types used for both the actor and object, the meaning of this verb can overlap that of the "consume" and "play" verbs. For instance, a person might "experience" a movie; or "play" the movie; or "consume" the movie. The "experience" verb can be considered a more generic form of other more specific verbs as "consume", "play", "watch", "listen", and "read"
favorite  Indicates that the actor marked the object as an item of special interest.
find  Indicates that the actor has found the object.
flag-as-inappropriate  Indicates that the actor has flagged the object as being inappropriate for some reason. When using this verb, the context property, as specified within Section 4.1 (Context) can be used to provide additional detail about why the object has been flagged.
follow  Indicates that the actor began following the activity of the object. In most cases, the objectType will be a "person", but it can potentially be of any type that can sensibly generate activity. Processors MAY ignore (silently drop) successive identical "follow" activities.
give  Indicates that the actor is giving an object to the target. Examples include one person giving a badge object to another person. The object identifies the object being given. The target identifies the receiver.
host  Indicates that the actor is hosting the object. As in hosting an event, or hosting a service.
ignore  Indicates that the actor has ignored the object. For instance, this verb may be used when an actor has ignored a friend request, in which case the object may be the request-friend activity.
insert  Indicates that the actor has inserted the object into the target.
install  Indicates that the actor has installed the object, as in installing an application.
interact  Indicates that the actor has interacted with the object. For instance, when one person interacts with another.
invite  Indicates that the actor has invited the object, typically a person object, to join or participate in the object described by the target. The target could, for instance, be an event, group or a service.
join  Indicates that the actor has become a member of the object. This specification only defines the meaning of this verb when the object of the Activity has an objectType of group, though implementors need to be prepared to handle other types of objects.
leave  Indicates that the actor has left the object. For instance, a Person leaving a Group or checking-out of a Place.
like  Indicates that the actor marked the object as an item of special interest. The "like" verb is considered to be an alias of "favorite". The two verb are semantically identical.
listen  Indicates that the actor has listened to the object. This is typically only applicable for objects representing audio content, such as music, an audio-book, or a radio broadcast. The "listen" verb is a more specific form of the "consume", "experience" and "play" verbs.
lose  Indicates that the actor has lost the object. For instance, if a person loses a game.
make-friend  Indicates the creation of a friendship that is reciprocated by the object. Since this verb implies an activity on the part of its object, processors MUST NOT accept activities with this verb unless they are able to verify through some external means that there is in fact a reciprocated connection. For example, a processor may have received a guarantee from a particular publisher that the publisher will only use this Verb in cases where a reciprocal relationship exists.
open  Indicates that the actor has opened the object. For instance, the object could represent a ticket being tracked in an issue management system.
play  Indicates that the actor spent some time enjoying the object. For example, if the object is a video this indicates that the subject watched all or part of the video. The "play" verb is a more specific form of the "consume" verb.
present  Indicates that the actor has presented the object. For instance, when a person gives a presentation at a conference.
purchase  Indicates that the actor has purchased the object. If a target is specified, in indicates the entity from which the object was purchased.
qualify  Indicates that the actor has qualified for the object. If a target is specified, it indicates the context within which the qualification applies.
read  Indicates that the actor read the object. This is typically only applicable for objects representing printed or written content, such as a book, a message or a comment. The "read" verb is a more specific form of the "consume", "experience" and "play" verbs.
receive  Indicates that the actor is receiving an object. Examples include a person receiving a badge object. The object identifies the object being received.
reject  Indicates that the actor has rejected the object.
remove  Indicates that the actor has removed the object from the target.
remove-friend  Indicates that the actor has removed the object from the collection of friends.
replace  Indicates that the actor has replaced the target with the object.
request  Indicates that the actor has requested the object. If a target is specified, it indicates the entity from which the object is being requested.
request-friend  Indicates the creation of a friendship that has not yet been reciprocated by the object.
resolve  Indicates that the actor has resolved the object. For instance, the object could represent a ticket being tracked in an issue management system.
return  Indicates that the actor has returned the object. If a target is specified, it indicates the entity to which the object was returned.
retract  Indicates that the actor has retracted the object. For instance, if an actor wishes to retract a previously published activity, the object would be the previously published activity that is being retracted.
rsvp-maybe  The "possible RSVP" verb indicates that the actor has made a possible RSVP for the object. This specification only defines the meaning of this verb when its object is an event (see Section 3.3 (Event)), though implementors need to be prepared to handle other object types. The use of this verb is only appropriate when the RSVP was created by an explicit action by the actor. It is not appropriate to use this verb when a user has been added as an attendee by an event organiser or administrator.
rsvp-no  The "negative RSVP" verb indicates that the actor has made a negative RSVP for the object. This specification only defines the meaning of this verb when its object is an event (see Section 3.3 (Event)), though implementors need to be prepared to handle other object types. The use of this verb is only appropriate when the RSVP was created by an explicit action by the actor. It is not appropriate to use this verb when a user has been added as an attendee by an event organiser or administrator.
rsvp-yes  The "positive RSVP" verb indicates that the actor has made a positive RSVP for an object. This specification only defines the meaning of this verb when its object is an event (see Section 3.3 (Event)), though implementors need to be prepared to handle other object types. The use of this verb is only appropriate when the RSVP was created by an explicit action by the actor. It is not appropriate to use this verb when a user has been added as an attendee by an event organiser or administrator.
satisfy  Indicates that the actor has satisfied the object. If a target is specified, it indicate the context within which the object was satisfied. For instance, if a person satisfies the requirements for a particular challenge, the person is the actor; the requirement is the object; and the challenge is the target.
save  Indicates that the actor has called out the object as being of interest primarily to him- or herself. Though this action MAY be shared publicly, the implication is that the object has been saved primarily for the actor's own benefit rather than to show it to others as would be indicated by the "share" verb.
schedule  Indicates that the actor has scheduled the object. For instance, scheduling a meeting.
search  Indicates that the actor is or has searched for the object. If a target is specified, it indicates the context within which the search is or has been conducted.
sell  Indicates that the actor has sold the object. If a target is specified, it indicates the entity to which the object was sold.
send  Indicates that the actor has sent the object. If a target is specified, it indicates the entity to which the object was sent.
share  Indicates that the actor has called out the object to readers. In most cases, the actor did not create the object being shared, but is instead drawing attention to it.
sponsor  Indicates that the actor has sponsored the object. If a target is specified, it indicates the context within which the sponsorship is offered. For instance, a company can sponsor an event; or an individual can sponsor a project; etc.
start  Indicates that the actor has started the object. For instance, when a person starts a project.
stop-following  Indicates that the actor has stopped following the object.
submit  Indicates that the actor has submitted the object. If a target is specified, it indicates the entity to which the object was submitted.
tag  Indicates that the actor has associated the object with the target. For example, if the actor specifies that a particular user appears in a photo. the object is the user and the target is the photo.
terminate  Indicates that the actor has terminated the object.
tie  Indicates that the actor has neither won or lost the object. This verb is generally only applicable when the object represents some form of competition, such as a game.
unfavorite  Indicates that the actor has removed the object from the collection of favorited items.
unlike  Indicates that the actor has removed the object from the collection of liked items.
unsatisfy  Indicates that the actor has not satisfied the object. If a target is specified, it indicates the context within which the object was not satisfied. For instance, if a person fails to satisfy the requirements of some particular challenge, the person is the actor; the requirement is the object and the challenge is the target.
unsave  Indicates that the actor has removed the object from the collection of saved items.
unshare  Indicates that the actor is no longer sharing the object. If a target is specified, it indicates the entity with whom the object is no longer being shared.
update  The "update" verb indicates that the actor has modified the object. Use of the "update" verb is generally reserved to indicate modifications to existing objects or data such as changing an existing user's profile information.
use  Indicates that the actor has used the object in some manner.
watch  Indicates that the actor has watched the object. This verb is typically applicable only when the object represents dynamic, visible content such as a movie, a television show or a public performance. This verb is a more specific form of the verbs "experience", "play" and "consume".
win  Indicates that the actor has won the object. This verb is typically applicable only when the object represents some form of competition, such as a game.



 TOC 

3.  Object Types

The table contains the core set of common objectTypes in addition to the activity objectType defined in Section 7 of [activitystreams] (Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.).

All Activity Stream Objects inherit the same fundamental set of basic properties as defined in section 3.4 of [activitystreams] (Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.). In addition to these, objects of any specific type are permitted to introduce additional optional or required properties that are meaningful to objects of that type.

Object TypeDescription
alert  Represents any kind of significant notification.
application  Represents any kind of software application.
article  Represents objects such as news articles, knowledge base entries, or other similar construct. Such objects generally consist of paragraphs of text, in some cases incorporating embedded media such as photos and inline hyperlinks to other resources.
audio  Represents audio content of any kind. Objects of this type MAY contain an additional property as specified in Section 3.1 (Audio and Video Objects).
badge  Represents a badge or award granted to an object (typically a person object)
binary  Objects of this type are used to carry arbirary Base64-encoded binary data within an Activity Stream object. It is primarily intended to attach binary data to other types of objects through the use of the attachments property. Objects of this type will contain the additional properties specified in Section 3.2 (Binary Objects).
bookmark  Represents a pointer to some URL -- typically a web page. In most cases, bookmarks are specific to a given user and contain metadata chosen by that user. Bookmark Objects are similar in principle to the concept of bookmarks or favorites in a web browser. A bookmark represents a pointer to the URL, not the URL or the associated resource itself. Objects of this type SHOULD contain an additional targetUrl property whose value is a String containing the IRI of the target of the bookmark.
collection  Represents a generic collection of objects of any type. This object type can be used, for instance, to represent a collection of files like a folder; a collection of photos like an album; and so forth. Objects of this type MAY contain an additional objectTypes property whose value is an Array of Strings specifying the expected objectType of objects contained within the collection.
comment  Represents a textual response to another object. Objects of this type MAY contain an additional inReplyTo property whose value is an Array of one or more other Activity Stream Objects for which the object is to be considered a response.
device  Represents a device of any sort.
event  Represents an event that occurs at a certain location during a particular period of time. Objects of this type MAY contain the additional properties specified in Section 3.3 (Event).
file  Represents any form of document or file. Objects of this type MAY contain an additional fileUrl property whose value a dereferenceable IRI that can be used to retrieve the file; and an additional mimeType property whose value is the MIME type of the file described by the object.
game  Represents a game or competition of any kind.
group  Represents a grouping of objects in which member objects can join or leave.
image  Represents a graphical image. Objects of this type MAY contain an additional fullImage property whose value is an Activity Streams Media Link to a "full-sized" representation of the image.
issue  Represents a report about a problem or situation that needs to be resolved. For instance, the issue object can be used to represent reports detailing software defects, or reports of acceptable use violations, and so forth. Objects of this type MAY contain the additional properties specified in Section 3.4 (Issue).
job  Represents information about a job or a job posting.
note  Represents a short-form text message. This object is intended primarily for use in "micro-blogging" scenarios and in systems where users are invited to publish short, often plain-text messages whose useful lifespan is generally shorter than that of an article of weblog entry. A note is similar in structure to an article, but typically does not have a title or distinct paragraphs and tends to be much shorter in length.
offer  Represents an offer of any kind.
organization  Represents an organization of any kind.
page  Represents an area, typically a web page, that is representative of, and generally managed by a particular entity. Such areas are usually dedicated to displaying descriptive information about the entity and showcasing recent content such as articles, photographs and videos. Most social networking applications, for example, provide individual users with their own dedicated "profile" pages. Several allow similar types of pages to be created for commercial entities, organizations or events. While the specific details of how pages are implemented, their characteristics and use may vary, the one unifying property is that they are typically "owned" by a single entity that is represented by the content provided by the page itself.
person  Represents an individual person.
place  Represents a physical location. Locations can be represented using geographic coordinates, a physical address, a free-form location name, or any combination of these. Objects of this type MAY contain the additional properties specified in Section 3.5 (Place).
process  Represents any form of process. For instance, a long-running task that is started and expected to continue operating for a period of time.
product  Represents a commercial good or service. Objects of this type MAY contain an additional fullImage property whose value is an Activity Streams Media Link to an image resource representative of the product.
question  Represents a question or a poll. Objects of this type MAY contain an additional options property whose value is an Array of possible answers to the question in the form of Activity Stream objects of any type.
review  Represents a primarily prose-based commentary on another object. Objects of this type MAY contain a rating property as specified in Section 4.4 (Rating).
service  Represents any form of hosted or consumable service that performs some kind of work or benefit for other entities. Examples of such objects include websites, businesses, etc.
task  Represents an activity that has yet to be completed. Objects of this type can contain additional properties as specified in Section 3.6 (Task).
video  Represents video content of any kind. Objects of this type MAY contain additional properties as specified in Section 3.1 (Audio and Video Objects).



 TOC 

3.1.  Audio and Video Objects

In addition to the core properties shared by all Activity Streams Objects, "audio" and "video" objects MAY contain the following properties:

PropertyValueDescription
embedCode  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String A fragment of HTML markup that, when embedded within another HTML page, provides an interactive user-interface for viewing or listening to the video or audio stream.
stream  Media Link An Activity Streams Media Link to the video or audio content itself.



 TOC 

3.2.  Binary Objects

The "binary" object type is used to carry arbitrary Base64-encoded binary data within an Activity Stream object. It is primarily intended to attach binary data to other object types through the use of the "attachments" property.

In addition to the core properties shared by all Activity Streams Objects, "binary" objects MAY contain the following properties:

PropertyValueDescription
compression  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String An optional token identifying a compression algorithm applied to the binary data prior to Base64-encoding. Possible algorithms are "deflate" and "gzip", respectively indicating the use of the compression mechanisms defined by [RFC1951] (Deutsch, P., “DEFLATE Compressed Data Format Specification version 1.3,” May 1996.) and [RFC1952] (Deutsch, P., Gailly, J-L., Adler, M., Deutsch, L., and G. Randers-Pehrson, “GZIP file format specification version 4.3,” May 1996.). Additional compression algorithms MAY be used but are not defined by this specification. Note that previous versions of this specification allowed for multiple compression algorithms to be applied and listed using a comma-separated format. The use of multiple compressions is no longer permitted.
data  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String The URL-Safe Base64-encoded representation of the binary data.
fileUrl  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String An optional IRI for the binary data described by this object.
length  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] Number The total number of unencoded, uncompressed octets contained within the "data" field represented as a non-negative integer value.
md5  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String An optional MD5 checksum calculated over the unencoded, uncompressed octets contained with the "data" field.
mimeType  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String The MIME type of the object described by the object.

Note that the binary and file objectTypes are conceptually related. The key difference between the two lies in the fact that the file objectType is more representative of the abstract description of a file or document while the binary objectType represents the actual, concrete stream of octets that make up the content.

Because of their close relationship, it is possible for the file objectType to share the same basic properties as the binary objectType. That is, a file MAY also have properties such as length, mimeType, and md5.



 TOC 

3.3.  Event

In addition to the core properties shared by all Activity Streams Objects, "event" objects MAY contain the following properties:

PropertyValueDescription
attendedBy  Collection object A Collection object as defined in Section 3.5 of [activitystreams] (Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.) that provides information about entities that attended the event.
attending  Collection object A Collection object as defined in Section 3.5 of [activitystreams] (Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.) that provides information about entities that intend to attend the event.
endTime  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String The date and time that the event ends represented as a JSON String conforming to the "date-time" production in [RFC3339] (Klyne, G., Ed. and C. Newman, “Date and Time on the Internet: Timestamps,” July 2002.)
invited  Collection object A Collection object as defined in Section 3.5 of [activitystreams] (Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.) that provides information about the entities that have been invited to the event.
maybeAttending  Collection object A Collection object as defined in Section 3.5 of [activitystreams] (Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.) that provides information about entities that possibly may attend the event.
notAttendedBy  Collection object A Collection object as defined in Section 3.5 of [activitystreams] (Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.) that provides information about entities that did not attend the event.
notAttending  Collection object A Collection object as defined in Section 3.5 of [activitystreams] (Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.) that provides information about e entities that do not intend to attend the event.
startTime  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String The date and time that the event begins represented as a JSON String conforming to the "date-time" production in [RFC3339] (Klyne, G., Ed. and C. Newman, “Date and Time on the Internet: Timestamps,” July 2002.)



 TOC 

3.4.  Issue

In addition to the core properties shared by all Activity Streams Objects, "issue" objects MAY contain the following properties:

PropertyValueDescription
types  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] Array An array of one or more absolute IRI's that describe the type of issue represented by the object.



 TOC 

3.5.  Place

In addition to the core properties shared by all Activity Streams Objects, "place" objects MAY contain the following properties:

PropertyValueDescription
position  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] Object The latitude, longitude and altitude of the place as a point on Earth. Represented as on object with three properties as described below.
address  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] Object A physical address represented as a JSON object with the properties defined in the table below.

The properties for the position property are:

PropertyValueDescription
altitude  Number The elevation of this point relative to the Earth, in meters above or below mean sea level. (e.g. 8848.00, -86.00).
latitude  Number The latitude of this point on Earth according to the WGS-84 coordinate reference system in decimal degrees (e.g. 27.9881, -3.12676).
longitude  Number The longitude of this point on Earth according to the WGS-84 coordinate reference system in decimal degrees (e.g. 86.9253, -134.4323).

Note that in older versions of this specification, the value of the position property was represented as an ISO 6709 compliant String. For instance "position":"+27.5916+086.5640+8850/". This format has been deprecated and SHOULD NOT be used. However, there might be existing deployed applications still utilizing the ISO 6709. Consuming implementations can choose to continue supporting the ISO 6709 format but SHOULD NOT produce Activity Streams that use the deprecated format.

The properties for the address property are:

PropertyValueDescription
formatted  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String The full mailing address formatted for display or use with a mailing label.
streetAddress  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String The street address including house number, street name, P.O. Box, and extended multi-line address information.
locality  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String The city or locality.
region  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String The state or region.
postalCode  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String The zip or postal code.
country  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String The country name component.



 TOC 

3.6.  Task

In addition to the core properties shared by all Activity Streams Objects, "task" objects MAY contain the following properties:

PropertyValueDescription
actor  Object An Activity Streams Object that provides information about the actor that is expected to complete the task.
by  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String A "date-time" (Klyne, G., Ed. and C. Newman, “Date and Time on the Internet: Timestamps,” July 2002.) [RFC3339] specifying the date and time by which the task is to be completed.
object  Object An Activity Streams object describing the object of the task.
prerequisites  Array of Tasks An Array of other "task" objects to be completed before this task can be completed.
required  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] Boolean A boolean value indicating whether completion of the task is considered to be mandatory or not.
supersedes  Array of Tasks An Array of other "task" objects superseded by this this task object.
verb  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String A String indicating the verb for this task as defined for the verb property in an Activity in Section 3.2 of [activitystreams] (Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.).



 TOC 

4.  Base Extension Properties

This specification defines an initial set of extension properties that can be used with all activities or objects.



 TOC 

4.1.  Context

The basic model for an Activity provides properties that allow the expression of who (actor) performed the action, what (object) was acted upon, the action (verb) that was taken, and to what the action was directed (target). The additional context property allows the Activity to further include information about why a particular action occurred by providing details about the context within which a particular Activity was performed. The value of the context property is an Object of any objectType. The meaning of the context property is only defined when used within an Activity object.

For example, the following Activity uses the context property to reference the specific reasons a particular article object has been flagged as being inappropriate:

  {
    "actor": {
      "objectType": "person",
      "displayName": "Joe"
    },
    "verb": "flag-as-inappropriate",
    "object": {
      "objectType": "article",
      "displayName": "An article about stuff"
    },
    "context": {
      "objectType": "issue",
      "displayName": "Terms of Use Violation",
      "url": "http://.../terms-of-use",
      "types": [
        "http://example.org/codes/inappropriateMaterial",
        "http://example.org/codes/copyrightViolation"
      ]
    }
  }


 TOC 

4.2.  Location

Location data can be added to any object type or activity. Location can be specified via geographic coordinates, a street address, a free-form location name or any combination of these.

Within a JSON-serialized Activity Stream, the Location is represented using a property named location whose value is a Place (Place) object. The objectType property of this object MAY be omitted.

When appearing within an activity, the location data indicates the location where the activity occurred. When appearing within an object, the location data indicates the location of that object at the time the activity occurred.

For example:

  {
    "objectType": "person",
    "displayName": "John Doe",
    "location": {
      "displayName": "Mount Everest",
      "position": {
        "altitude": 8848.00,
        "latitude": 27.9881,
        "longitude": 86.9253
      }
    }
  }


 TOC 

4.3.  Mood

Mood describes the mood of the user when the activity was performed. This is usually collected via an extra field in the user interface used to perform the activity. For the purpose of this schema, a mood is a freeform, short mood keyword or phrase along with an optional mood icon image.

In JSON, Moods are included within an object or activity using a property named mood whose value is a JSON object with the following properties:

PropertyValueDescription
displayName  JSON (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627] String The natural-language, human-readable and plain-text keyword or phrase describing the mood. HTML markup MUST NOT be included
image  Media Link An optional image that provides a visual representation of the mood.

For example:

  {
    "objectType": "note",
    "content": "Working on the activity streams spec",
    "mood": {
      "displayName": "Optimistic",
      "image": "http://example.org/moods/optimistic.png"
    }
  }


 TOC 

4.4.  Rating

A rating given as a number between 1.0 and 5.0 inclusive with one decimal place of precision. Represented in JSON as a property called rating whose value is a JSON number giving the rating.

Ratings are generally most useful only for particular types of objects, such as audio, video, photos and places.

For example:

  {
    "objectType": "review",
    "content": "This is a great product",
    "rating": 3.5
  }


 TOC 

4.5.  Result

The result provides a description of the result of any particular activity. The value of the result property is an Object of any objectType. The meaning of the result property is only defined when used within an Activity object.

For instance:

  {
    "actor": {
      "objectType": "person",
      "displayName": "Joe"
    },
    "verb": "complete",
    "object": {
      "objectType": "http://example.org/Exam",
      "displayName": "The Big Exam"
    },
    "result": {
      "score": 123,
      "duration": "P1H",
    }
  }

Use of the result property is only applicable with certain combinations of verbs and objectTypes. In many cases, the result will be implicit in the combination of actor, verb and object used -- for example, in an activity where a person, Joe, creates an article, the result of the activity is clear without the need to specify a separate result property.



 TOC 

4.6.  Source

The source property provides a reference to the original source of an object or activity. The value of the source property is an Object of any objectType.

The source property is closely related to the generator and provider properties but serves the distinct purpose of identifying where the activity or object was originally published as opposed to identifying the applications that generated or published it.

For example:

  {
    "actor": {
      "objectType": "person",
      "displayName": "Joe"
    },
    "verb": "post",
    "object": {
      "objectType": "photo",
      "image": "http://example.org/photos/fluffycat.jpg"
    },
    "source": {
      "objectType": "collection",
      "displayName": "Joe's Photo's",
      "url": "http://example.org/joes/photos"
    }
  }


 TOC 

4.7.  Starting and Ending Timestamps

When an long running Activity occurs over a distinct period of time, or when an Object represents a long-running process or event, the startTime and endTime properties can be used to specify the date and time at which the activity or object begins or concludes. The values for each are represented as JSON Strings conforming to the "date-time" production in [RFC3339] (Klyne, G., Ed. and C. Newman, “Date and Time on the Internet: Timestamps,” July 2002.).

For example:

  {
    "actor": {
      "objectType": "person",
      "displayName": "John Doe"},
    "verb": "at",
    "object": {
      "objectType":"place",
      "displayName":"Home"},
    "published": "2012-08-28T03:34:23Z",
    "startTime": "2012-08-12T12:13:14Z",
    "endTime": "2012-08-13T01:34:12Z"
  }

The startTime and endTime verbs can be used independently or together. If both are specified, the endTime property MUST specify a moment in time that is more recent that that specified by the startTime property.



 TOC 

4.8.  Tags

A listing of the objects that have been associated with a particular object using the tag verb. Represented in JSON using a property named tags whose value is an Array of objects.

For example:

  {
    "objectType": "photo",
    "image": "http://example.org/photos/fluffycat.jpg",
    "tags": [
      {
        "objectType": "person",
        "displayName": "John"
      },
      {
        "objectType": "person",
        "displayName": "Jane"
      }
    ]
  }


 TOC 

5.  Multi-page Collections

A multi-page collection is a set of linked collection objects that together contain the complete set of objects that can be considered to be members of the collection.

When using multi-paged collections, the following additional properties can be used in addition to the core collection properties defined in section 3.5 of [activitystreams] (Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.).

NameValueDescription
itemsAfter  String An RFC 3339 date-time, as described in Section 3 of [activitystreams] (Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.), indicating that the items array contains only items published or updated after the date and time specified.
itemsBefore  String An RFC 3339 date-time, as described in Section 3 of [activitystreams] (Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.), indicating that the items array contains only items published or updated before the date and time specified.
itemsPerPage  Integer A non-negative integer specifying the maximum number of objects that will be included in the value of the items array.
links  Links ("links") Collection of links connecting this collection object to the other collection objects containing additional items that can be considered members of the collection.
startIndex  Integer A non-negative integer value identifying the relative position within the collection of the first object contained in the items property. For instance, if there are 20 items that are considered to be members of a collection, but only the last 10 of those items are serialized within the value of the items property, the value of startIndex would be 10.

The value of the links property is an object as defined in Section 6.4 ("links"). The properties of the object are Registered or Extension Link Relations as defined by [RFC5988] (Nottingham, M., “Web Linking,” October 2010.). The following Registered Link Relations are identified as having specific purpose for use with Multi-page Collections:

NameValueDescription
first  Link Object (Link Objects) A Link Object referencing the furthest preceding page of the multi-page collection.
last  Link Object (Link Objects) A Link Object referencing the furthest following page of the multi-page collection.
prev  Link Object (Link Objects) A Link Object referencing the immediately preceding page of the multi-page collection. Note that the property name previous can be used as an equivalent alternative; however implementations SHOULD use prev and MUST NOT use both prev AND previous within the same links object.
next  Link Object (Link Objects) A Link Object referencing the immediately following page of the multi-page collection.
current  Link Object (Link Objects) A Link Object referencing the page containing the items that have been updated or published most recently.
self  Link Object (Link Objects) A Link Object referencing this page.

For example, one page of a multi-page collection:

  {
    "totalItems": 12,
    "itemsPerPage" : 10,
    "startIndex": 10,
    "links": {
      "self": {"href":"http://example.org/items?page=1"},
      "next": {"href":"http://example.org/items?page=2"},
      "prev": {"href":"http://example.org/items?page=3"},
      "current": {"href":"http://example.org/items"}
    },
    "items" : [
      {
        "objectType": "person",
        "displayName":"Joe"
      },
      {
        "objectType": "person",
        "displayName":"Sally"
      }
    ]
  }

Note that, as the example illustrates, the totalItems property specifies the total number of items that can be considered to be a part of the collection as a whole, while the itemsPerPage indicates the maximum number of objects that will be included in this particular subset. The actual number of objects included in the value of the items properly can be equal to or less than either of these values.



 TOC 

6.  External Vocabularies

Any object within an Activity Streams object can be extended with additional properties not defined by the core Activity Streams (Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.) [activitystreams] specification or this document. Such extension properties can be specific to individual applications or be drawn from other defined vocabularies such as that defined by the Schema.org organization and others.

When utilizing such vocabularies, it is possible that conflicts in the naming of properties and format of expected values might arise. To mitigate the risk of such conflicts, the following guidelines SHOULD be followed:

  1. When selecting the objectType for an object, if there is a close equivalent objectType already defined by this specification, then that objectType SHOULD be used.
  2. When properties specific to an external vocabulary are to be included within an object, those SHOULD be grouped together under a single "namespace" property whose name is uniquely reflective of the vocabulary.
  3. When including properties from the external vocabulary, avoid properties that are a close semantic match to existing properties defined by this or the core Activity Streams (Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.) [activitystreams] specification. For example, within the Schema.org vocabulary, the properties name, description, url and image are semantically equivalent to core Activity Streams object properties and therefore SHOULD NOT be used.
  4. Further, avoid utilizing properties from multiple external vocabularies that are similar or semantically equivalent to each other.

This specification defines the following initial set of "namespace" properties that correspond to specific external vocabularies currently considered to be reasonable candidates for use within Activity Streams objects. Future versions of this specification might add additional "namespace" properties to this list. Implementors are free to define additional "namespace" properties representing other external vocabularies as necessary; however, there is a risk of potential conflicts if multiple independent implementors select the same "namespace" property to represent different external vocabularies. To help prevent such conflicts, it is RECOMMENDED that implementors publicly document their use of external vocabularies.



 TOC 

6.1.  "dc"

The dc "namespace" property is defined to encapsulate the set of extension properties that represent information specific to the Dublin Core Metadata Initiative. If, for instance, Dublin Core properties can be applied to an Activity Streams object, those properties SHOULD be grouped together under the dc property.

For example:

  {
    "objectType": "file",
    "displayName": "A Document",
    "fileUrl": "http://example.org/foo.html"
    "dc": {
      "format": "text/html; charset="UTF-8"
    }
  }


 TOC 

6.2.  "geojson"

The geojson "namespace" property is defined defined to encapsulate the set of extension properties that represent information specific to an GeoJSON data type. If, for instance, GeoJSON properties can be applied to an Activity Streams object, those properties SHOULD be grouped together under the geojson property.

For example:

  {
    "objectType": "place",
    "displayName": "A GeoJSON Described Place",
    "geojson": {
      "type": "FeatureCollection",
      "features": [
        {"type": "Feature",
         "geometry": {
           "type": "Point",
           "coordinates": [102.0, 0.5]
         },
         "properties": {
           "prop0": "value0"}
         },
         {"type": "Feature",
          "geometry": {
            "type": "LineString",
            "coordinates": [
              [102.0, 0.0],
              [103.0, 1.0],
              [104.0, 0.0],
              [105.0, 1.0]
            ]
          },
          "properties": {
            "prop0": "value0",
            "prop1": 0.0
          }
        },
        {"type": "Feature",
         "geometry": {
           "type": "Polygon",
           "coordinates": [
             [[100.0, 0.0],
              [101.0, 0.0],
              [101.0, 1.0],
              [100.0, 1.0],
              [100.0, 0.0]]]
           },
           "properties": {
             "prop0": "value0",
             "prop1": {"this": "that"}
           }
         }
      ]
    }
  }


 TOC 

6.3.  "ld"

The ld "namespace" property is defined to encapsulate the set of extension properties that represent information specific to the JSON Linked Data vocabulary. If, for instance, Linked Data properties can be applied to an Activity Streams object, those properties SHOULD be grouped together under the ld property.

For example:

 {
   "objectType": "person",
   "displayName": "John Doe",
   "ld": {
     "@context": "http://json-ld.org/contexts/person.ld",
     "@id": "http://example.org/john.doe",
     "born": "1929-12-12"
   }
 }


 TOC 

6.4.  "links"

The links "namespace" property is defined to encapsulate the set of extension properties that represent links to external resources. Property names are defined as being either Registered or Extension Link Relation Types as defined by [RFC5988] (Nottingham, M., “Web Linking,” October 2010.). The list of currently known Registered Link Relations can be found within the IANA Registry of Link Relations.

For example:

  {
    "objectType": "note",
    "displayName": "This is a simple note",
    "links": {
      "canonical": {
        "href":"http://www.example.org/notes/123"
      },
      "edit": {
        "href":"http://www.example.org/api/notes/123"
      }
    }
  }

The value of each property within the links object is either a single Link Object as defined in Section 6.4.1 (Link Objects) or an array of Link Objects in the case where multiple links with the same Link Relation must be specified.

When the value is specified as an array of Link Objects, the ordering of values within the array is considered insignificant. Each contained value is to be treated as a separate link. An array SHOULD NOT contain multiple Link Objects specifying the same href value.

When using extension link relation types, the property name can be specified as an IRI (Duerst, M. and M. Suignard, “Internationalized Resource Identifiers (IRIs),” January 2005.) [RFC3987] but MUST be converted to URIs (Berners-Lee, T., Fielding, R., and L. Masinter, “Uniform Resource Identifier (URI): Generic Syntax,” January 2005.) [RFC3986] when compared and dereferenced as required by Section 4.2 of [RFC5988] (Nottingham, M., “Web Linking,” October 2010.).

As defined in Section 3 of [RFC5988] (Nottingham, M., “Web Linking,” October 2010.), such properties can be viewed as statements of the form "The containing object has a {relation type} resource at {target IRI}" where the {relation type} is identified by the property name, and the {target IRI} is provided by the property value.



 TOC 

6.4.1.  Link Objects

All links are expressed as JSON objects that MUST contain an href property whose value is an absolute IRI (Duerst, M. and M. Suignard, “Internationalized Resource Identifiers (IRIs),” January 2005.) [RFC3987] providing the target of the link. The object MAY contain the following additional properties:

NameValueDescription
hreflang  Language Tag (Phillips, A. and M. Davis, “Tags for Identifying Languages,” September 2006.) [RFC4646] A hint that identifies the language of the target resource.
title  JSON String A human-readable descriptive label for the link.
type  JSON String A hint that identifies the media type of the linked resource.

Link Objects MAY contain an objectType property with the value link.

Additional properties MAY be specified but are undefined by this specification.



 TOC 

6.5.  "odata"

The odata "namespace" property is defined to encapsulate the set of extension properties that represent information specific to the OData specification. If, for instance, OData properties can be applied to an Activity Streams object, those properties SHOULD be grouped together under the odata property.

For example:

 {
   "objectType": "person",
   "displayName": "John Doe",
   "odata": {
     "__metadata": { ... },
     "com.example.user.kind" : "PAID",
     "CustomerID": "JDOE",
     "UserName": "jdoe",
   }
 }


 TOC 

6.6.  "opengraph"

The opengraph "namespace" property is defined to encapsulate the set of extension properties that represent information specific to an OpenGraph data type. If, for instance, OpenGraph properties can be applied to an Activity Streams object, those properties SHOULD be grouped together under the opengraph property.

For example:

  {
    "objectType": "person",
    "displayName": "John Smith",
    "opengraph": {
      "username": "john_smith",
      "verified": false,
      "relationship_status": "Single"
    }
  }


 TOC 

6.7.  "schema_org"

The schema_org "namespace" property is defined to encapsulate the set of extension properties that represent information specific to a Schema.org data type. If, for instance, Schema.org properties can be applied to an Activity Streams object, those properties SHOULD be grouped together under the schema_org property.

For example:

  {
    "objectType": "person",
    "displayName": "John Smith",
    "schema_org": {
      "additionalType": ["http://schema.org/Person"]
      "birthDate": ["1976-12-23"],
      "gender": ["Male"]
    }
  }


 TOC 

7. Normative References

[RFC1951] Deutsch, P., “DEFLATE Compressed Data Format Specification version 1.3,” RFC 1951, May 1996 (TXT, PS, PDF).
[RFC1952] Deutsch, P., Gailly, J-L., Adler, M., Deutsch, L., and G. Randers-Pehrson, “GZIP file format specification version 4.3,” RFC 1952, May 1996 (TXT, PS, PDF).
[RFC2119] Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels,” BCP 14, RFC 2119, March 1997 (TXT, HTML, XML).
[RFC3339] Klyne, G., Ed. and C. Newman, “Date and Time on the Internet: Timestamps,” RFC 3339, July 2002 (TXT, HTML, XML).
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, “Uniform Resource Identifier (URI): Generic Syntax,” STD 66, RFC 3986, January 2005 (TXT, HTML, XML).
[RFC3987] Duerst, M. and M. Suignard, “Internationalized Resource Identifiers (IRIs),” RFC 3987, January 2005 (TXT).
[RFC4627] Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” RFC 4627, July 2006 (TXT).
[RFC4646] Phillips, A. and M. Davis, “Tags for Identifying Languages,” RFC 4646, September 2006 (TXT).
[RFC5988] Nottingham, M., “Web Linking,” RFC 5988, October 2010 (TXT).
[activitystreams] Snell, J., Atkins, M., Norris, W., Messina, C., Wilkinson, M., and R. Dolin, “JSON Activity Streams 1.0,” May 2011.


 TOC 

Authors' Addresses

  James M Snell
  IBM
  
  Martin Atkins
  SAY Media
  
  David Recordon
  Six Apart, Facebook
  
  Chris Messina
  Citizen Agency, Google
  
  Monica Keller
  MySpace, Facebook
  
  Ari Steinberg
  Facebook
  
  Rob Dolin
  Microsoft