Start following a resource
Added by IBM contributorIBM | Edited by Claudia R Elbourn on July 7, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

This topic details how to start following a resource. Resources in Blogs are used in the examples.

To start following a resource, send an Atom entry document containing information about the resource to the followed resources feed.

For example, if you want to start following a resource in Blogs, you would retrieve the Blogs following service document, which might look like this:

<service>

<atom:generator version="3.0" uri="http://www.ibm.com/xmlns/prod/sn">

IBM Connections - Follow service

</atom:generator>

<workspace>

<atom:title type="text">Follow service for John Donne</atom:title>

<collection

href="https://enterprise.example.com/blogs/follow/atom/resources?

source=blogs&type=blog">

<atom:title type="text">Followed blogs for John Donne</atom:title>

<accept>application/atom+xml; type=entry</accept>

<categories>

<atom:category

term="resource-follow"

scheme="http://www.ibm.com/xmlns/prod/sn/type"/>

<atom:category

term="blogs"

scheme="http://www.ibm.com/xmlns/prod/sn/source"/>

<atom:category

term="blog"

scheme="http://www.ibm.com/xmlns/prod/sn/resource-type"/>

</categories>

<atom:category

scheme="http://www.ibm.com/xmlns/prod/sn/collection"

term="followed-blogs-blog"/>

</collection>

</workspace>

</service>


To start following a blog, you would send a POST request to the web address in the href attribute of the collection, which in this example, is: https://enterprise.example.com/blogs/follow/atom/resources?source=blogs&type=blog. Pass a follow Atom entry document in on the request to identify what you want to start following.

Related reference
Follow entry content

Input
Method URI Description
POST /{source}/follow/atom/resources?source={source} The web address of the href attribute of the collection in the Following service document for the application
Content Type: application/atom+xml
Sample Request:
<?xml version="1.0" encoding="UTF-8"?>

<entry 

 xmlns="http://www.w3.org/2005/Atom" 

 xmlns:app="http://www.w3.org/2007/app" 

 xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
	<category

	term="resource-follow"

	scheme="http://www.ibm.com/xmlns/prod/sn/type">

	</category>

	<category

	term="activities"

	scheme="http://www.ibm.com/xmlns/prod/sn/source">

	</category>

	<category

	term="activity"

	scheme="http://www.ibm.com/xmlns/prod/sn/resource-type">

	</category>

	<category

	term="60eac668-ab21-4795-b112-51eeaf54ffaa"

	scheme="http://www.ibm.com/xmlns/prod/sn/resource-id">

	</category>

</entry>
Name Type Optional Description
source
enumerated No String specifying the resource. Options are: activities blogs communities files forums profiles wikis tags This parameter is required.
Authorized values:
  • activities
  • blogs
  • communities
  • files
  • forums
  • profiles
  • wikis
  • tags
Name Type Optional Description
type
enumerated No String representing the resource type. Options are: If source=activities activity If source=blogs blog If source=communities community If source=files file file_folder If source=forums forum forum_topic If source=profiles profile If source=wikis wiki wiki_page If source=tags tag This parameter is required.
Authorized values:
  • activity
  • blog
  • community
  • file
  • file_folder
  • forum
  • forum_topic
  • profile
  • wiki
  • wiki_page
  • tag
Output
Content Type: application/atom+xml
Code Description
201
Indicates that you have successfully started to follow the specified resource. If an error occurs, this header contains one of the error codes.
400
Bad Request.
403
Forbidden.
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.