Community articleCommunities service document content
Added by IBM contributorIBM on June 20, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

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.
Tags: commapi


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").
  • Feed of the communities in the trash (Trash)..
  • 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 application)
collection "My Communities"
collection "Trash"
categories (tags document listing tags of the user's communities)
flags (tags document listing flags used by the Communities application)


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
  • collection: Trash

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 application

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 application.

The Trash <collection> element


Usage

Used to list communities that are in the trash for the current user.

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 Communities in the trash for which the current user is an owner.

Children
  • atom:title: "Trash"
  • <accept>entry</accept>: Indicates that the collection accepts Atom entry documents.

Example

<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xml:lang="en">
    <workspace>
        <atom:title xmlns:atom="http://www.w3.org/2005/Atom" type="text">Communities Collections</atom:title>
        <collection href="http://lcauto55.swg.usma.ibm.com/communities/service/atom/communities/all">
            <atom:title xmlns:atom="http://www.w3.org/2005/Atom" type="text">Public Communities</atom:title>
            <atom:category xmlns:atom="http://www.w3.org/2005/Atom" scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="public"/>
            <accept/>
            <categories xmlns:atom="http://www.w3.org/2005/Atom" href="http://lcauto55.swg.usma.ibm.com/communities/service/atom/communities/all?outputType=categories"/>
            <categories xmlns:atom="http://www.w3.org/2005/Atom" href="http://lcauto55.swg.usma.ibm.com/communities/service/atom/communities/all?outputType=flags"/>
        </collection>
        <collection href="http://lcauto55.swg.usma.ibm.com/communities/service/atom/communities/my">
            <atom:title xmlns:atom="http://www.w3.org/2005/Atom" type="text">My Communities</atom:title>
            <atom:category xmlns:atom="http://www.w3.org/2005/Atom" scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="personal"/>
            <accept>entry</accept>
            <categories xmlns:atom="http://www.w3.org/2005/Atom" href="http://lcauto55.swg.usma.ibm.com/communities/service/atom/communities/my?outputType=categories"/>
            <categories xmlns:atom="http://www.w3.org/2005/Atom" href="http://lcauto55.swg.usma.ibm.com/communities/service/atom/communities/my?outputType=flags"/>
        </collection>
        <collection href="http://lcauto55.swg.usma.ibm.com/communities/service/atom/community/invites/my">
            <atom:title xmlns:atom="http://www.w3.org/2005/Atom" type="text">My Invitations</atom:title>
            <atom:category xmlns:atom="http://www.w3.org/2005/Atom" scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="my-invitations"/>
            <accept/>
        </collection>
        <collection href="http://lcauto55.swg.usma.ibm.com/communities/service/atom/communities/trash">
            <atom:title xmlns:atom="http://www.w3.org/2005/Atom" type="text">Trash</atom:title>
            <atom:category xmlns:atom="http://www.w3.org/2005/Atom" scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="trash"/>
            <accept/>
        </collection>
    </workspace>
    <atom:generator xmlns:atom="http://www.w3.org/2005/Atom" uri="http://www.ibm.com/xmlns/prod/sn" version="5.0.0.0">IBM Connections - Communities</atom:generator>
</service>