When using this API in an IBM SmartCloud
™ for Social Business environment, note that certain differences might exist. For more information, see Activities API
in the IBM Social Business Development wiki.
The types of activity nodes that you use to create entries has changed from 1.0.x. For example, in 1.0.x, to create an entry that included a bookmark, file, or comment, you posted an entry node of type bookmark, file, or message. In 2.0, 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. For information about the node types that were supported in 1.0.x, go to the following external web site:
Table 1. Atom API entry request details
|POST||activity node list||Value of the href attribute of the <app:collection> element of the activity.||activity node|
Provide one of the activity node types as an Atom entry document.
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.
If successful, an activity node type Atom entry document. If a failure, an error message in XML.
Returned HTTP headers
HTTP/1.1 201 Created
Indicates that the activity entry was successfully created. If an error occurs, this header contains one of the error codes.Location: url
Link to edit_url of the new activity node that can be used to update it.Error codes
Parent topic: Working with activity nodes
To-do item content
- HTTP/1.1 400 Bad Request
- HTTP/1.1 403 Forbidden: Authorization failed.