Getting the All Communities feed
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 11, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Get the All Communities feed to see a list of all public communities to which the authenticated user has access or pass in parameters to search for communities that match a specific criteria.
Tags: commapi

Discoverability

You can derive the URL from the service document. Find the value of the href attribute of <collection> element that contains the <atom:category scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="public"/> element.

Request parameters

Use one or more of the input parameters to narrow the search. Separate multiple parameters with an ampersand (&).

Input
Method URI Description
GET /communities/service/atom/communities/all You can derive the URL from the service document. Find the value of the href attribute of <collection> element that contains the <atom:category scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="public"/> element.
Name Type Optional Description
asc
boolean Yes Specifies whether the results should be displayed in ascending order. Options are true or false.
email
string Yes Internet email address. Search for communities of which the user you specify by email address is a member.
Format the HTTP request using the proper URL encoding. For example, the encoded form of the @ symbol is %40 as in:
adam_eventide%40garden.com
Note: Do not use this parameter if IBM® Connections is configured to prevent email addresses from being displayed. Use the userid parameter instead.
page
number Yes Page number. Specifies the page to be returned. The default value is 1, which returns the first page.
ps
int Yes Page size. Specifies the number of entries to return per page. The default value is 10. The maximum value you can specify is 10000
search
string Yes Well-formed full text search query. Performs a text search on community titles and descriptions.
since
number Yes Includes in the resulting feed all communities updated after a specified date. Specify the date-time value since 1970 in milliseconds (for example, 1321906696443 for a date and time near Nov 21, 2011 9:18:16 PM). In Java you can get the required value with System.currentTimeMillis().
sortBy
enumerated Yes Specifies the order in which to sort the results. Options are:
count
Sorts the entries by the number of members that belong to the item.
modified
Sorts the entries by the last modified date.
title
{{{Sorts the entries alphabetically by title. The title used is the text that is displayed in the <title> element of each entry in the feed.}}}
Note: This parameter replaces the sortField parameter. The sortField parameter and its associated options (count, lastmod, and name) are supported for backwards compatibility only; they will be deprecated in a future release.
Authorized values:
  • count,modified,title
sortOrder
enumerated Yes Specifies the order in which to sort the results. The options are:
asc
<a name="d7130e221"/>
Sorts the results in ascending order.
desc
<a name="d7130e226"/>
Sorts the results in descending order.
Authorized values:
  • asc
  • desc
tag
string Yes Returns communities with the specified tag. Search by one tag at a time.
userid
string Yes Unique ID that represents a specific person.
Output
Content Type: application/atom+xml
Code Description
200
OK. Indicates that the request was received successfully.
Examples
Search for all communities that are identified with the tag wiki
> GET /communities/service/atom/communities/all?tag=wiki HTTP/1.1

	> Host: communities.example.com:9080

	> Accept: */*

	>

	< HTTP/1.1 200 OK

	< Content-Type: application/atom+xml;charset=UTF-8

	...


Response returned by the server
<?xml version="1.0" encoding="UTF-8" ?>

	<feed

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

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

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

	xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">

	<id>http://communities.example.com:9080/communities/service/atom/communities/all?

	tag=wiki</id>

	<updated>2008-02-06T19:19:14.187Z</updated>

	<title type="text">Communities</title>

	<link href="http://communities.example.com:9080/communities/service/html/

	allcommunities" rel="alternate" />

	<generator

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

	version="1.0.2">IBM Connections - Communities</generator>

	<opensearch:totalResults>2</opensearch:totalResults>

	<opensearch:startIndex>1</opensearch:startIndex>

	<opensearch:itemsPerPage>10</opensearch:itemsPerPage>

	<link href="http://communities.example.com:9080/communities/service/atom/

	communities/all?tag=wiki" rel="self" />

	<link href="http://communities.example.com:9080/communities/service/atom/service"

	rel="http://www.ibm.com/xmlns/prod/sn/service"

	type="application/atomsvc+xml; charset=UTF-8" />

	<link href="http://communities.example.com:9080/communities/service/atom/

	communities/all?tag=wiki&outputType=categories"

	rel="http://www.ibm.com/xmlns/prod/sn/tag-cloud"

	type="application/atomcat+xml; charset=UTF-8" />

	<entry>

	<id>http://communities.example.com:2006/service/atom/community/instance?

	communityUuid=FB1G09211E1920C3324C2F79332E7C000034</id>

	<title type="text">Test Communities including Social Text Wiki</title>

	<summary type="text">Test Communities including Social Text Wiki</summary>

	<content type="html" />

	<published>2007-12-19T18:35:41.968Z</published>

	<author>

	<name>ANDY MALONE</name>

	<email>amalone@us.example.com</email>

	<snx:userid>937965j0-4f0c-1028-5a06-db07163b51b2</snx:userid>

	</author>

	<updated>2007-12-19T18:38:35.562Z</updated>

	<contributor>

	<name>ANDY MALONE</name>

	<email>amalone@us.example.com</email>

	<snx:userid>937965j0-4f0c-1028-5a06-db09663b51b2</snx:userid>

	</contributor>

	<category term="community" scheme="http://www.ibm.com/xmlns/prod/sn/type" />

	<category term="social-text" />

	<category term="wiki" />

	<link href="http://communities.example.com:9080/communities/service/atom/

	community/instance?communityUuid=FB1G09211E1920C3324C2F79332E7C000034"

	rel="self" />

	<link href="http://communities.example.com:9080/communities/service/atom/

	community/instance?communityUuid=FB1G09211E1920C3324C2F79332E7C000034"

	rel="edit" />

	<link href="http://communities.example.com:9080/communities/service/html/

	communityview?communityUuid=FB1G09211E1920C3324C2F79332E7C000034"

	rel="alternate" type="text/html" />

	<link href="http://communities.example.com:9080/communities/service/html/image?

	communityUuid=FB1G09211E1920C3324C2F79332E7C000034&lastMod=1198089515562"

	rel="http://www.ibm.com/xmlns/prod/sn/logo" />

	<link href="http://communities.example.com:9080/communities/service/atom/community/

	service?communityUuid=FB1G09211E1920C3324C2F79332E7C000034"

	rel="http://www.ibm.com/xmlns/prod/sn/service"

	type="application/atomsvc+xml; charset=UTF-8" />

	<link href="http://communities.example.com:9080/communities/service/atom/

	community/members?communityUuid=FB1G09211E1920C3324C2F79332E7C000034"

	rel="http://www.ibm.com/xmlns/prod/sn/member-list"

	type="application/atom+xml; charset=UTF-8" />

	<link href="http://communities.example.com:9080/communities/service/atom/

	community/bookmarks?communityUuid=FB1G09211E1920C3324C2F79332E7C000034"

	rel="http://www.ibm.com/xmlns/prod/sn/bookmarks"

	type="application/atom+xml; charset=UTF-8" />

	<link href="http://communities.example.com:9080/communities/service/atom/community/

	feeds?communityUuid=FB1G09211E1920C3324C2F79332E7C000034"

	rel="http://www.ibm.com/xmlns/prod/sn/feeds"

	type="application/atom+xml; charset=UTF-8" />

	<snx:membercount>3</snx:membercount>

	<snx:communityType>public</snx:communityType>

	</entry>

	<entry>

	<id>http://communities.ibm.com:2006/service/atom/community/instance?

	communityUuid=7ADG09211E190B36BC0681443F053900001A</id>

	<title type="text">HelloWorld Community</title>

	<summary type="text">Testin 1 2 3</summary>

	<content type="html" />

	<published>2007-01-12T23:47:17.421Z</published>

	<author>

	<name>Stewart Simon</name>

	<email>simon@us.example.com</email>

	<snx:userid>937965j0-4f0c-1028-5a06-db08213b51b2</snx:userid>

	</author>

	<updated>2007-10-26T13:29:57.101Z</updated>

	<contributor>

	<name>MICHAEL JONES</name>

	<email>jonesm@us.example.com</email>

	<snx:userid>937965j0-4f0c-1028-5a06-db08275b51b2</snx:userid>

	</contributor>

	<category term="community" scheme="http://www.ibm.com/xmlns/prod/sn/type" />

	<category term="wiki" />

	<link href="http://communities.example.com:9080/communities/service/atom/

	community/instance?communityUuid=7ADG09211E190B36BC0681443F053900001A"

	rel="self" />

	<link href="http://communities.example.com:9080/communities/service/atom/

	community/instance?communityUuid=7ADG09211E190B36BC0681443F053900001A"

	rel="edit" />

	<link href="http://communities.example.com:9080/communities/service/html/

	communityview?communityUuid=7ADG09211E190B36BC0681443F053900001A"

	rel="alternate"

	type="text/html" />

	<link href="http://communities.example.com:9080/communities/service/html/image?

	communityUuid=7ADG09211E190B36BC0681443F053900001A&lastMod=1193405397101"

	rel="http://www.ibm.com/xmlns/prod/sn/logo" />

	<link href="http://communities.example.com:9080/communities/service/atom/

	community/service?communityUuid=7ADG09211E190B36BC0681443F053900001A"

	rel="http://www.ibm.com/xmlns/prod/sn/service"

	type="application/atomsvc+xml; charset=UTF-8" />

	<link href="http://communities.example.com:9080/communities/service/atom/

	community/members?communityUuid=7ADG09211E190B36BC0681443F053900001A"

	rel="http://www.ibm.com/xmlns/prod/sn/member-list"

	type="application/atom+xml; charset=UTF-8" />

	<link href="http://communities.example.com:9080/communities/service/atom/

	community/bookmarks?communityUuid=7ADG09211E190B36BC0681443F053900001A"

	rel="http://www.ibm.com/xmlns/prod/sn/bookmarks"

	type="application/atom+xml; charset=UTF-8" />

	<link href="http://communities.example.com:9080/communities/service/atom/

	community/feeds?communityUuid=7ADG09211E190B36BC0681443F053900001A"

	rel="http://www.ibm.com/xmlns/prod/sn/feeds"

	type="application/atom+xml; charset=UTF-8" />

	<snx:membercount>2</snx:membercount>

	<snx:communityType>public</snx:communityType>

	</entry>

	</feed>