Home

 

Create entry templates

To create an entry template, create or retrieve an entry, edit its Atom entry document, and then send a post request to pass the document to the server as a multipart post.


Atom API entry request details

Method Resource URI Input representation
POST activity collection Value of the href attribute of the <app:collection> element of the activity. Multipart post containing:

  • Entry template Atom document

  • Icon graphic

To create an entry template...

  1. Create an activity, if necessary.

  2. Create the entry or to-do item to use as the template. Or, if an entry or to-do item already exists that you want to reuse as the template, retrieve that entry or to-do item. See Retrieving activity nodes.

  3. Edit the Atom document for the entry or to-do item to identify it as an entry template. Change the term attribute of the category element to entrytemplate. For example, change this:

      <category 
       scheme="http://www.ibm.com/xmlns/prod/sn/type" 
       term="entry"></category>
      

    to this:

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

    This ensures that the entry template contains the atom:id of the source entry document as its atom:id.

  4. Using the multipart post method, like the method you use to post attachments, send a post request to an activity collection that contains the new entry template document as the first body part and an icon image file as the second body part.

    The icon image that you provide is associated with the template so that whenever a person creates a new entry based on the template, this icon is displayed beside the custom entry title in the Activities views.

  5. If the entry template creation is successful, an entry template Atom document is returned. It contains two new hidden, read-only text fields:

      $nodeType

      Specifies the entry type of the source entry.

      $icon

      Identifies the icon associated with entries created using this template.

 

Input

Provide the following content as a multipart post:

Specify the content type of the Atom entry document as multipart/related;type="application/atom+xml".

 

Output

None. Returned HTTP Headers

Error codes

HTTP Request:

HTTP Response:<


Working with entry templates

 

Related reference


Retrieving activity nodes

Entry template content


+

Search Tips   |   Advanced Search