Community articleWorking with community widgets
Added by IBM contributorIBM on December 21, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.
Tags: commapi


The Community Widgets feed provides an ATOM interface for working with Widgets in a community programmatically. The services provided are:

Getting a list of widgets in the community: Getting a list of widgets in a community
Adding a widget to a community: Adding a community widget
Updating a widget in a community Updating a community widget
Deleting a widget from a community Deleting a community widget
Retrieving a community widget Retrieving a community widget

Table of widget entry elements

There are a set of common Widget entry elements that are used in these services: returned in the list of widgets in a feed, used to get/set Widget state. These elements are listed in the table below:

All elements are in the namespace, except those that are prefixed with snx: which are in the Connections namespace.

How treated on input
Updates user visible title
If no title is provided, then this element will use a localized default title.
<category term="widget" scheme="" />
Identifies the entry as a widget Atom entry.
<link href="..." rel="self" />
URL to get this Widgets ATOM entry
<link href="..." rel="edit" />
URL to use to edit Widget
<link href="..." rel="alternate" />
URL that can be used in a Web browser to display the Widget.
Will be required for POSTs, Ignored for PUTs
Indicates the type of widget. Must match the widgetDefId of an enabled widget.
Category from Widget Configuration file
required for PUT, ignored for POST, DELETE
Widget Instance ID
<snx:hidden>true or false</snx:hidden>
optional default false
Hidden/Visible state
<snx:location>col2 or col3 (or col2statusposts for Status Updates widget only)</snx:location>
required unless snx:hidden is true in which case it's ignored
Column location
<snx:previousWidgetInstanceId>ID or empty if first item in column<snx:previousWidgetInstanceId>
optional. ignored if snx:hidden is true
Position given by previous widget instance id
<snx:widgetProperty key="xxx"> value </snx:widgetProperty
Provides the widget instance data. There may be multiple instances of this element

Example Widget Entry

A general Widget entry in the atom widget feed looks like this:

<entry xmlns:snx="">

<title type="text">MyLibrary</title>

<category term="widget" scheme=""></category>

<link href=";widgetInstanceId=W85cde7f5a97etc" rel="self"></link>

<link href="" rel="alternate"></link>



<snx:previousWidgetInstanceId><snx:previousWidgetInstanceId>  <!-- No widget instance id =>  this is the first widget in the column -->


<snx:widgetProperty key="value1">value 11</snx:widgetProperty>  <!-- Widget specific attribute values are here -->
<snx:widgetProperty key="value2">value 22</snx:widgetProperty>