Activities Resource

Activities Resource

Ff748963.note(en-us,MSDN.10).gifNote:
Current information about Live Connect is now available in the Windows Live Developer Center. The information in the following sections is provided for legacy purposes only.

The Activities resource enables user web activities to be represented as a web data feed. An activity is a description of an action that was performed (represented by a verb) at an instant in time by an actor, with some social object. An activity may also have a target, which is the object to which the action is done. An activity feed is a collection of such activities. The Messenger Connect Representational State Transfer (REST) API service follows the Activity Streams standard to implement activity feeds.

Activity Streams is an open standard that describes a user's activities in a standardized template that uses the following format:

[Actor] [Verb] [Object] [Target]

An example of an activity that uses the Activity Streams format is "Neil added holiday.jpg to Vacation Album." In this example, Neil is the actor, Add is the verb, holiday.jpg is the object, and Vacation Album is the target.

The object types are defined in the Atom Activity Base Schema specification (http://activitystrea.ms/schema/1.0/activity-schema-01.html).

Actor

An actor is an object of type Person, which represents a Windows Live user. Person is an object that represents a user account. The object type URL is http://activitystrea.ms/schema/1.0/person. For more information about the specification for this object type, see http://activitystrea.ms/schema/1.0/activity-schema-01.html#person.

Object type Description Object type URL

Person

An object that represents a user account. For a full description of this object type, see http://activitystrea.ms/schema/1.0/activity-schema-01.html#person.

http://activitystrea.ms/schema/1.0/person

Verb

A Verb is the action taken by the user who is represented by the Actor element. For the specification of verbs, see "Base Verbs" in the Atom Activity Base Schema document. The following table lists the supported verbs.

Verb Description Object type URL

Comment

Comment on an activity.

http://activitystrea.ms/schema/1.0/comment

Add

Upload or publish an object on the web. This is the same as the POST verb that is described in the Atom Activity Specification at http://activitystrea.ms/spec/1.0/atom-activity-01.html#post.

http://activitystrea.ms/schema/1.0/post

Shared

Indicates that the Actor has made the object available to other users. The Actor did not create the object that is shared.

http://activitystrea.ms/schema/1.0/share

Play

Indicates that the Actor viewed all or part of a media object (such as a video).

http://activitystrea.ms/schema/1.0/play

Favorite

Mark as favorite; this indicates that the Actor marked the object as an item of special interest.

http://activitystrea.ms/schema/1.0/favorite

Save

Save an object so that the Actor can view it later, rather than sharing it with others, as the verb Shared would indicate..

http://activitystrea.ms/schema/1.0/save

Custom

A verb that can be redefined for a generic template.

Defeated

Defeated another person in a game.

Object

An object is acted upon. An object is of one of the following types.

Object Description Object type URL

Comment

A textual response to another object. A comment has the following properties:

  • subject - The subject of the comment. Included as the content of the atom:title element. If the system does not use a title for a comment it must include an atom:title element with no text content.
  • content - The content of the comment. Included as the content of the atom:content element.
  • permalink - The canonical URL for the comment. Represented as the value of the href attribute on an atom:link element with a rel value of alternate and a type value of text/html.

http://activitystrea.ms/schema/1.0/comment

Photo

A graphical still image.

http://activitystrea.ms/schema/1.0/photo

Photo Album

A collection of images. A photo album object has the following properties:

  • title - The title or short caption assigned to the album by the author. Included as the content of the atom:title element.
  • thumbnail - The URL and metadata for a preview image for the album. The URL is represented as the value of the href attribute on an atom:link element with rel preview and a type of either image/jpeg, image/png or image/gif.
  • album page URL - The URL of a web page where the photo album can be viewed. Represented as the value of the href attribute on an atom:link element with a rel value of alternate and a type value of text/html.

http://activitystrea.ms/schema/1.0/photo-album

Video

An object that contains video content, which usually consists of a motion picture track and an audio track.

http://activitystrea.ms/schema/1.0/video

Blog entry

An entry in a blog, a news or magazine article, a knowledge base entry, or other similar construct. An article has the following properties:

  • title - The title of the entry. Included as the content of the atom:title element. This element must be included with empty content if the entry does not have a title.
  • summary - A short excerpt from the body content that gives an introduction to or a summary of the full content. This element should be omitted if the entry does not have a summary.
  • content - The main body content of the entry. Included as the content of the atom:content element.
  • permalink - The canonical URL for the entry, represented as the value of the href attribute on an atom:link element with a rel value of alternate and a type value of text/html.

http://activitystrea.ms/schema/1.0/article

Note

A short note or status update, often in plain text. Similar in structure to an article, with no title and a very brief body. A note has the following properties:

  • content - The content of the note, included as the content of the atom:content element. Publishers should include markup to make the presentation similar to that on the original webpages, including any links that the service automatically adds. Processors can remove the markup and consider the note to be plain text.
  • permalink - The canonical URL for the note. Represented as the value of the href attribute on an atom:link element with a rel value of alternate and a type value of text/html.

http://activitystrea.ms/schema/1.0/note

Bookmark

Represents a pointer to a URL; typically a web page. A bookmark has the following properties:

  • title - The title of the bookmark as entered by the user who created the bookmark. Included as the content of the atom:title element. Publishers can use the title of the target resource as a default for this property.
  • description - The description of the bookmark as entered by the user who created the bookmark. Included as the content of the atom:summary element. If no description has been provided, omit this element.
  • target URL - The URL of the item that is the target of the bookmark. Represented as the value of the href attribute on an atom:link element with rel "related". An entry with this object type must not include related links except for the purpose of representing the target URL.
  • bookmark page URL - The URL of a page that describes the bookmark. This URL is often specific to the user that published the bookmark. Represented as the value of the href attribute on an atom:link element with a rel value of alternate and a type value of text/html.
  • target title - The title of the item that is the target of the bookmark. Represented as the value of the title attribute on the atom:link element from which the target URL was obtained.
  • thumbnail - The URL and metadata for a thumbnail version of the page. The URL is represented as the value of the href attribute on an atom:link element with rel preview and a type of either image/jpeg, image/png or image/gif. Publishers should include media:width and media:height attributes on the atom:link element describing the dimensions of the linked image. Processors can ignore thumbnails that are of an inappropriate size for their user interface.

http://activitystrea.ms/schema/1.0/bookmark

Review

Represents a primarily prose-based commentary on another object. A review has the following properties:

  • title - The title of the review. Included as the content of the atom:title element. Systems that produce reviews that do not have titles must include an atom:title element with no text content. Processors should refer to such comments as simply being "a review", with appropriate localization, if they are to be described in a sentence.
  • content - The content of the review. Included as the content of the atom:content element. Publishers should include any markup necessary to achieve a similar presentation to that on the publisher's own HTML pages, including any links that the service automatically adds.
  • permalink - The canonical URL for the review. Represented as the value of the href attribute on an atom:link element with a rel value of alternate and a type value of text/html. This URL may be the URL of the reviewed object with a fragment identifier appended, or a completely distinct URL.
  • reviewed object - The object that the review applies to. Included with a thr:in-reply-to element that refers to the atom:id value of the reviewed object.
  • rating - A rating attribute of the reviewed object. The rating is an optional field and is modeled after the rating attribute from the hReview microformat. Specifically, the rating is defined as a fixed point integer value [1.0-5.0] that indicates a rating for the item, with higher values indicating better ratings by default. Optionally a different integral "worst" value (default:1.0) or "best" value (default:5.0) can be specified to indicate a different range (for example, 6 from 0-10). The "best" value can be numerically smaller than the "worst" value to indicate a descending range.

http://activitystrea.ms/schema/1.0/review

Rating

Represents a user rating on the object; for example, a TV show rating.

A fixed point integer value [1.0-5.0] represents the item rating. By default, a higher number indicates a better rating.

http://activitystrea.ms/schema/1.0/review

Product

Represents a product that the user saves to a list.

http://activitystrea.ms/schema/1.0/#product

List

A list in which items are added, saved, or deleted.

http://activitystrea.ms/schema/1.0/#list

Highscore

The highest score achieved in a game.

None.

Game

The name of a game.

None.

Achievement

An achievement attained in a game.

None.

Target

An object that is the target of the activity. The target types for an activity are the same as the target types for an Object.

http[s]://[LocatorID.]activities.apis.live.net/V<Version>/

For information about the components of the URI, see the URI element table in Resource Model Overview. For information about headers and global properties for operations on the resource level, see Resource Level Operations.

GET

A GET request on an Activities resource returns a list of all the activity feeds in the resource.

{
  "BaseUri" : "http://apis.live.net/V4.1/cid-<CID>/",
  "ContactsActivitiesLink" : "ContactsActivities",
  "MyActivitiesLink" : "MyActivities"
}

The following topics provide details of the operations supported on Activities:

Show:
© 2016 Microsoft