Quick Start
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 15, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

In this quick start we take the example of a developer who would like to post a new event to the Activity Stream (the Latest Updates feed on the Connections homepage). We also look at some of the setup required if this developer wants to include an Embedded Experience (a window back to the developers own application) in this event. The concept of using the Activity Stream and providing associated embedded experiences is relatively straightforward. In this section we provide both the basics of event creation and outline some of the 'gotchas' that might otherwise cause confusion.

Some setup you may want to perform (avoid the gotchas!)

  • Do you want to try things from the browser first? (it's easier!) . . . you should install a REST Client add in for your browser, there are many available. It will also make life a little easier if you install a JSON Viewer add in.
  • Do you want to send an event to multiple users? . . . you will need your POSTing user to be in the J2EE role 'trustedExternalApplication'
  • Do you want to send an Embedded Experience? . . . you will need to either disable Gadget whitelisting (see below) or register the Gadget in question.

Posting a simple event

1. Open your browser
2. Log in to IBM Connections (your login session will be used by your REST Client so we won't cover authorization just yet)
3. Open your REST Client (e.g. https://addons.mozilla.org/en-US/firefox/addon/restclient/)
4. Set the URL to http://your.server.com/connections/opensocial/rest/activitystreams/@me/@all
5. Set the Method to POST
6. Paste the sample event below into the body section
7. Add the "Content-Type" header (e.g. "application/json; charset=UTF-8")
8. Add the "Accept" header (e.g. "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
9. Select SEND
10. Open/refresh your Activity Stream and you will see the event POSTed to the top of your stream
11. You can also perform a GET to http://your.server.com/connections/opensocial/rest/activitystreams/@me/@all to see the stream programattically.


Sample Event


  "actor": {

    "id": "@me"


  "verb": "post",

  "title": "${share}",

  "content":"This event is my <b>first entry</b>",

  "updated": "2012-01-01T12:00:00.000Z",

  "object": {

    "summary": "First Entry details",

    "objectType": "note",

    "id": "objectid",

    "displayName": "First entry",

    "url": "http://myurl.com/myid"




  • You will generally use /connections/opensocial/basic/rest/activitystreams/@me/@all or /connections/opensocial/oauth/rest/activitystreams/@me/@all if POSTing from an API based application as these reflect Basic and OAuth based authentication respectively. The URL above works from the browser because your session is already available to it.
  • Depending on how you installed IBM Connections there may be an additional context root (i.e. http://your.server.com /context_root/connections/opensocial/rest/activitystreams/@me/@all).

If at this stage you are happy with the event and have no interest in developing an Embedded Experience (at least not yet) then you may wish to move to the Overview section. The remaining information is geared t making life easier for the OpenSocial Gadget developer.


Gadget Registration and Whitelisting

By default, all Gadgets must be explicitly registered (whitelisted) if they are to be viewed - otherwise the default Gadget is displayed instead, showing a summary of the event supplied rather than the specified Gadget. This is an admin task and is geared towards Gadgets that have been developed and tested and are ready for use. In a development environment (where, for example, you may be testing multiple new gadgets) it is useful to be able to circumvent this. There are a number of solutions.

Solution 1 - A development server

You will need to edit the opensocial-config.xml file in the LotusConnections-config directory. You should set the whiteListEnable attribute of gadget-settings to "false". This will mean that any Gadget can be placed into the stream, and so is not secure enough for a production environment. It is however suitable for a development server.

        <!-- Container token TTL: seconds; default = 30mins  -->

        <security whitelistEnabled="false"


            <proxy blockUnidentifiedIntranetBoundRequests="true"/>

            <security-tokens containerTokenTTLSec="1800"






With this setting in place, you can now post any event into the Activity Stream referencing any Gadget, and the Gadget will be rendered.

Note: You should be checking the file out to do this, but if you are on a single node you can edit the file directly and restart the server.

Solution 2 - Development facilities on a production server

Where a server is required for both production and general use a different approach is required as the above approach is not secure. Instead the server admin can enable a development page and a number of hosts who have the authority to deliver Gadgets. Again, you will need to edit the opensocial-config.xml file in the LotusConnections-config directory (on a production server you should use the admin commands to check the file out first). You should set the enabled attribute of developer to "true". You can then use the developer page to test Gadgets.

This developer page is located at : http:///connections/resources/web/com.ibm.lconn.gadget/test/bootstrap.html


        . . .

        <developer enabled="true" allowSSOFeature="true" allowIntranetProxyAccess="true">

            <developer-hosts-whitelist allServers="false">


List of base URLs that are allowed to publish 'developer-mode' gadgets

 <host url="http://{host.com}/base/url/1" />


                <host url="http://{another.host.com}/base/url/N" />




<developer enabled="true" allowSSOFeature="true" allowIntranetProxyAccess="true">

<developer-hosts-whitelist allServers="false">

Solution 3 - Registering a Gadget

In order to register a Gadget you (or an administrator) needs to be included in the admin J2EE role in the Homepage application. You can set this using the Websphere Admin console. Once you are in this role you will see an admin tab on the left hand side of the Homepage user interface. This allows you to register an individual Gadget (see main documentation for details).