communityService

Provides the ability to get, create, and delete communities, also known as spaces. "Community" is a name used throughout the API for what are now known in the UI as spaces. Spaces are containers for content such as discussions and documents. Spaces can also contain other containers, including projects and other spaces (referred to in the API as "sub-communities").

Spaces/communities are generally created by someone with an administrative role. They're organized hierarchically, usually so that permissions granted in a parent community are at least partially inherited into its sub-communities.

Method Description
createCommunity Creates a new community as a sub-community of the specified community.
deleteCommunity Deletes the specified community.
deleteProperty Delete the specified property from the specified community.
getCommunity Returns a WSCommunity by its ID.
getDocumentIDs Returns document IDs for all published documents in the specified community, excluding its sub-communities.
getProperties Returns the extended properties for the specified community.
getProperty Returns the specified extended property for a community.
getRecursiveCommunities
getRecursiveCommunities Returns all sub-communities that are descendants of the specified parent community.
getRecursiveCommunityCount Returns a count of sub-communities of the specified community.
getSubCommunities Returns the immediate sub-communities of the specified parent community.
setProperty Sets an extended propery for the specified community.
updateCommunity Updates the specified community with <em>community</em>.

createCommunity

Creates a new community as a sub-community of the specified community.

POST http://domain:port/application_context/rpc/rest/communityService/communities

Arguments

Name Type Description
name xs:string Name of the community to create.
displayName xs:string Display name of the community to create.
description xs:string Description of the community to create.
communityID xs:long ID of the community that will be the new community's parent.

Arguments Template

<createCommunity> 
    <name>xs:string</name>
    <displayName>xs:string</displayName>
    <description>xs:string</description>
    <communityID>xs:long</communityID>
</createCommunity>

Response

Type Description
Community The newly created community.

Response Template

<createCommunityResponse> 
    <return>
        <!-- Contents of Community -->
    <return>
</createCommunityResponse>

Errors

Error When Returned
CommunityNotFound If the specified parent community does not exist.
NameAlreadyExists If a community with the specified display name already exists.
Unauthorized If the caller does not have permission to create the community.

deleteCommunity

Deletes the specified community. This will delete everything contained in the community.

DELETE http://domain:port/application_context/rpc/rest/communityService/communities/{communityID}

Arguments

Name Type Description
communityID xs:long ID of the community to delete.

Arguments Template

<deleteCommunity> 
    <communityID>xs:long</communityID>
</deleteCommunity>

Errors

Error When Returned
CommunityNotFound If the specified community does not exist.
Unauthorized If the caller does not have permission to delete the specified community.

deleteProperty

Delete the specified property from the specified community.

DELETE http://domain:port/application_context/rpc/rest/communityService/properties/{communityID}/{name}

Arguments

Name Type Description
name xs:string The name of the property to delete.
communityID xs:long ID of the community from which to delete the property.

Arguments Template

<deleteProperty> 
    <name>xs:string</name>
    <communityID>xs:long</communityID>
</deleteProperty>

Errors

Error When Returned
CommunityNotFound If the specified community does not exist.
Unauthorized If the caller does not have permission to update the community.

getCommunity

Returns a Community by its ID.

GET http://domain:port/application_context/rpc/rest/communityService/communities/{communityID}

Arguments

Name Type Description
communityID xs:long ID of the community to get.

Arguments Template

<getCommunity> 
    <communityID>xs:long</communityID>
</getCommunity>

Response

Type Description
Community The community.

Response Template

<getCommunityResponse> 
    <return>
        <!-- Contents of Community -->
    <return>
</getCommunityResponse>

Errors

Error When Returned
CommunityNotFound If the specified community does not exist.
Unauthorized If the caller does not have permission to view the community.

getDocumentIDs

Returns document IDs for all published documents in the specified community, excluding its sub-communities.

GET http://domain:port/application_context/rpc/rest/communityService/documentIDs/{communityID}

Arguments

Name Type Description
communityID xs:long ID of the community.

Arguments Template

<getDocumentIDs> 
    <communityID>xs:long</communityID>
</getDocumentIDs>

Response

Type Description
List of A list of IDs for published documents in the community.

Response Template

<getDocumentIDsResponse> 
    <!-- List of ... -->
    <return>Long</return>
</getDocumentIDsResponse>

Errors

Error When Returned
CommunityNotFound If the specified community does not exist.
Unauthorized If the caller does not have permission to view the community.

getProperties

Returns the extended properties for the specified community.

GET http://domain:port/application_context/rpc/rest/communityService/properties/{communityID}

Arguments

Name Type Description
communityID xs:long ID of the community to retrieve properties for.

Arguments Template

<getProperties> 
    <communityID>xs:long</communityID>
</getProperties>

Response

Type Description
List of Property A list of properties for the community with the specified ID.

Response Template

<getPropertiesResponse> 
    <!-- List of ... -->
    <return>
        <!-- Contents of Property -->
    <return>
</getPropertiesResponse>

Errors

Error When Returned
CommunityNotFound If the specified community does not exist.
Unauthorized If the caller does not have permission to view the community

getProperty

Returns the specified extended property for a community.

GET http://domain:port/application_context/rpc/rest/communityService/properties/{communityID}/{name}

Arguments

Name Type Description
name xs:string The name of the property to return.
communityID xs:long ID of the community for which to get the extended property.

Arguments Template

<getProperty> 
    <name>xs:string</name>
    <communityID>xs:long</communityID>
</getProperty>

Response

Type Description
The property's value; null if the property couldn't be found.

Response Template

<getPropertyResponse> 
    <return>xs:string</return>
</getPropertyResponse>

Errors

Error When Returned
CommunityNotFound If the specified community does not exist.
Unauthorized If the caller does not have permission to view the community

getRecursiveCommunities

Returns all sub-communities that are descendants of the specified parent community. This includes the specified community's sub-communities, their sub-communities, and so on.

GET http://domain:port/application_context/rpc/rest/communityService/recursiveCommunities/{communityID}

Arguments

Name Type Description
communityID xs:long ID of the parent community.

Arguments Template

<getRecursiveCommunities> 
    <communityID>xs:long</communityID>
</getRecursiveCommunities>

Response

Type Description
List of Community All of the communities under the community.

Response Template

<getRecursiveCommunitiesResponse> 
    <!-- List of ... -->
    <return>
        <!-- Contents of Community -->
    <return>
</getRecursiveCommunitiesResponse>

Errors

Error When Returned
CommunityNotFound If the specified community does not exist.
Unauthorized If the caller does not have permission to view the community

getRecursiveCommunities

GET http://domain:port/application_context/rpc/rest/communityService/communities

Response

Type Description
List of Community

Response Template

<getRecursiveCommunitiesResponse> 
    <!-- List of ... -->
    <return>
        <!-- Contents of Community -->
    <return>
</getRecursiveCommunitiesResponse>

getRecursiveCommunityCount

Returns a count of sub-communities of the specified community.

GET http://domain:port/application_context/rpc/rest/communityService/recursiveCount/{communityID}

Arguments

Name Type Description
communityID xs:long ID of the parent community.

Arguments Template

<getRecursiveCommunityCount> 
    <communityID>xs:long</communityID>
</getRecursiveCommunityCount>

Response

Type Description
xs:int The number of sub-communities.

Response Template

<getRecursiveCommunityCountResponse> 
    <return>xs:int</return>
</getRecursiveCommunityCountResponse>

Errors

Error When Returned
CommunityNotFound If the community does not exist.
Unauthorized If the caller does not have permission to view the specified community.

getSubCommunities

Returns the immediate sub-communities of the specified parent community.

GET http://domain:port/application_context/rpc/rest/communityService/subCommunities/{communityID}

Arguments

Name Type Description
communityID xs:long ID of the parent community.

Arguments Template

<getSubCommunities> 
    <communityID>xs:long</communityID>
</getSubCommunities>

Response

Type Description
List of Community A list of the specified community's immediate sub-communities.

Response Template

<getSubCommunitiesResponse> 
    <!-- List of ... -->
    <return>
        <!-- Contents of Community -->
    <return>
</getSubCommunitiesResponse>

Errors

Error When Returned
CommunityNotFound If the specified community does not exist.
Unauthorized If the caller does not have permission to view the community.

setProperty

Sets an extended propery for the specified community.

POST http://domain:port/application_context/rpc/rest/communityService/properties

Arguments

Name Type Description
name xs:string The name of the property to set.
value xs:string The value of the property to set.
communityID xs:long ID of the community for which to set the property.

Arguments Template

<setProperty> 
    <name>xs:string</name>
    <value>xs:string</value>
    <communityID>xs:long</communityID>
</setProperty>

Errors

Error When Returned
CommunityNotFound If the specified community does not exist.
Unauthorized If the caller does not have permission to update the community.

updateCommunity

Updates the specified community with community.

PUT http://domain:port/application_context/rpc/rest/communityService/communities

Arguments

Name Type Description
community Contents of Community The community to update.

Arguments Template

<updateCommunity> 
    <community>
        <!-- Contents of Community -->
    <community>
</updateCommunity>

Errors

Error When Returned
CommunityNotFound If the specified community does not exist.
NameAlreadyExists If the display name in <em>community</em> already exists.
Unauthorized If the caller does not have administrative permission for the specified community.