Following topics
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 9, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Activity Stream Search provides the ability to follow a "topic", which is either a word or a term that contains several words. This topic will then be identified in the text of public events, and these events will be delivered to the personal stream of whoever followed the topic (BUT only when this stream is delivered using the search index, as the DB flow does not consider followed topics). Following/un-following a topic, or getting a list of followed topics, is done via the standard Connections Following API - /news/follow/atom/resources . For topics, we are adding a new source called topics and a new resource type called topic.

Valid topics to follow

 

For performance reasons, not any topic may be followed.

Trying to follow an invalid topic will result in an HTTP Bad Request error (status code 400).

A valid topic satisfies the following rules:

  • Does not start with a whitespace character
  • After every special character (e.g. #, &, !) there is a normal word.
  • Contains no more than 3 words

Examples of valid topics:

  • cat
  • #cat
  • il.ibm
  • cool-stuff
  • Lotus Connections

Examples of invalid topics:

  • cat#
  • il..ibm
  • cool-stuff-are-great
  • Lotus Connections Version 4.5

Input
Method URI Description
POST /news/follow/atom/resources?source=topics Follow a topic
DELETE /news/follow/atom/resources/{entryId}?source=TOPICS&type=TOPIC&resource={topicName} Un-follow a topic
GET /news/follow/atom/resources/{entryId}?source=TOPICS&type=TOPIC&resource={topicName} Get a list of followed topics
Content Type: application/atom+xml
Sample Request:
<entry>
<category term="resource-follow" scheme="http://www.ibm.com/xmlns/prod/sn/type"></category>
<category term="topics" scheme="http://www.ibm.com/xmlns/prod/sn/source"></category>
<category term="topic" scheme="http://www.ibm.com/xmlns/prod/sn/resource-type"></category>
<category term="my_topic" scheme="http://www.ibm.com/xmlns/prod/sn/resource-id"></category>
</entry>
Name Type Optional Description
entryId
string No ID of topic entry
topicName
string No Name of topic entry.
Output
Content Type: application/atom+xml