Export (0) Print
Expand All

Resource Model Overview

Ff747597.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 Messenger Connect resource model provides resource data such as contacts, photos, and profile information as a hierarchically structured information model that is based on top-level resources, collections, and entries.

The Messenger Connect resource model exposes the following top-level resources:

  • The Contacts Resource exposes the user's address book and contacts in the social network.
  • The Profiles Resource exposes the user's Windows Live Profiles. This includes the user's personal status message.
  • The Activities Resource exposes the user's activities and designated friends.
  • The Photos Resource exposes the user's photos, albums, and file resources.

Each top-level resource, such as Contacts, contains sets of data items called collections. An example of a collection is AllContacts, which represents all the contacts for a user.

For a complete description of the properties and supported operations for a contacts collection, see AllContacts Collection.

The individual data items in a resource are called entries. Each entry has a particular set of properties. These properties are typed and they can be primitive or complex. For example, a Contacts resource can contain simple properties such as FamilyName and GivenName, or complex properties such as Emails, which contains subordinate properties Address, IsPrimary, and Type.

For a complete description of the properties and supported operations for a contact, see Contact Entry.

Every resource, collection, and entry is uniquely addressable and uniquely identified by a URI. The relationships between entries are represented by means of hyperlinks that enable applications to navigate from one resource to a related resource entry or collection.

The Messenger Connect resource model is independent of any particular communication protocol, and no behavior is associated with the model. Windows Live resources can be rendered to any representational format, such as XML, RSS, Atom Publishing Protocol (AtomPub), JavaScript Object Notation (JSON), or JavaScript Object Notation with Padding (JSONP). JSONP is a complement to the base JSON data format. It enables you to retrieve JSON data by using script tag injection, passing the server response into a user-specified function. For the latest JSON specification, see the JSON Schema Internet Draft Specification (http://tools.ietf.org/html/draft-zyp-json-schema-02).

The following URI format describes the resource addressing model.

http[s]://[LocatorID.]apis.live.net/V<Version>/cid-<CID>/<ResourceName>/<CollectionName>/<ID>

The following table explains the elements of the URI format.

URI element Description

http[s]

The protocol that is used to communicate with the Messenger Connect REST API service. You have the option of using either HTTP or HTTPS.

[LocatorID]

An optional part of the base URI that the server can return. The server bases the locator ID on the user and the type of resource, to facilitate efficient routing of the HTTP request. The base URI can also include the CID value, which is a unique identifier of the Windows Live ID user whose data is being accessed. For example, the locator ID might have the format http://cid-CID.contacts.apis.live.net/.

apis.live.net

The root URI for Messenger Connect.

V<Version>

The version of the API service that is used. An explicit version number enables the web service code to support multiple versions of the resource model. Applications that rely on older versions of the web services can always refer to the appropriate version, while applications that need the latest web services can use the current version.

The currently supported service version is 4.1.

<CID>

A value that uniquely represents a Windows Live user account and identifies the user whose data is being accessed. The service assigns this value.

<ResourceName>

The name of the top-level resource, such as Contacts, Photos, Profiles, or Activities.

<CollectionName>

The name of a collection of entries in the resource, such as AllContacts (in a Contacts resource) or Albums (in a Photos resource).

<ID>

A value that uniquely represents the resource entry. The service assigns this value.

The following are examples of URIs that represent various elements of the resource model.

URI Description

http://sn1.apis.live.net/V4.1/cid-C3092E04172BA9C3/Contacts/AllContacts

A collection of contacts for a specified user.

http://sn1.apis.live.net/V4.1/cid-C3092E04172BA9C3/Contacts/AllContacts/<ID>

A contact entry.

http://blu.apis.live.net/V4.1/cid-C3092E04172BA9C3/Photos/Albums

A collection of photo albums for a given user.

http://blu.apis.live.net/V4.1/cid-C3092E04172BA9C3/Photos/Albums/ID

An album entry.

http://blu.apis.live.net/V4.1/cid-C3092E04172BA9C3/Photos/Albums/ID/Files

A collection of photos in a particular album.

http://blu.apis.live.net/V4.1/cid-C3092E04172BA9C3/Photos/Albums/ID/Files/<ID>

A photo entry.

Show:
© 2014 Microsoft