Community articleWorking with activities programmatically
Added by IBM contributorIBM on December 21, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Using the Atom Publishing Protocol, also known as AtomPub, you can create and update activities that you own or to which you have edit access.



Using the Atom Publishing Protocol, also known as AtomPub, you can create and update activities that you own or to which you have edit access.

Standard activity

An activity is a way for you to organize your work and collaborate with others in a shared web space. You can start an activity from a single idea or fragment of an idea in an email. Because it is easy to invite new members, you can quickly pull together the people and resources you need to get the job done. You can post messages, share files and links to websites, and create and assign to-do items.

Community activity

You can also create community activities. A community activity is an activity created in the Communities application. Community activities are included in the standard Activities views and can be opened and edited from the Activities application. The only thing different about a community activity is its membership. You can create a community activity with a membership list that reflects the membership list of the community or you can choose to create a community activity whose members are a subset of the community. But, the member list of the activity cannot contain anyone who is not also a member of the owning community. In addition, the public status of a community activity is determined by the community to which it belongs. If the community is public or moderated, all of its associated activities are public. If the community is private, all of its associated activities are private.

Note: See Creating community activities in the Communities API section of the product documentation for more details.
Creating activities
To create an activity, send an Atom entry document containing the new activity to the user's My Activities feed.

Creating an activity from a template programmatically
To create an activity from an activity template, send an edited Atom entry document for the activity template to the user's My Activities feed.

Retrieving activities
To retrieve an activity, use the edit link found in the corresponding activity entry in the user's My Activities feed.

Updating activities
To update an activity, send a replacement Atom Entry document containing the modified activity to the existing activity's edit URI.

Deleting activities programmatically
To delete an existing activity, use the HTTP DELETE method.

Restoring activities
To restore a deleted activity, use a HTTP PUT request. This moves the activity from the trash feed to the user's My Activities feed.
Parent topic: Activities API

Related reference
Getting the My Activities feed
Creating community activities