Community articleFollowing service document content
Added by IBM contributorIBM on June 18, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

When updating followed resources with the Following APIs, first obtain the Following service document for the application you are working with. The service document provides access to all of the followed resources that you can update.



When updating followed resources with the Following APIs, first obtain the Following service document for the application you are working with. The service document provides access to all of the followed resources that you can update.

Each application provided its own Following service document, at these addresses:

Activities

http://<hostname>/activities/follow/atom/service

Blogs

http://<hostname>/blogs/follow/atom/service

Communities

http://<hostname>/communities/follow/atom/service

Files

http://<hostname>/files/follow/atom/service

Forums

http://<hostname>/forums/follow/atom/service

News repository

http://<hostname>/news/follow/atom/service

Profiles

http://<hostname>/profiles/follow/atom/service

Wikis

http://<hostname>/wikis/follow/atom/service


The resources that you can update from the service document include the following resources:

  • Collection of followed resources for each application, such as blogs, forums, and so on. Some of the applications provide more than one collection of resources that can be followed.

The following section provides an outline of the elements contained by the service document:

service
workspace "Follow service for {user name}"
collection "Followed {item type} for {user name}"


The following sections describe the elements included in the outline.

The <service> element


Usage

Root element of the service document.

Namespace

http://www.w3.org/2007/app

Attributes

None.

Children

  • generator: Specifies the product version number.
  • Follow Service workspace: Contains the Followed items collection for the application.

The Follow service <workspace> element


Usage

Contains the "Follow Service" collection used to follow additional resources or list existing followed resources.

Namespace

http://www.w3.org/2007/app

Attributes

None.

Children

  • atom:title: Follow service for {user name}
  • collection: Followed items. One or more of these collections may appear, depending on the application

The Followed items <collection> element


Usage

Collection used to follow additional resources or list existing followed resources. Some of the applications provide more than one collection of resources that can be followed.

Namespace

http://www.w3.org/2007/app

Attributes

href. web address of the collection. You can send the following HTTP requests to this web address:

  • GET: Obtain a feed of existing followed items.
  • POST: Add an item to the list of items this user is following.

Children

All collections for following require these three category elements; possible values for '{source}' and '{type}' are in the table below:

1. <atom:category term="resource-follow" scheme="http://www.ibm.com/xmlns/prod/sn/type" />
2. <atom:category term="{source}" scheme="http://www.ibm.com/xmlns/prod/sn/source" />
3. <atom:category term="{type}" scheme="http://www.ibm.com/xmlns/prod/sn/resource-type" />
  • atom:title: Followed {item type} for {user name}
  • <accept>application/atom+xml;type=entry</accept>: Indicates collection accepts Atom entry documents
  • <categories>: Indicates the category elements accepted by the collection.
Table 1. Possible source and resource type category values
Collection
Source category value
Resource type category value
Followed activities
activities
activity
Followed blogs
blogs
blog
Followed communities
communities
community
Followed files
files
file
Followed file folders
files
file_folder
Followed forums
forums
forum
Followed forum topics
forums
forum_topic
Followed profiles
profiles
profile
Followed tags
tags
tag
Followed wikis
wikis
wiki
Followed wiki pages
wikis
wiki_page

Example:

<service
xmlns="http://www.w3.org/2007/app"
xmlns:atom="http://www.w3.org/2005/Atom">
<atom:generator
xmlns:atom="http://www.w3.org/2005/Atom"
version="3.0"
uri="http://www.ibm.com/xmlns/prod/sn">
IBM Connections - Follow service
</atom:generator>
<workspace>
<atom:title xmlns:atom="http://www.w3.org/2005/Atom" type="text">
Follow service for null
</atom:title>
<collection
href="https://enterprise.example.com/profiles/follow/atom/resources?
source=profiles&amp;type=profile">
<atom:title xmlns:atom="http://www.w3.org/2005/Atom" type="text">
Followed profiles for null
</atom:title>
<accept>application/atom+xml; type=entry</accept>
<categories xmlns:atom="http://www.w3.org/2005/Atom">
<atom:category
xmlns:atom="http://www.w3.org/2005/Atom"
term="resource-follow"
scheme="http://www.ibm.com/xmlns/prod/sn/type">
</atom:category>
<atom:category
xmlns:atom="http://www.w3.org/2005/Atom"
term="profiles"
scheme="http://www.ibm.com/xmlns/prod/sn/source">
</atom:category>
<atom:category
xmlns:atom="http://www.w3.org/2005/Atom"
term="profile"
scheme="http://www.ibm.com/xmlns/prod/sn/resource-type">
</atom:category>
</categories>
<atom:category
xmlns:atom="http://www.w3.org/2005/Atom"
scheme="http://www.ibm.com/xmlns/prod/sn/collection"
term="followed-profiles-profile">
</atom:category>
</collection>
</workspace>
</service>