Retrieving the Communities Events service document
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 15, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

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

Before you begin

You cannot add an event to a community programmatically until the Events widget has been added to the community using the Customize menu option in the product user interface. It is not until the widget is explicitly added that the service document resource for Community Events is available from the remote applications feed.

Input
Method URI Description
GET /communities/calendar/atom/calendar/service Retrieves a user's service document which contains the Community Events Collections workspace, for a given community.
Value of the href attribute in the <link> element that has the rel="http://www.ibm.com/xmlns/prod/sn/remote-application/publish" attribute for the entry with the Calendar category in the remote applications Atom document of the community to which you add/update/delete an event.
Name Type Optional Description
calendarUuid
string No The UUID of the calendar you wish to retrieve the service document for.
Output
Content Type: application/atom+xml
Code Description
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
Examples
To retrieve the service document for the Communities Events widget application
> GET /communities/calendar/atom/calendar/service?calendarUuid=ae2141c3-dfc5-43e5-b9b0-79f4a55d5e02 HTTP/1.1

	> Host: enterprise.example.com

	> Accept: */*


Response returned by the server
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>

	<service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom">

	<generator xmlns="http://www.w3.org/2005/Atom" uri="http://www.ibm.com/xmlns/prod/sn" version="4.0.0.0">

	IBM Connections - Community Events

	</generator>

	<workspace>

	<atom:title type="text">Calendar</atom:title>

	<collection href="https:/enterprise.example.com/communities/calendar/atom/calendar?calendarUuid=ae2141c3-dfc5-43e5-b9b0-79f4a55d5e02">

	<atom:title type="text">Community Calendar</atom:title>

	<accept>application/atom+xml; type=entry</accept>​

	<category xmlns="http://www.w3.org/2005/Atom" scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="calendars"/>

	<categories fixed="yes"/>

	</collection>

	</workspace>

	<workspace>

	<atom:title type="text">Demo Community</atom:title>

	<category xmlns="http://www.w3.org/2005/Atom" scheme="http://www.ibm.com/xmlns/prod/sn/workspace" term="calendar"/>

	<collection href="https:/enterprise.example.com/communities/calendar/atom/calendar/event?calendarUuid=ae2141c3-dfc5-43e5-b9b0-79f4a55d5e02">

	<atom:title type="text">Event Entries</atom:title>

	<category xmlns="http://www.w3.org/2005/Atom"scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="events"/>

	<accept>application/atom+xml; type=entry</accept>

	<categories href="https:/enterprise.example.com/communities/calendar/atom/tagcloud?calendarUuid=ae2141c3-dfc5-43e5-b9b0-79f4a55d5e02"/>

	</collection>

	</workspace>

	</service>