Creating activity nodes
Added by IBM contributorIBM | Edited by Claudia R Elbourn on July 7, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Create entry in an activity, such as a to-do item or to add a reply to another entry.
Send an Atom entry document containing the new activity node of the appropriate type to the parent activity's node list. To create an entry that includes a bookmark or file, post an entry node of type entry and include a field of the appropriate type, link or file respectively, in that entry. To create a stand-alone comment, post an entry node of type entry that has a field of type text. To post a comment as a reply to an existing entry, post a node of type reply.

Provide one of the activity node types as an Atom entry document.

Note: The content type of the Atom entry document must be application/atom+xml.

  • To create an entry that contains a file attachment, use a multipart post method to post the file. The HTTP response represents the multipart post as an activity node of type entry that contains an <snx:field> element of type file.
  • To add a standard entry or a todo entry to a specific activity section, in the Atom entry document that you use to define the entry, include a <thr:in-reply-to> element which identifies the section that you want to add the entry to.
If successful, an activity node type Atom entry document. If a failure, an error message in XML.
Input
Method URI Description
POST /activities/service/atom2/activity Value of the href attribute of the <app:collection> element of the activity.
Content Type: application/atom+xml
Name Type Optional Description
activityUuid
string No The UUID of the activity you to create a node in.
Output
Content Type: application/atom+xml
Name Type Optional Description
Location
string No Link to edit_url of the new activity node that can be used to update it.
Code Description
201
Indicates that the activity entry was successfully created. If an error occurs, this header contains one of the error codes.
400
Bad Request.
403
Forbidden. Authorization failed.
404
Not Found.