Home

 

Create an activity node from a template

You can create activity nodes of type entry from an entry template. To do so, retrieve the Atom document of the entry template to use, edit the document to contain your new entry content, and then post the edited Atom document to the activity's node list.


Atom API entry request details

Method Resource URI Input representation
POST activity node list Value of the href attribute of the <app:collection> element of the activity. entry Atom document based on the entry template Atom document

To create an entry from an entry template:

  1. Retrieve the Atom document of the entry template to use. See Retrieving entry templates for more details.

  2. Replace the category element that defines the template:

      <category 
         scheme="http://www.ibm.com/xmlns/prod/sn/type" 
         term="entrytemplate" 
         label="Entry Template">
        </category>
      

    with the following category element:

      <category 
       xmlns:snx="http://www.ibm.com/xmlns/prod/sn" 
       scheme="http://www.ibm.com/xmlns/prod/sn/type" 
       term="entry" 
       snx:template-id="794G09219C73CC5C30A4F106B852AD000136">
      </category>
      

  3. Post the updated Atom document to the activity using a request with the following syntax:

      POST /atom2/activity?activityUuid=793G09219C73CC5C30A4F106B852AD00012F 
       HTTP/1.1 Host: activities.dulcinea.enterprise.com Content-Type: application/atom+xml Authorization: Basic xxx Content-Length: nnn 
      

 

Input

Provide an edited entry template Atom document as the new entry content.

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

 

Output

None. Returned HTTP Headers

Error codes

This is a sample of an entry template Atom document that has been retrieved to use as the basis for a new entry:

HTTP Request:

The following sample is an entry based on the entry template:


Working with activity nodes

 

Related reference


Retrieving entry templates


+

Search Tips   |   Advanced Search