Search code examples
ibm-sbtibm-connections

Get every community-ID from IBM Connections


Is there a way to get every community or every community-ID from IBM Connections with Java? Public and private Communities?

The method getPublicCommunities() from the class CommunityService returns only the public ones. The method getMyCommunities() only returns the communities from the user who is logged in. We do not have a user who is in every community and with a admin-user the method returns only his communities.

So is there a special method to get every community or should we use a user who has special rights?

We are using IBM Connections 5 and the Java classes from SBT Version 1.0.2.20140527-1807.


Solution

  • To get every Communitity you have to use the method getPublicCommunities() from the class CommunityService. This will return every community, if you are logged in with an 'admin-user'. With a normal user, this method will only return the public communities. Remember that the method is using pagination, so you have to call the method multiple times with different parameters or define a greater page-size.