Creating community activities
Added by IBM contributorIBM | Edited by IBM contributorClaudia R Elbourn on June 16, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

To create a community activity, send a POST request to the remote applications feed of the community to which you want to add the activity.
Tags: commapi

Before you begin

You cannot add activities to a community programmatically until the Activities 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 activities is available from the remote applications feed.

Provide an Atom document that contains a category element that represents the community activity.

After creating a community activity with a category of type of explicit_membership_community_activity, you can define the members of the community activity.

Method URI Description
POST /activities/service/atom2/activities From the entry in the Communities remote application feed that contains the <category term="Activities" scheme="" /> element, find the value of the href attribute in the <link> element that has the rel="" attribute.
Content Type: application/atom+xml
Sample Request:
<?xml version="1.0" encoding="UTF-8"?>





        <category term="Activities" scheme=""></category>
        <title type="text">Activity1</title>
        <content type="text">Activity1</content>
Name Type Optional Description
string No The UUID of the community you wish to create the activity in.
enumerated No Choose if public or not.
Authorized values:
  • yes
  • no
enumerated No Choose whether to authenticate or not
Authorized values:
  • yes
  • no
Name Type Optional Description
string Yes Link to edit_url of the new community activity. You can use the web address specified here to subsequently update the community activity.
Code Description
Created. Indicates that the community activity was successfully created. If an error occurs, this header will contain one of the error codes below.
Bad Request.
Forbidden. Authorization failed.
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.