Home
Communities service document content
When working with the Communities publishing APIs, first obtain the Communities service document. The service document provides access to all of the Communities resources that you can update. The resources that you can update from the service document include the following resources:
- Feed of all of the communities ("All Communities"). This feed lists all public communities, and reflects updates made to the My Communities feed.
- Feed of all of the communities of which the user is a member ("My Communities").
- Tags document of all of the community tags. This document is updated using the My Communities feed.
The following section provides an outline of the elements contained by the service document:
service workspace "Communities Collections" collection "All Communities" categories (tags document listing tags for all of the communities) flags (tags document listing flags used by the Communities feature) collection "My Communities" categories (tags document listing tags of the user's communities) flags (tags document listing flags used by the Communities feature)The following sections describe the elements included in the outline.
The <service> element
- Usage
- Root element of the service document.
- Namespace
- http://www.w3.org/2007/app
- Attributes
- None.
- Children
- generator: Specifies the product version number.
- Communities Collections workspace: Contains the "All Communities" and "My Communities" collections.
The Communities Collections <workspace> element
- Usage
- Contains the public "All Communities" collection used to list communities and the "My Communities" collection used to create communities.
- Namespace
- http://www.w3.org/2007/app
- Attributes
- None.
- Children
- atom:title: Communities Collections
- collection: All Communities
- collection: My Communities
The All Communities <collection> element
- Usage
- Collection used to list existing public communities.
- Namespace
- http://www.w3.org/2007/app
- Attributes
- href. Web address of the collection. You can send the following HTTP request to this Web address:
- GET: Obtain a feed of existing communities.
- Children
- atom:title: All Communities
- <accept></accept>: Indicates that the collection does not accept the creation of new resources
- <categories href="...?outputType=categories"/>: Specifies the Web address of the tags document. You can send the following HTTP request to this Web address:
- GET: Obtain a tags document listing the tags of all of the communities
If you specify the fixed=yes attribute,
- <categories href="...?outputType=flags">: Specifies the Web address of the flags document. You can send the following HTTP request to this Web address:
- GET: Obtain a flags document listing the flags used by the Communities feature
The My Communities <collection> element
- Usage
- Used to list communities of which the user is a member, or to create new communities.
- Namespace
- http://www.w3.org/2007/app
- Attributes
- href. Web address of the collection. You can send the following HTTP requests to this Web address:
- GET: Obtain a feed of existing communities of which the user is a member.
- POST: Create a community.
- Children
- atom:title: "My Communities"
- <accept>entry</accept>: Indicates that the collection accepts Atom entry documents.
- <categories href="...?outputType=categories">: Web address of the tags document. You can send the following HTTP request to this Web address:
- GET: Obtain a tags document that lists the tags assigned to the user's communities.
- <categories href="...?outputType=flags">: Web address of the flags document. You can send the following HTTP request to this Web address:
- GET: Obtain a flags document that lists the flags used by the Communities feature.
Example
<?xml version="1.0" encoding="UTF-8"?> <service xml:lang="en" xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom"> <workspace> <atom:title type="text">Communities Collections</atom:title> <collection href="http://lc20.ibm.com/communities/service/atom/communities/all"> <atom:title type="text">All Communities</atom:title> <accept></accept> <categories href="http://lc20.ibm.com/communities/service/atom/communities/all? outputType=categories"> </categories> <categories href="http://lc20.ibm.com/communities/service/atom/communities/all? outputType=flags"> </categories> </collection> <collection href="http://lc20.ibm.com/communities/service/atom/communities/my"> <atom:title type="text">My Communities</atom:title> <accept>entry</accept> <categories href="http://lc20.ibm.com/communities/service/atom/communities/my? outputType=categories"> </categories> <categories href="http://lc20.ibm.com/communities/service/atom/communities/my? outputType=flags"> </categories> </collection> </workspace> <atom:generator uri="http://www.ibm.com/xmlns/prod/sn" version="2.0.1">Lotus Connections - Communities</atom:generator> </service>
Retrieving the Communities service document