Community articleRetrieving the Communities service document
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 stars1 comment

The first step you must perform if you plan to update resources made available through the Atom APIs is to retrieve the service document for the application.
Tags: commapi



The first step you must perform if you plan to update resources made available through the Atom APIs is to retrieve the service document for the application.

Table 1. Atom API request details
Method
Resource
URI
Description
GET
Service Document
/service/atom/service
Retrieves a user's service document which contains the Communities Collections workspace.


Example

To retrieve the service document for the Communities application, send the following HTTP request:

> GET /communities/service/atom/service HTTP/1.1
> Host: enterprise.example.com
> Accept: */*


The service document for Communities is returned by the server. For example:

<?xml version="1.0" encoding="UTF-8" ?> 
<service xml:lang="en">
  <workspace>
    <atom:title type="text">Communities Collections</atom:title>
    <collection href="https:/enterprise.example.com/communities/service/atom/communities/all">
      <atom:title type="text">Public Communities</atom:title>
      <atom:category scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="public"/>
      <accept/>
      <categories 
       href="https:/enterprise.example.com/communities/service/atom/communities/all?outputType=categories"/>
      <categories 
       href="https:/enterprise.example.com/communities/service/atom/communities/all?outputType=flags"/>
    </collection>
    <collection href="https:/enterprise.example.com/communities/service/atom/communities/my">
      <atom:title type="text">My Communities</atom:title>
      <atom:category scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="personal"/>
      <accept>entry</accept>
      <categories 
       href="https:/enterprise.example.com/communities/service/atom/communities/my?outputType=categories"/>
      <categories 
       href="https:/enterprise.example.com/communities/service/atom/communities/my?outputType=flags"/>
    </collection>
    <collection href="https:/enterprise.example.com/communities/service/atom/community/invites/my">
      <atom:title type="text">My Invitations</atom:title>
      <atom:category scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="my-invitations"/>
      <accept/>
    </collection>
  </workspace>
  <atom:generator uri="http://www.ibm.com/xmlns/prod/sn" version="3.0.1.0"> 
     IBM Connections - Communities
  </atom:generator>
</service>

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.

Ying Ying Cheng commented on Dec 10, 2014

Re: Retrieving the Communities service document

The URI /service/atom/service should be /communities/service/atom/service.