Community articleMoving an entry to a section programmatically
Added by IBM contributorIBM on March 18, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

To move a standard entry or a to-do entry to a section in an activity, send an updated Atom entry document to the parent activity's node list.

To move a standard entry or a to-do entry to a section in an activity, send an updated Atom entry document to the parent activity's node list.
To move a stand-alone entry or to-do entry to a section in the activity, perform the following steps:


<id>urn:lsid:ibm.com:oa:FFFG802c6f94cebb4b459dcb24b62c028c3e</id>

<thr:in-reply-to
ref="<section-id>"
type="application/atom+xml"
href="<section's_edit_link_href>
source="<activity_id>"/>


For example:

<thr:in-reply-to
ref="urn:lsid:ibm.com:oa:FFFG4f24c2dc4deb4a49a8487dfc7650dac8"
type="application/atom+xml"
href="https://example.com/activities/service/atom2/activitynode?
activityNodeUuid=FFFG4f24c2dc4deb4a49a8487dfc7650dac8"
source="urn:lsid:ibm.com:oa:FFFG802c6f94cebb4b459dcb24b62c028c3e"/>
1. Retrieve a feed of nodes in the activity by sending a GET request to the web address specified in the href attribute of the <app:collection> element for the activity. You can find this in an activities feed, such as the My Activities feed.
2. Make a note of the ID element for the activity.
3. Find the entry that represents the section that you want to move the entry to, and then make a note of the following values:
<id>urn:lsid:ibm.com:oa:FFFG4f24c2dc4deb4a49a8487dfc7650dac8</id>

<link
rel="edit"
type="application/atom+xml"
href="https://example.com/activities/service/atom2/activitynode?
activityNodeUuid=FFFG4f24c2dc4deb4a49a8487dfc7650dac8"/>
  • id element for the section
  • href attribute of the section’s <link rel="edit> element
4. Retrieve the Atom entry document that represents the entry that you want to move.
5. Construct a <thr:in-reply-to> element using the values you noted in previous steps and add it to the Atom entry document for the entry that you want to move.
6. Send a PUT request to the activity node’s edit link web address, and include the edited Atom entry document for the entry that you want to move on the request.

Input

Provide a revised activity node type Atom entry document.

Output

None.

Input
Method URI Description
PUT /activities/service/atom2/activitynode Value of the href attribute of the <link> element that has a rel="edit" attribute for the associated node in the activity node list.
Content Type: application/atom+xml
Name Type Optional Description
activityNodeUuid
string No The UUID of the activity node.
Output
Code Description
200
OK. Indicates that the activity node was successfully updated.
403
Forbidden. Authorization failed.
404
Not Found.