SlideShare a Scribd company logo
1 of 49
AD104 IBM Connections
                     ActivityStream Integration
                     Bill Looby
                     Brian O'Gorman




© 2013 IBM Corporation
Agenda

    What is the Activity Stream ?
       ─ What do you expect to see and where, and what do you expect not to see ?
    Decide on your user model
       ─ How do you want to interact with the Activity Stream ?
    Tooling up
       ─ Use the right tools to get you started
    Authentication and Authorization
       ─ Who are you and how can we be sure ?
    Putting it all together
       ─ A simple extension . . .
    Administration and configuration
       ─ What does an administrator need to know ?
    Posting an event
       ─ How to POST and how the event is rendered
    Retrieving lists of events
       ─ How to find the events of interest
2    © 2013 IBM Corporation
Agenda

   What is the Activity Stream ?
      ─ What do you expect to see and where, and what do you expect not to see ?
   Decide on your user model
      ─ How do you want to interact with the Activity Stream ?
   Tooling up
      ─ Use the right tools to get you started
   Authentication and Authorization
      ─ Who are you and how can we be sure ?
   Putting it all together
     ─ A simple extension . . .
   Administration and configuration
      ─ What does an administrator need to know ?
   Posting an event
      ─ How to POST and how the event is rendered
   Retrieving lists of events
      ─ How to find the events of interest
3    © 2013 IBM Corporation

What does the Activity Stream look like ?




4   © 2013 IBM Corporation
Why is the Activity Stream important ?

   To the Business . . .
      ─ To make Social Business work, all systems can participate by providing appropriate
        simply-structurd events
      ─ Once you have these events they can be stored and used in a manner consistent
        across all contributing systems
      ─ Gathering this informataion via an appropriate aggregation engine is a key part of
        Social Business technology
      ─ From this aggregation analytics can be performed including lens and filters on events
      ─
   To the User it's a bit simpler . . .
      ─ Everything I need to know and act on in one place !




5    © 2013 IBM Corporation
Agenda

   What is the Activity Stream ?
      ─ What do you expect to see and where, and what do you expect not to see ?
   Decide on your user model
      ─ How do you want to interact with the Activity Stream ?
   Tooling up
      ─ Use the right tools to get you started
   Authentication and Authorization
      ─ Who are you and how can we be sure ?
   Putting it all together
     ─ A simple extension . . .
   Administration and configuration
      ─ What does an administrator need to know ?
   Posting an event
      ─ How to POST and how the event is rendered
   Retrieving lists of events
      ─ How to find the events of interest
6    © 2013 IBM Corporation
Do you want to inform ?                                            Here's something
                                                                  you'll be interested
                                                                            in
   Inform a user
      ─ Send a specific notification to a specific user
      ─ Only that user will see it
      ─
                                                                     Here's something that

                                                                      happened. You can
   Be discoverable                                                    find it if you look !
      ─ Show the event on the public feed
      ─ Automatically forward to any followers of the 'Actor'
      ─
                                                                          Here's something

                                                                          that happened in
   Inform a Community                                                     this community
      ─ Show the event on the community feed
      ─ Automatically forward to any followers of the Community




7    © 2013 IBM Corporation
Do you want to interact ?

   A link may be just fine
      ─ The application sending the event is complex and any user should follow the provided link to
        interact with it effectively


   Or you may want to allow simple interactions
      ─ There are simple interactions that are suitable for inclusion with the event
      ─ For example : approval, rejection, simple selection, simple commenting, upload, share etc.
      ─ In each case, this is a simple enough interaction, so you would prefer not to lose your current
        browser context, but return quickly to your stream once complete





8    © 2013 IBM Corporation
Do you want to consume ?

   A general list
      ─ The activity stream can be consumed easily and presented within another application in order to
        ensure that any user using that application still sees their current stream.
      ─ This may be useful where there is a specific application in which users tent to 'live' so that they
        are unlikely to be paying attention to their stream otherwise.


   An application specific list
      ─ A separate application may use Connections simply as a storage mechanism for its own events.
      ─ It can retrieve events specific to the application for display within the application
      ─ All of these events are then also available aggregated within Connections


   Any combination
      ─ Basic filtering is provided to show information specific to an object/actor/community etc.
      ─ Search-based filtering allows for more specific combinations of criteria




9    © 2013 IBM Corporation
Agenda

    What is the Activity Stream ?
       ─ What do you expect to see and where, and what do you expect not to see ?
    Decide on your user model
       ─ How do you want to interact with the Activity Stream ?
    Tooling up
       ─ Use the right tools to get you started
    Authentication and Authorization
       ─ Who are you and how can we be sure ?
    Putting it all together
      ─ A simple extension . . .
    Administration and configuration
       ─ What does an administrator need to know ?
    Posting an event
       ─ How to POST and how the event is rendered
    Retrieving lists of events
       ─ How to find the events of interest
10    © 2013 IBM Corporation
 
Some Tools – REST Client




11   © 2013 IBM Corporation
Some Tools . . . continued

    When using a REST Client Form based authentication can be used. But FBA
     should never be used other than this as it is considerably more difficult to
     manage.
 

    Your browser is also a useful tool for all GET operations – you may want to
     install a JSON Feed Reader plugin.
 

    cURL can be used to do simple command line based requests (you can for
     example set up a script to do some autopopulation this way)




12    © 2013 IBM Corporation
Some Tools - Java

    HttpClient
       ─ A simple http request mechanism from Apache
       ─ Sends and receives raw requests
       ─ Highly flexible and configurable
 

    Abdera (as an aside – used for Atom generation and parsing)
       ─ An Atom manipulation library
       ─ Built on top of HttpClient
       ─ Creates and Parses atom feeds making the main properties available easily
       ─
    Things to watch out for . . . .
       ─ Redirects – they autofollow by default, normally you won't need this
       ─ Authentication – you can set credentials to use on all requests
       ─ SSL – won't automatically accept, you need to add by default




13    © 2013 IBM Corporation
Some Tools - Java
        DefaultHttpClient httpclient = new DefaultHttpClient();


        // register the passed credentials
        UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(userName, password);
        CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
        credentialsProvider.setCredentials(
               new AuthScope(host, AuthScope.ANY_PORT), credentials);
        httpclient.setCredentialsProvider(credentialsProvider);


        // register to auto accept SSL certificates and not to check hosts
        SSLContext sslcontext = SSLContext.getInstance("TLS");
        sslcontext.init(null, null, null);
        SSLSocketFactory socketFactory = new SSLSocketFactory(
                          new AnyTrustStrategy(), SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);


        // allow any SSL
        SchemeRegistry sr = httpclient.getConnectionManager().getSchemeRegistry();
        sr.register(new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
        sr.register(new Scheme("https", 443, socketFactory));
        return httpclient;



14   © 2013 IBM Corporation
Agenda

    What is the Activity Stream ?
       ─ What do you expect to see and where, and what do you expect not to see ?
    Decide on your user model
       ─ How do you want to interact with the Activity Stream ?
    Tooling up
       ─ Use the right tools to get you started
    Authentication and Authorization
       ─ Who are you and how can we be sure ?
    Putting it all together
      ─ A simple extension . . .
    Administration and configuration
       ─ What does an administrator need to know ?
    Posting an event
       ─ How to POST and how the event is rendered
    Retrieving lists of events
       ─ How to find the events of interest
15    © 2013 IBM Corporation
Authenticating requests

    APIs that access public data don't require authentication
 

    Connections to date has generally used Basic Authentication to access non-
     public data
 

    As of IC4, OAuth access is available, and is the recommended authorization
     mechanism for Open Social APIs
 

    OAuth is however designed primarily for for service to service rather than client
     applications.
 

 

 




16    © 2013 IBM Corporation
Summary of authentication options

    Anonymous access
       ─ For public data, some APIs are available at an anonymous URL, where no authentication
         challenge is performed or credentials expected.
    Form Based Authentication
       ─ Authentication used by browser URLs (where the user is redirected to the login page)
       ─ Ajax applications also use this when accessing APIs in order to take advantage of the available
         session information
       ─ Complex login redirect handing is however required
       ─ Not recommended or supported for third party applications
    Basic Authentication
       ─ Involves sending a Base-64 encoded header including the username and password
       ─ This should always be done over https (to avoid passwords being sent in cleartext)
       ─ Most HTTP libraries support settings for adding basic authentication headers (as do REST Client
         plugins)
    OAuth Authorisation
       ─ Is an authorisation (rather than authentication) mechanism
       ─ You can authorise a service to act on your behalf without giving them your credentials
 
17    © 2013 IBM Corporation
How do I 'invoke' the appropriate authorization mechanism

    Answer . . . use the appropriate URL format !
 

    <server>/connections/opensocial/rest/activitystreams/@me/@all
       ─ This is the 'default' fomat
       ─ It uses form based authentication (so you will get a redirect response if the appropriate session
         cookies are not provided for example)
       ─
    <server>/connections/opensocial/anonymous/rest/activitystreams/@public/@all
       ─ This is available when querying public data and performs no authentication check
       ─
    <server>/connections/opensocial/basic/rest/activitystreams/@public/@all
       ─ This performs the appropriate basic authentication challenge
       ─
    <server>/connections/opensocial/oauth/rest/activitystreams/@public/@all
       ─ This performs the appropriate OAuth dance


18    © 2013 IBM Corporation
Agenda

    What is the Activity Stream ?
       ─ What do you expect to see and where, and what do you expect not to see ?
    Decide on your user model
       ─ How do you want to interact with the Activity Stream ?
    Tooling up
       ─ Use the right tools to get you started
    Authentication and Authorization
       ─ Who are you and how can we be sure ?
    Putting it all together
      ─ A simple extension . . .
    Administration and configuration
       ─ What does an administrator need to know ?
    Posting an event
       ─ How to POST and how the event is rendered
    Retrieving lists of events
       ─ How to find the events of interest
19    © 2013 IBM Corporation
Take a simple website. . . .




20   © 2013 IBM Corporation
. . . and add some simple code . . .




21   © 2013 IBM Corporation
. . . giving you . . .




    . . . but this is just the start
       ─ You can enhance the content as it appears in the stream
       ─ You can provide an embedded experience for the event
       ─ You can associate the event with a community
       ─ You can make the event public
       ─ You can begin to support followers




22    © 2013 IBM Corporation
Agenda

    What is the Activity Stream ?
       ─ What do you expect to see and where, and what do you expect not to see ?
    Decide on your user model
       ─ How do you want to interact with the Activity Stream ?
    Tooling up
       ─ Use the right tools to get you started
    Authentication and Authorization
       ─ Who are you and how can we be sure ?
    Putting it all together
      ─ A simple extension . . .
    Administration and configuration
       ─ What does an administrator need to know ?
    Posting an event
       ─ How to POST and how the event is rendered
    Retrieving lists of events
       ─ How to find the events of interest
23    © 2013 IBM Corporation
A development only server

    You can to edit the opensocial-config.xml file in the LotusConnections-config
     directory. Simply set the whiteListEnable attribute of gadget-settings to "false".
    Any Gadget can now be placed into the stream, so this is not secure enough for
     a production environment. It is however suitable for a development server.
     <gadget-settings>
         <!-- Container token TTL: seconds; default = 30mins -->
         <security whitelistEnabled="false"
                  featureAdminEnabled="true">
             <proxy blockUnidentifiedIntranetBoundRequests="true"/>
             <security-tokens containerTokenTTLSec="1800"
                                containerTokenCheckSec="5"
                                gadgetTokenTTLSec="2700"
                                transientErrorRetryIntervalSec="60"
                                authErrorRetryIntervalSec="300"/>
         </security>


    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.
24    © 2013 IBM Corporation
Enabling developers on a production server

    Where a server is required for both production and development the server
     admin can enable a development page and a number of hosts who have the
     authority to deliver Gadgets.
    You will need to edit the opensocial-config.xml file in the LotusConnections-
     config directory
    You should set the enabled attribute of developer to "true". You can then use the
     developer page to test Gadgets.
       ─ http://<myserver>/connections/resources/web/com.ibm.lconn.gadget/test/bootstrap.html
  <gadget-settings>
        . . .
        <developer enabled="true" allowSSOFeature="true"
allowIntranetProxyAccess="true">
            <developer-hosts-whitelist allServers="false">
                <!-- add hosts
                <host url="http://{host.com}/base/url/1" />
                 -->
            </developer-hosts-whitelist>
        </developer>


25    © 2013 IBM Corporation
Agenda

    What is the Activity Stream ?
       ─ What do you expect to see and where, and what do you expect not to see ?
    Decide on your user model
       ─ How do you want to interact with the Activity Stream ?
    Tooling up
       ─ Use the right tools to get you started
    Authentication and Authorization
       ─ Who are you and how can we be sure ?
    Putting it all together
      ─ A simple extension . . .
    Administration and configuration
       ─ What does an administrator need to know ?
    Posting an event
       ─ How to POST and how the event is rendered
    Retrieving lists of events
       ─ How to find the events of interest
26    © 2013 IBM Corporation
Posting an event

     {
                                                   You can POST any event to the stream
       "actor": {                                   of the current user
       
         "id": "@me"                                 ─ /connections/opensocial/rest/activitystreams/
       },
                                                      @me/@all
       "verb": "post",
       "title": "${share}",                        The main details are -
       "content":"This event is my <b>first
     entry</b>",                                     ─ actor : Connections or External Id
       "updated": "2012-01-01T12:00:00.000Z",        ─ verb : from a set list
       "object": {                                   ─ title : Connections will generate if needed
         "summary": "First Entry details",           ─ content : for display of event details
         "objectType": "note",                       ─ updated : event time
         "id": "objectid",
         "displayName": "First entry",               ─ object : details on the object including title, id
                                                       etc.
         "url": "http://myurl.com/myid"
       }                                             ─ connections : a grab bag of connections
                                                       specific properties that add more information
       “connections”: {
         ...                                         ─
       }                                        

     }                                          




27       © 2013 IBM Corporation
Basic Entry – Title, Content, Object Summary




{
     "actor": {                                         Main items displayed in ActivityStream:
          "id": "@me"
                                                          ─ entry.title
     },
                                                          ─ entry.content
     "verb": "post",
     "title": "[entry.title]",
                                                          ─ entry.object.summary
     "content":"[entry.content]",
     "object": {
          "summary": "[entry.object.summary]",
          "objectType": "note",
          "id": "00011",
          "displayName": "[entry.object.displayName]",
          "url": "http://myurl.com/myid"
     }
}
28         © 2013 IBM Corporation
Basic Entry – Title, Content, Object Summary
                                  If title omitted, will be generated
                                   based on verb
                                   {
                                       "actor": {
                                          "id": "@me"
                                       },
                                       "verb": "post",
                                       "content":"[entry.content]",
                                       "object": {
                                          ...
                                       }
                                   }
                                  If content or object.summary
                                   omitted, nothing displayed
                                   {
                                       "actor": {
                                          "id": "@me"
                                       },
                                       "verb": "post",
                                       "title": "[entry.title]",
                                       "object": {
                                          "summary": "[entry.object.summary]",
                                          ...
                                       }
                                   }

29   © 2013 IBM Corporation
HTML Formatting for Title, Content, Object Summary

    No Active Content – ACF run on all fields
    title – Allows anchor tags only
    content, object.summary – Allows following tags
       ─ <a> <b> <blockquote> <br> <caption> <cite> <code> <col>
       ─ <colgroup> <dd> <dl> <dt> <em> <i> <img> <li> <ol> <p>
       ─ <pre> <q> <small> <strike> <strong> <sub> <sup> <table>
       ─ <tbody> <td> <tfoot> <th> <thead> <tr> <u> <ul>
    Style limitations
       ─ Images given max-width of 100% (of the item container)
       ─ Tables given simple 1px border
       ─ Vertical whitespace (newlines, paragraphs) collapsed




30    © 2013 IBM Corporation
HTML Formatting for Title, Content, Object Summary

        Only 6 lines of content and/or object.summary displayed initially
          ─ Show More / Show Less links provided




31       © 2013 IBM Corporation
Generator

     Identifies the source of the entry
     Can be used to request filtered feeds
     Can specify details in entry being posted
     "generator": {
       "id": "briansApp",
       "image": {
         "url": "http://http://briansApp.com/briansApp.png"
       },
       "displayName": "Brian's App",
       "url": "http://briansApp.com"
     }
     The image, if provided, is displayed in stream. Should be 16x16




32     © 2013 IBM Corporation
Generator – registering your application

    Applications can be registered (NewsActivityStreamService.registerApplication())
    Provide following details:
       ─ appId, displayName, url, secureUrl, imageUrl, secureImageUrl, summary
    Benefits:
       ─ Post events with just appId for generator
          "generator": {
                "id": "briansApp"
             }
       ─ ImageUrl or SecureImageUrl choosen appropriately for feed
       ─ Filter displayed in ActivityStreams in Connections
       ─




33    © 2013 IBM Corporation
File Item

       Use objectType: “file” for entry that denotes a file
{
  "actor": {
     "id": "@me"
  },
  "verb": "post",
  "title": "${Actor} has uploaded ${Object} to
 <a href='http://slideview.briansApp.com'>SlideView</a>",
  "object": {
     "summary": "",
     "objectType": "file",
     "id": "slide001",
     "fileUrl": "http://slideview.briansApp.com/AD104.odp",
     "displayName": "AD104.odp",
     "url": "http://slideview.briansApp.com/viewSlide?deck=AD104.odp"
  }
}
       Can also add preview image
     "object": {
       ...
       "image": {
         "url": "http://slideview.briansApp.com/getThumb?deck=AD104.odp"
       }
     }

34      © 2013 IBM Corporation
Embedded Experience
    Provide extra detail and embedded functionality for your ActivityStream entry
    Displayed in popup when entry is clicked in the stream
 


                                                          Defined in
                                                           entry.opensocial.embed
                                                       

                                                          Two types supported:
                                                            ─ OpenSocial gadget
                                                            ─ URL*
                                                            ─
                                                            ─
                                                            ─
                                                      * Require 4.0 CR2 for URL EE




35    © 2013 IBM Corporation
Embedded Experience – OpenSocial Gadget

    Need to provide gadget and context when posting entry
           "opensocial": {
             "embed": {
               "gadget": "http://briansApp.com/gadgets/slideview.xml",
               "context": {
                 "deck": "AD104.odp"
               }
             }
           }
    gadget – URI to the gadget definition
    context – Anything you want
    Gadget must be registered – via Homepage Administration UI or wsadmin commands
       ─ Gadgets that are not registered will be ignored, and a generic EE from Connections is used
    Typically, gadgets will use OAuth authentication to load data from application




36    © 2013 IBM Corporation
Embedded Experience – URL

    Provide url when posting entry
                "opensocial": {
                  "embed": {
                    "url": "http://slideview.briansApp.com/ee/viewSlide?deck=AS104.odp"
                  }
                }
    There is no context supported, but contextual data can be passed in URL
    URL must be whitelisted (via opensocial-config.xml)
       ─ URLs that are not whitelisted will be ignored, and generic EE from Connections is used




37    © 2013 IBM Corporation
Additonal details . . . Rollup

     

    In order to address the scenario where a user posts a file and 200 people 'like' it,
     

     filling up their Activity Stream, rollup needs to be performed. This means -
         ─ Only the latest event on any given object is shown
         ─ The 2 most recent comments are returned.

    We support the ?rollup=true flag on retrieval for specifying that a rolled up feed is
     required.


    In order to provide for rollup, simply add the following (by default, the object id will
     be used) -
         ─
         "connections": {
          "rollupid": "3d7638dd-b5e1-4d52-a03d-83591996da20"
         },

38       © 2013 IBM Corporation
Additonal details . . . Templated titles

     

    Connections allows for the introduction of two kinds of title template
     

         ─ Object substitutions - where a referenced object within the event is substituted into the title.
         ─ Title template substitutions - using object substitutions, providing a complete title

    Object Substitution - A number of substitution values are supported within a
     submitted event.title. These are specified using the ${} marker.
         ─ ${Actor} - this is converted into appropriately marked up HTML which displays the Actors name and
           links to a Business Card corresponding to the Actor
         ─ ${Object} - for person objects as per Actor above, otherwise the displayName with a link to the url
         ─ ${Target} - for person objects as per Actor above, otherwise the displayName with a link to the url


    Title Template Substitution
         ─ ${add}=${Actor} added ${Object}.
         ─ ${create}=${Actor} created ${Object}.
         ─ ....

39       © 2013 IBM Corporation
Additonal details . . . Distributing events

     {
         
           "to":[
              {"objectType":"person",
              "id":"acct:jane@example.org"}                Note : This reflects an outstanding
           ],                                                proposal to update the existing
           "cc":[
              {"objectType":"person",                        deliverTo model from Activity Streams.
               "id":"http://example.com/profiles/bob"}
           ],                                               An event can be distributed to multiple
           "verb":"post",                                    users
           "actor":{
              "objectType":"person",
                                                         
              "id":"acct:jane@example.org"},
           "object":{                                    
              ...
                                                         
           }
         }
     }




40           © 2013 IBM Corporation
Additonal details . . . Distribution . . . Restrictions

     
    By default most users do not have the authority to distribute events to another
     
     users stream. If they did then this would mean that any user would have the ability
     to spam indiscriminately.

    Although the ability to distribute can be opened up via configuration to any user,
     there is some basic distribution allowed for any user.
         1)      To [UserID] where the user in question is the current user
         2)      To @me which resolves to the same thing
         3)     To @public which means the event will appear on everyones discovery tab - but this is only
              permitted if the submitting user is also the actor in the event
         4)     To [CommunityId] where the current user is a member of that community or the community is
              public - again this is only permitted if the submitting user is also the actor in the event.

    In order do distribute any event to any user, the distributing user needs to be in the
     appropriate J2EE Role.


41       © 2013 IBM Corporation
Agenda

    What is the Activity Stream ?
       ─ What do you expect to see and where, and what do you expect not to see ?
    Decide on your user model
       ─ How do you want to interact with the Activity Stream ?
    Tooling up
       ─ Use the right tools to get you started
    Authentication and Authorization
       ─ Who are you and how can we be sure ?
    Putting it all together
      ─ A simple extension . . .
    Administration and configuration
       ─ What does an administrator need to know ?
    Posting an event
       ─ How to POST and how the event is rendered
    Retrieving lists of events
       ─ How to find the events of interest
42    © 2013 IBM Corporation
Details . . . Querying feeds

     

    My Activity Stream /activitystreams/@me/@all
     

         ─ Filtered by Blogs /activitystreams/@me/@all/blogs
         ─ Filtered by Activities /activitystreams/@me/@all/activities
         ─ Filtered by Files /activitystreams/@me/@all/files
         ─ Filtered by [AnyApp] /activitystreams/@me/@all/AnyApp
         ─
    Single event details /activitystreams/@me/@all/@all/[eventid]


    Object History /activitystreams/@me/@all/@all?filterBy=object &filterOp=equals
     &filterValue=[blogid]





43       © 2013 IBM Corporation
Additional details . . . Some special applications . . .

     

     
       @communities - this covers any events you receive as a result of communities
     you are following and so the generator id you will see can be from the submitting
     component application and not always 'communities'

      @tags - this covers any events you receive as a result of tags you are following
     and so the generator id you will see will be from the submitting component
     application and never 'tags'

       @people - this covers any events you receive as a result of people you are
     following and so the generator id you will see can be from the submitting
     component application and not always 'profiles'

      @status - this covers status updates that may be received from either the
     profiles application or the communities application



44       © 2013 IBM Corporation

Additonal details . . . Working with Communities

     

    Filtering of a users stream based on events they receive as a result of following a
     

     community simply involves using the /@communities application filter

    When retrieving a 'community feed' we treat communities as a 'pseudo-person'
         ─ /connections/opensocial/rest/activitystreams/<communityid>/@all
         ─ This provides a list of all events relating to a community independent of who is following
         ─ This feed also verifies that the community is either public, or that the viewer is a member of the
           community (otherwise they would not have rights to view the feed)

    To POST an event to a community, you distribute the event to the community as if
     it were a person, by either
         ─ POSTing to /connections/opensocial/rest/activitystreams/<communityid>/@all
         ─ Including the community in the distribution list





45       © 2013 IBM Corporation
Additonal details . . . Saved and actionable events

     

    Actionable Events
     

         ─ These are events that are marked as requiring attention either by the user or by the application that
           submitted the event (note : the connections UX doesn't expose the ability for a user to mark an
           event actionable, but the API does)
         ─ All actionable events can be retrieved using the URL : /activitystreams/@me/@actions

    Saved Events
         ─ These are events that are marked by the user as being of sufficient interest to review later
         ─ All actionable events can be retrieved using the URL : /activitystreams/@me/@saved
         ─
    Note : Actionable and saved events are not removed during normal event cleanup.





46       © 2013 IBM Corporation
OpenNTF Appathon (Starts Feburary 2013)

                                                        IBM Connections App
                                                         Dev - Prizes: $5000
                                                        IBM XPages App Dev -
                                                         Prizes: $5000
                                                     

                                                        Anything leveraging
                                                         Connections (social SDK,
                                                         OpenSocial, iWidgets,
                                                         REST APIs,
                                                         customization,
                                                         WebSphere, PHP,
                                                         XPages, etc.) will be
                                                         accepted.




                            http://appathon.openntf.org
   © 2013 IBM Corporation
Legal disclaimer
     © IBM Corporation 2013. All Rights Reserved.
       The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication,
       it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice.
       IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have
       the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.
       References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced
       in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any
       way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other
       results.
       Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
       All references to BriansApp refer to a fictitious company and are used for illustration purposes only.




48         © 2013 IBM Corporation
Related Sessions
    AD105 - Customizing and Extending IBM Connections - Tue 11:15am
    INV305 - The Power of Social Software in the Enterprise - Tue 1:30pm
    AD206 - IBM Domino XPages: Embrace, Extend, Integrate - Tue 1:30pm
    ID105 - You Have My Mail in Your Connections - Tue 3:00pm


    BOF406 - Connections at IBM and at Your Company - Wed 7:00am
    ID308 - Social Content Managemner Solutions for IBM Connections - Wed 10:00am
    AD401 - Developing Integrated Applications with the Social Business Toolkit - Wed 11:15am
    ID307 - Make your Microsoft Stack Social with IBM Connections - Wed 11:15am
    ID302 - What's new in IBM Connections Mobile - Wed 1:30pm
    ID306 - IBM Connections Mobile Server Administration and Security - Wed 3:00pm
    ID309 - Leveraging the Power of IBM Connections and IBM Websphere Portal Wed 3:00pm
    ID304 - IBM Connections 4.0 Deployment and Performance Planning - Wed 4:15pm
    INV211 - The New Social Business Paradigm with OpenSocial - Wed 4:15pm
    SHOW300 - IBM Connections 4 101: Installing & Deploying IBM Connectons Cognos - Wed 4:30pm


    ID305 - Getting the Most Value Out of Metrics in IBM Connections 4 - Thur 10:00am

49     © 2013 IBM Corporation

More Related Content

What's hot

Responsive design: techniques and tricks to prepare your websites for the mul...
Responsive design: techniques and tricks to prepare your websites for the mul...Responsive design: techniques and tricks to prepare your websites for the mul...
Responsive design: techniques and tricks to prepare your websites for the mul...Andreas Bovens
 
Skb web2.0
Skb web2.0Skb web2.0
Skb web2.0animove
 
Enterprise 2.0 with Open Source Frameworks like Agorava
Enterprise 2.0 with Open Source Frameworks like AgoravaEnterprise 2.0 with Open Source Frameworks like Agorava
Enterprise 2.0 with Open Source Frameworks like AgoravaWerner Keil
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - MozillaRobert Nyman
 
Metrics that Matter-Approaches To Managing High Performing Websites
Metrics that Matter-Approaches To Managing High Performing WebsitesMetrics that Matter-Approaches To Managing High Performing Websites
Metrics that Matter-Approaches To Managing High Performing WebsitesBen Rushlo
 
Automation in Digital Cloud Labs
Automation in Digital Cloud LabsAutomation in Digital Cloud Labs
Automation in Digital Cloud LabsRapidValue
 
SproutCore GTUG
SproutCore GTUGSproutCore GTUG
SproutCore GTUGsproutit
 

What's hot (7)

Responsive design: techniques and tricks to prepare your websites for the mul...
Responsive design: techniques and tricks to prepare your websites for the mul...Responsive design: techniques and tricks to prepare your websites for the mul...
Responsive design: techniques and tricks to prepare your websites for the mul...
 
Skb web2.0
Skb web2.0Skb web2.0
Skb web2.0
 
Enterprise 2.0 with Open Source Frameworks like Agorava
Enterprise 2.0 with Open Source Frameworks like AgoravaEnterprise 2.0 with Open Source Frameworks like Agorava
Enterprise 2.0 with Open Source Frameworks like Agorava
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
 
Metrics that Matter-Approaches To Managing High Performing Websites
Metrics that Matter-Approaches To Managing High Performing WebsitesMetrics that Matter-Approaches To Managing High Performing Websites
Metrics that Matter-Approaches To Managing High Performing Websites
 
Automation in Digital Cloud Labs
Automation in Digital Cloud LabsAutomation in Digital Cloud Labs
Automation in Digital Cloud Labs
 
SproutCore GTUG
SproutCore GTUGSproutCore GTUG
SproutCore GTUG
 

Viewers also liked

MAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - DownloadableMAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - Downloadablepaulbastide
 
IBM Connect 2014 - AD105: IBM iNotes and IBM SmartCloud Notes Web Customizati...
IBM Connect 2014 - AD105: IBM iNotes and IBM SmartCloud Notes Web Customizati...IBM Connect 2014 - AD105: IBM iNotes and IBM SmartCloud Notes Web Customizati...
IBM Connect 2014 - AD105: IBM iNotes and IBM SmartCloud Notes Web Customizati...IBM Connections Developers
 
Goldsmiths
GoldsmithsGoldsmiths
Goldsmithsdrjulia
 
Rock the activity stream api
Rock the activity stream api Rock the activity stream api
Rock the activity stream api Wannes Rams
 
What is new in IBM Connections 5.5 and IBM Docs 2.0
What is new in IBM Connections 5.5 and IBM Docs 2.0What is new in IBM Connections 5.5 and IBM Docs 2.0
What is new in IBM Connections 5.5 and IBM Docs 2.0Luis Benitez
 
IBM Watson Health: How cognitive technologies have begun transforming clinica...
IBM Watson Health: How cognitive technologies have begun transforming clinica...IBM Watson Health: How cognitive technologies have begun transforming clinica...
IBM Watson Health: How cognitive technologies have begun transforming clinica...Maged N. Kamel Boulos
 
IBM Watson in Healthcare
IBM Watson in HealthcareIBM Watson in Healthcare
IBM Watson in HealthcareAnders Quitzau
 

Viewers also liked (9)

MAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - DownloadableMAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - Downloadable
 
IBM Connect 2014 - AD105: IBM iNotes and IBM SmartCloud Notes Web Customizati...
IBM Connect 2014 - AD105: IBM iNotes and IBM SmartCloud Notes Web Customizati...IBM Connect 2014 - AD105: IBM iNotes and IBM SmartCloud Notes Web Customizati...
IBM Connect 2014 - AD105: IBM iNotes and IBM SmartCloud Notes Web Customizati...
 
Goldsmiths
GoldsmithsGoldsmiths
Goldsmiths
 
Rock the activity stream api
Rock the activity stream api Rock the activity stream api
Rock the activity stream api
 
Integrated Care
Integrated CareIntegrated Care
Integrated Care
 
IBM's watson
IBM's watsonIBM's watson
IBM's watson
 
What is new in IBM Connections 5.5 and IBM Docs 2.0
What is new in IBM Connections 5.5 and IBM Docs 2.0What is new in IBM Connections 5.5 and IBM Docs 2.0
What is new in IBM Connections 5.5 and IBM Docs 2.0
 
IBM Watson Health: How cognitive technologies have begun transforming clinica...
IBM Watson Health: How cognitive technologies have begun transforming clinica...IBM Watson Health: How cognitive technologies have begun transforming clinica...
IBM Watson Health: How cognitive technologies have begun transforming clinica...
 
IBM Watson in Healthcare
IBM Watson in HealthcareIBM Watson in Healthcare
IBM Watson in Healthcare
 

Similar to AD104 - IBM Connections ActivityStream Integration - IBM Connect 2013

10 Tips to Strengthen Your Insider Threat Program
10 Tips to Strengthen Your Insider Threat Program 10 Tips to Strengthen Your Insider Threat Program
10 Tips to Strengthen Your Insider Threat Program Dtex Systems
 
stackconf 2023 | Measuring Reliability in Production by Thomas Voss.pdf
stackconf 2023 | Measuring Reliability in Production by Thomas Voss.pdfstackconf 2023 | Measuring Reliability in Production by Thomas Voss.pdf
stackconf 2023 | Measuring Reliability in Production by Thomas Voss.pdfNETWAYS
 
Fédération d’identité : des concepts Théoriques aux études de cas d’implément...
Fédération d’identité : des concepts Théoriques aux études de cas d’implément...Fédération d’identité : des concepts Théoriques aux études de cas d’implément...
Fédération d’identité : des concepts Théoriques aux études de cas d’implément...e-Xpert Solutions SA
 
Sean White- Kansas City
Sean White- Kansas CitySean White- Kansas City
Sean White- Kansas CitySplunk
 
Getting Started with Splunk Enterprise
Getting Started with Splunk EnterpriseGetting Started with Splunk Enterprise
Getting Started with Splunk EnterpriseSplunk
 
SplunkLive! Paris 2018: Intro to Security Analytics Methods
SplunkLive! Paris 2018: Intro to Security Analytics MethodsSplunkLive! Paris 2018: Intro to Security Analytics Methods
SplunkLive! Paris 2018: Intro to Security Analytics MethodsSplunk
 
Azure Forensics & Incident Response
Azure Forensics & Incident ResponseAzure Forensics & Incident Response
Azure Forensics & Incident ResponseChristopher Doman
 
Data Consult Managed Security Services
Data Consult Managed Security ServicesData Consult Managed Security Services
Data Consult Managed Security ServicesJad Bejjani
 
Getting Started with Splunk Enterprises
Getting Started with Splunk EnterprisesGetting Started with Splunk Enterprises
Getting Started with Splunk EnterprisesSplunk
 
Enabling Event Driven Architecture with PubSub+
Enabling Event Driven Architecture with PubSub+Enabling Event Driven Architecture with PubSub+
Enabling Event Driven Architecture with PubSub+Himanshu Gupta
 
How to Discover, Visualize, Catalog, Share and Reuse your Kafka Streams (Jona...
How to Discover, Visualize, Catalog, Share and Reuse your Kafka Streams (Jona...How to Discover, Visualize, Catalog, Share and Reuse your Kafka Streams (Jona...
How to Discover, Visualize, Catalog, Share and Reuse your Kafka Streams (Jona...HostedbyConfluent
 
PubSub+ Event Portal for Apache Kafka
PubSub+ Event Portal for Apache KafkaPubSub+ Event Portal for Apache Kafka
PubSub+ Event Portal for Apache KafkaSolace
 
Cloud App Security Customer Presentation.pdf
Cloud App Security Customer Presentation.pdfCloud App Security Customer Presentation.pdf
Cloud App Security Customer Presentation.pdfErikHof4
 
SplunkLive! Zurich 2018: Monitoring the End User Experience with Splunk
SplunkLive! Zurich 2018: Monitoring the End User Experience with SplunkSplunkLive! Zurich 2018: Monitoring the End User Experience with Splunk
SplunkLive! Zurich 2018: Monitoring the End User Experience with SplunkSplunk
 
What is a Deployment Tool and How Can it Help Me?
What is a Deployment Tool and How Can it Help Me?What is a Deployment Tool and How Can it Help Me?
What is a Deployment Tool and How Can it Help Me?XebiaLabs
 
Data Consult - Managed Security Services
Data Consult - Managed Security ServicesData Consult - Managed Security Services
Data Consult - Managed Security ServicesJad Bejjani
 
Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...
Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...
Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...Amazon Web Services
 
DevSecCon London 2018: How to fit threat modelling into agile development: sl...
DevSecCon London 2018: How to fit threat modelling into agile development: sl...DevSecCon London 2018: How to fit threat modelling into agile development: sl...
DevSecCon London 2018: How to fit threat modelling into agile development: sl...DevSecCon
 

Similar to AD104 - IBM Connections ActivityStream Integration - IBM Connect 2013 (20)

10 Tips to Strengthen Your Insider Threat Program
10 Tips to Strengthen Your Insider Threat Program 10 Tips to Strengthen Your Insider Threat Program
10 Tips to Strengthen Your Insider Threat Program
 
stackconf 2023 | Measuring Reliability in Production by Thomas Voss.pdf
stackconf 2023 | Measuring Reliability in Production by Thomas Voss.pdfstackconf 2023 | Measuring Reliability in Production by Thomas Voss.pdf
stackconf 2023 | Measuring Reliability in Production by Thomas Voss.pdf
 
Fédération d’identité : des concepts Théoriques aux études de cas d’implément...
Fédération d’identité : des concepts Théoriques aux études de cas d’implément...Fédération d’identité : des concepts Théoriques aux études de cas d’implément...
Fédération d’identité : des concepts Théoriques aux études de cas d’implément...
 
Basics 4
Basics   4Basics   4
Basics 4
 
Sean White- Kansas City
Sean White- Kansas CitySean White- Kansas City
Sean White- Kansas City
 
Getting Started with Splunk Enterprise
Getting Started with Splunk EnterpriseGetting Started with Splunk Enterprise
Getting Started with Splunk Enterprise
 
SplunkLive! Paris 2018: Intro to Security Analytics Methods
SplunkLive! Paris 2018: Intro to Security Analytics MethodsSplunkLive! Paris 2018: Intro to Security Analytics Methods
SplunkLive! Paris 2018: Intro to Security Analytics Methods
 
Azure Forensics & Incident Response
Azure Forensics & Incident ResponseAzure Forensics & Incident Response
Azure Forensics & Incident Response
 
Online event management system
Online event management systemOnline event management system
Online event management system
 
Data Consult Managed Security Services
Data Consult Managed Security ServicesData Consult Managed Security Services
Data Consult Managed Security Services
 
Getting Started with Splunk Enterprises
Getting Started with Splunk EnterprisesGetting Started with Splunk Enterprises
Getting Started with Splunk Enterprises
 
Enabling Event Driven Architecture with PubSub+
Enabling Event Driven Architecture with PubSub+Enabling Event Driven Architecture with PubSub+
Enabling Event Driven Architecture with PubSub+
 
How to Discover, Visualize, Catalog, Share and Reuse your Kafka Streams (Jona...
How to Discover, Visualize, Catalog, Share and Reuse your Kafka Streams (Jona...How to Discover, Visualize, Catalog, Share and Reuse your Kafka Streams (Jona...
How to Discover, Visualize, Catalog, Share and Reuse your Kafka Streams (Jona...
 
PubSub+ Event Portal for Apache Kafka
PubSub+ Event Portal for Apache KafkaPubSub+ Event Portal for Apache Kafka
PubSub+ Event Portal for Apache Kafka
 
Cloud App Security Customer Presentation.pdf
Cloud App Security Customer Presentation.pdfCloud App Security Customer Presentation.pdf
Cloud App Security Customer Presentation.pdf
 
SplunkLive! Zurich 2018: Monitoring the End User Experience with Splunk
SplunkLive! Zurich 2018: Monitoring the End User Experience with SplunkSplunkLive! Zurich 2018: Monitoring the End User Experience with Splunk
SplunkLive! Zurich 2018: Monitoring the End User Experience with Splunk
 
What is a Deployment Tool and How Can it Help Me?
What is a Deployment Tool and How Can it Help Me?What is a Deployment Tool and How Can it Help Me?
What is a Deployment Tool and How Can it Help Me?
 
Data Consult - Managed Security Services
Data Consult - Managed Security ServicesData Consult - Managed Security Services
Data Consult - Managed Security Services
 
Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...
Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...
Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...
 
DevSecCon London 2018: How to fit threat modelling into agile development: sl...
DevSecCon London 2018: How to fit threat modelling into agile development: sl...DevSecCon London 2018: How to fit threat modelling into agile development: sl...
DevSecCon London 2018: How to fit threat modelling into agile development: sl...
 

AD104 - IBM Connections ActivityStream Integration - IBM Connect 2013

  • 1. AD104 IBM Connections ActivityStream Integration Bill Looby Brian O'Gorman © 2013 IBM Corporation
  • 2. Agenda  What is the Activity Stream ? ─ What do you expect to see and where, and what do you expect not to see ?  Decide on your user model ─ How do you want to interact with the Activity Stream ?  Tooling up ─ Use the right tools to get you started  Authentication and Authorization ─ Who are you and how can we be sure ?  Putting it all together ─ A simple extension . . .  Administration and configuration ─ What does an administrator need to know ?  Posting an event ─ How to POST and how the event is rendered  Retrieving lists of events ─ How to find the events of interest 2 © 2013 IBM Corporation
  • 3. Agenda  What is the Activity Stream ? ─ What do you expect to see and where, and what do you expect not to see ?  Decide on your user model ─ How do you want to interact with the Activity Stream ?  Tooling up ─ Use the right tools to get you started  Authentication and Authorization ─ Who are you and how can we be sure ?  Putting it all together ─ A simple extension . . .  Administration and configuration ─ What does an administrator need to know ?  Posting an event ─ How to POST and how the event is rendered  Retrieving lists of events ─ How to find the events of interest 3 © 2013 IBM Corporation 
  • 4. What does the Activity Stream look like ? 4 © 2013 IBM Corporation
  • 5. Why is the Activity Stream important ?  To the Business . . . ─ To make Social Business work, all systems can participate by providing appropriate simply-structurd events ─ Once you have these events they can be stored and used in a manner consistent across all contributing systems ─ Gathering this informataion via an appropriate aggregation engine is a key part of Social Business technology ─ From this aggregation analytics can be performed including lens and filters on events ─  To the User it's a bit simpler . . . ─ Everything I need to know and act on in one place ! 5 © 2013 IBM Corporation
  • 6. Agenda  What is the Activity Stream ? ─ What do you expect to see and where, and what do you expect not to see ?  Decide on your user model ─ How do you want to interact with the Activity Stream ?  Tooling up ─ Use the right tools to get you started  Authentication and Authorization ─ Who are you and how can we be sure ?  Putting it all together ─ A simple extension . . .  Administration and configuration ─ What does an administrator need to know ?  Posting an event ─ How to POST and how the event is rendered  Retrieving lists of events ─ How to find the events of interest 6 © 2013 IBM Corporation
  • 7. Do you want to inform ? Here's something you'll be interested in  Inform a user ─ Send a specific notification to a specific user ─ Only that user will see it ─ Here's something that  happened. You can  Be discoverable find it if you look ! ─ Show the event on the public feed ─ Automatically forward to any followers of the 'Actor' ─ Here's something  that happened in  Inform a Community this community ─ Show the event on the community feed ─ Automatically forward to any followers of the Community 7 © 2013 IBM Corporation
  • 8. Do you want to interact ?  A link may be just fine ─ The application sending the event is complex and any user should follow the provided link to interact with it effectively   Or you may want to allow simple interactions ─ There are simple interactions that are suitable for inclusion with the event ─ For example : approval, rejection, simple selection, simple commenting, upload, share etc. ─ In each case, this is a simple enough interaction, so you would prefer not to lose your current browser context, but return quickly to your stream once complete  8 © 2013 IBM Corporation
  • 9. Do you want to consume ?  A general list ─ The activity stream can be consumed easily and presented within another application in order to ensure that any user using that application still sees their current stream. ─ This may be useful where there is a specific application in which users tent to 'live' so that they are unlikely to be paying attention to their stream otherwise.   An application specific list ─ A separate application may use Connections simply as a storage mechanism for its own events. ─ It can retrieve events specific to the application for display within the application ─ All of these events are then also available aggregated within Connections   Any combination ─ Basic filtering is provided to show information specific to an object/actor/community etc. ─ Search-based filtering allows for more specific combinations of criteria 9 © 2013 IBM Corporation
  • 10. Agenda  What is the Activity Stream ? ─ What do you expect to see and where, and what do you expect not to see ?  Decide on your user model ─ How do you want to interact with the Activity Stream ?  Tooling up ─ Use the right tools to get you started  Authentication and Authorization ─ Who are you and how can we be sure ?  Putting it all together ─ A simple extension . . .  Administration and configuration ─ What does an administrator need to know ?  Posting an event ─ How to POST and how the event is rendered  Retrieving lists of events ─ How to find the events of interest 10 © 2013 IBM Corporation 
  • 11. Some Tools – REST Client 11 © 2013 IBM Corporation
  • 12. Some Tools . . . continued  When using a REST Client Form based authentication can be used. But FBA should never be used other than this as it is considerably more difficult to manage.   Your browser is also a useful tool for all GET operations – you may want to install a JSON Feed Reader plugin.   cURL can be used to do simple command line based requests (you can for example set up a script to do some autopopulation this way) 12 © 2013 IBM Corporation
  • 13. Some Tools - Java  HttpClient ─ A simple http request mechanism from Apache ─ Sends and receives raw requests ─ Highly flexible and configurable   Abdera (as an aside – used for Atom generation and parsing) ─ An Atom manipulation library ─ Built on top of HttpClient ─ Creates and Parses atom feeds making the main properties available easily ─  Things to watch out for . . . . ─ Redirects – they autofollow by default, normally you won't need this ─ Authentication – you can set credentials to use on all requests ─ SSL – won't automatically accept, you need to add by default 13 © 2013 IBM Corporation
  • 14. Some Tools - Java DefaultHttpClient httpclient = new DefaultHttpClient(); // register the passed credentials UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(userName, password); CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); credentialsProvider.setCredentials( new AuthScope(host, AuthScope.ANY_PORT), credentials); httpclient.setCredentialsProvider(credentialsProvider); // register to auto accept SSL certificates and not to check hosts SSLContext sslcontext = SSLContext.getInstance("TLS"); sslcontext.init(null, null, null); SSLSocketFactory socketFactory = new SSLSocketFactory( new AnyTrustStrategy(), SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); // allow any SSL SchemeRegistry sr = httpclient.getConnectionManager().getSchemeRegistry(); sr.register(new Scheme("http", 80, PlainSocketFactory.getSocketFactory())); sr.register(new Scheme("https", 443, socketFactory)); return httpclient; 14 © 2013 IBM Corporation
  • 15. Agenda  What is the Activity Stream ? ─ What do you expect to see and where, and what do you expect not to see ?  Decide on your user model ─ How do you want to interact with the Activity Stream ?  Tooling up ─ Use the right tools to get you started  Authentication and Authorization ─ Who are you and how can we be sure ?  Putting it all together ─ A simple extension . . .  Administration and configuration ─ What does an administrator need to know ?  Posting an event ─ How to POST and how the event is rendered  Retrieving lists of events ─ How to find the events of interest 15 © 2013 IBM Corporation
  • 16. Authenticating requests  APIs that access public data don't require authentication   Connections to date has generally used Basic Authentication to access non- public data   As of IC4, OAuth access is available, and is the recommended authorization mechanism for Open Social APIs   OAuth is however designed primarily for for service to service rather than client applications.    16 © 2013 IBM Corporation
  • 17. Summary of authentication options  Anonymous access ─ For public data, some APIs are available at an anonymous URL, where no authentication challenge is performed or credentials expected.  Form Based Authentication ─ Authentication used by browser URLs (where the user is redirected to the login page) ─ Ajax applications also use this when accessing APIs in order to take advantage of the available session information ─ Complex login redirect handing is however required ─ Not recommended or supported for third party applications  Basic Authentication ─ Involves sending a Base-64 encoded header including the username and password ─ This should always be done over https (to avoid passwords being sent in cleartext) ─ Most HTTP libraries support settings for adding basic authentication headers (as do REST Client plugins)  OAuth Authorisation ─ Is an authorisation (rather than authentication) mechanism ─ You can authorise a service to act on your behalf without giving them your credentials  17 © 2013 IBM Corporation
  • 18. How do I 'invoke' the appropriate authorization mechanism  Answer . . . use the appropriate URL format !   <server>/connections/opensocial/rest/activitystreams/@me/@all ─ This is the 'default' fomat ─ It uses form based authentication (so you will get a redirect response if the appropriate session cookies are not provided for example) ─  <server>/connections/opensocial/anonymous/rest/activitystreams/@public/@all ─ This is available when querying public data and performs no authentication check ─  <server>/connections/opensocial/basic/rest/activitystreams/@public/@all ─ This performs the appropriate basic authentication challenge ─  <server>/connections/opensocial/oauth/rest/activitystreams/@public/@all ─ This performs the appropriate OAuth dance 18 © 2013 IBM Corporation
  • 19. Agenda  What is the Activity Stream ? ─ What do you expect to see and where, and what do you expect not to see ?  Decide on your user model ─ How do you want to interact with the Activity Stream ?  Tooling up ─ Use the right tools to get you started  Authentication and Authorization ─ Who are you and how can we be sure ?  Putting it all together ─ A simple extension . . .  Administration and configuration ─ What does an administrator need to know ?  Posting an event ─ How to POST and how the event is rendered  Retrieving lists of events ─ How to find the events of interest 19 © 2013 IBM Corporation
  • 20. Take a simple website. . . . 20 © 2013 IBM Corporation
  • 21. . . . and add some simple code . . . 21 © 2013 IBM Corporation
  • 22. . . . giving you . . .  . . . but this is just the start ─ You can enhance the content as it appears in the stream ─ You can provide an embedded experience for the event ─ You can associate the event with a community ─ You can make the event public ─ You can begin to support followers 22 © 2013 IBM Corporation
  • 23. Agenda  What is the Activity Stream ? ─ What do you expect to see and where, and what do you expect not to see ?  Decide on your user model ─ How do you want to interact with the Activity Stream ?  Tooling up ─ Use the right tools to get you started  Authentication and Authorization ─ Who are you and how can we be sure ?  Putting it all together ─ A simple extension . . .  Administration and configuration ─ What does an administrator need to know ?  Posting an event ─ How to POST and how the event is rendered  Retrieving lists of events ─ How to find the events of interest 23 © 2013 IBM Corporation
  • 24. A development only server  You can to edit the opensocial-config.xml file in the LotusConnections-config directory. Simply set the whiteListEnable attribute of gadget-settings to "false".  Any Gadget can now be placed into the stream, so this is not secure enough for a production environment. It is however suitable for a development server. <gadget-settings> <!-- Container token TTL: seconds; default = 30mins --> <security whitelistEnabled="false" featureAdminEnabled="true"> <proxy blockUnidentifiedIntranetBoundRequests="true"/> <security-tokens containerTokenTTLSec="1800" containerTokenCheckSec="5" gadgetTokenTTLSec="2700" transientErrorRetryIntervalSec="60" authErrorRetryIntervalSec="300"/> </security>  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. 24 © 2013 IBM Corporation
  • 25. Enabling developers on a production server  Where a server is required for both production and development the server admin can enable a development page and a number of hosts who have the authority to deliver Gadgets.  You will need to edit the opensocial-config.xml file in the LotusConnections- config directory  You should set the enabled attribute of developer to "true". You can then use the developer page to test Gadgets. ─ http://<myserver>/connections/resources/web/com.ibm.lconn.gadget/test/bootstrap.html <gadget-settings> . . . <developer enabled="true" allowSSOFeature="true" allowIntranetProxyAccess="true"> <developer-hosts-whitelist allServers="false"> <!-- add hosts <host url="http://{host.com}/base/url/1" /> --> </developer-hosts-whitelist> </developer> 25 © 2013 IBM Corporation
  • 26. Agenda  What is the Activity Stream ? ─ What do you expect to see and where, and what do you expect not to see ?  Decide on your user model ─ How do you want to interact with the Activity Stream ?  Tooling up ─ Use the right tools to get you started  Authentication and Authorization ─ Who are you and how can we be sure ?  Putting it all together ─ A simple extension . . .  Administration and configuration ─ What does an administrator need to know ?  Posting an event ─ How to POST and how the event is rendered  Retrieving lists of events ─ How to find the events of interest 26 © 2013 IBM Corporation
  • 27. Posting an event {  You can POST any event to the stream "actor": { of the current user  "id": "@me" ─ /connections/opensocial/rest/activitystreams/ },  @me/@all "verb": "post", "title": "${share}",  The main details are - "content":"This event is my <b>first entry</b>", ─ actor : Connections or External Id "updated": "2012-01-01T12:00:00.000Z", ─ verb : from a set list "object": { ─ title : Connections will generate if needed "summary": "First Entry details", ─ content : for display of event details "objectType": "note", ─ updated : event time "id": "objectid", "displayName": "First entry", ─ object : details on the object including title, id etc. "url": "http://myurl.com/myid" } ─ connections : a grab bag of connections specific properties that add more information “connections”: { ... ─ }  }  27 © 2013 IBM Corporation
  • 28. Basic Entry – Title, Content, Object Summary { "actor": {  Main items displayed in ActivityStream: "id": "@me" ─ entry.title }, ─ entry.content "verb": "post", "title": "[entry.title]", ─ entry.object.summary "content":"[entry.content]", "object": { "summary": "[entry.object.summary]", "objectType": "note", "id": "00011", "displayName": "[entry.object.displayName]", "url": "http://myurl.com/myid" } } 28 © 2013 IBM Corporation
  • 29. Basic Entry – Title, Content, Object Summary  If title omitted, will be generated based on verb { "actor": { "id": "@me" }, "verb": "post", "content":"[entry.content]", "object": { ... } }  If content or object.summary omitted, nothing displayed { "actor": { "id": "@me" }, "verb": "post", "title": "[entry.title]", "object": { "summary": "[entry.object.summary]", ... } } 29 © 2013 IBM Corporation
  • 30. HTML Formatting for Title, Content, Object Summary  No Active Content – ACF run on all fields  title – Allows anchor tags only  content, object.summary – Allows following tags ─ <a> <b> <blockquote> <br> <caption> <cite> <code> <col> ─ <colgroup> <dd> <dl> <dt> <em> <i> <img> <li> <ol> <p> ─ <pre> <q> <small> <strike> <strong> <sub> <sup> <table> ─ <tbody> <td> <tfoot> <th> <thead> <tr> <u> <ul>  Style limitations ─ Images given max-width of 100% (of the item container) ─ Tables given simple 1px border ─ Vertical whitespace (newlines, paragraphs) collapsed 30 © 2013 IBM Corporation
  • 31. HTML Formatting for Title, Content, Object Summary  Only 6 lines of content and/or object.summary displayed initially ─ Show More / Show Less links provided 31 © 2013 IBM Corporation
  • 32. Generator  Identifies the source of the entry  Can be used to request filtered feeds  Can specify details in entry being posted "generator": { "id": "briansApp", "image": { "url": "http://http://briansApp.com/briansApp.png" }, "displayName": "Brian's App", "url": "http://briansApp.com" }  The image, if provided, is displayed in stream. Should be 16x16 32 © 2013 IBM Corporation
  • 33. Generator – registering your application  Applications can be registered (NewsActivityStreamService.registerApplication())  Provide following details: ─ appId, displayName, url, secureUrl, imageUrl, secureImageUrl, summary  Benefits: ─ Post events with just appId for generator "generator": { "id": "briansApp" } ─ ImageUrl or SecureImageUrl choosen appropriately for feed ─ Filter displayed in ActivityStreams in Connections ─ 33 © 2013 IBM Corporation
  • 34. File Item  Use objectType: “file” for entry that denotes a file { "actor": { "id": "@me" }, "verb": "post", "title": "${Actor} has uploaded ${Object} to <a href='http://slideview.briansApp.com'>SlideView</a>", "object": { "summary": "", "objectType": "file", "id": "slide001", "fileUrl": "http://slideview.briansApp.com/AD104.odp", "displayName": "AD104.odp", "url": "http://slideview.briansApp.com/viewSlide?deck=AD104.odp" } }  Can also add preview image "object": { ... "image": { "url": "http://slideview.briansApp.com/getThumb?deck=AD104.odp" } } 34 © 2013 IBM Corporation
  • 35. Embedded Experience  Provide extra detail and embedded functionality for your ActivityStream entry  Displayed in popup when entry is clicked in the stream   Defined in entry.opensocial.embed   Two types supported: ─ OpenSocial gadget ─ URL* ─ ─ ─ * Require 4.0 CR2 for URL EE 35 © 2013 IBM Corporation
  • 36. Embedded Experience – OpenSocial Gadget  Need to provide gadget and context when posting entry "opensocial": { "embed": { "gadget": "http://briansApp.com/gadgets/slideview.xml", "context": { "deck": "AD104.odp" } } }  gadget – URI to the gadget definition  context – Anything you want  Gadget must be registered – via Homepage Administration UI or wsadmin commands ─ Gadgets that are not registered will be ignored, and a generic EE from Connections is used  Typically, gadgets will use OAuth authentication to load data from application 36 © 2013 IBM Corporation
  • 37. Embedded Experience – URL  Provide url when posting entry "opensocial": { "embed": { "url": "http://slideview.briansApp.com/ee/viewSlide?deck=AS104.odp" } }  There is no context supported, but contextual data can be passed in URL  URL must be whitelisted (via opensocial-config.xml) ─ URLs that are not whitelisted will be ignored, and generic EE from Connections is used 37 © 2013 IBM Corporation
  • 38. Additonal details . . . Rollup   In order to address the scenario where a user posts a file and 200 people 'like' it,  filling up their Activity Stream, rollup needs to be performed. This means - ─ Only the latest event on any given object is shown ─ The 2 most recent comments are returned.  We support the ?rollup=true flag on retrieval for specifying that a rolled up feed is required.   In order to provide for rollup, simply add the following (by default, the object id will be used) - ─ "connections": { "rollupid": "3d7638dd-b5e1-4d52-a03d-83591996da20" },  38 © 2013 IBM Corporation
  • 39. Additonal details . . . Templated titles   Connections allows for the introduction of two kinds of title template  ─ Object substitutions - where a referenced object within the event is substituted into the title. ─ Title template substitutions - using object substitutions, providing a complete title  Object Substitution - A number of substitution values are supported within a submitted event.title. These are specified using the ${} marker. ─ ${Actor} - this is converted into appropriately marked up HTML which displays the Actors name and links to a Business Card corresponding to the Actor ─ ${Object} - for person objects as per Actor above, otherwise the displayName with a link to the url ─ ${Target} - for person objects as per Actor above, otherwise the displayName with a link to the url   Title Template Substitution ─ ${add}=${Actor} added ${Object}. ─ ${create}=${Actor} created ${Object}. ─ ....  39 © 2013 IBM Corporation
  • 40. Additonal details . . . Distributing events {  "to":[ {"objectType":"person",  "id":"acct:jane@example.org"}  Note : This reflects an outstanding ], proposal to update the existing "cc":[ {"objectType":"person", deliverTo model from Activity Streams. "id":"http://example.com/profiles/bob"} ],  An event can be distributed to multiple "verb":"post", users "actor":{ "objectType":"person",  "id":"acct:jane@example.org"}, "object":{  ...  } } } 40 © 2013 IBM Corporation
  • 41. Additonal details . . . Distribution . . . Restrictions   By default most users do not have the authority to distribute events to another  users stream. If they did then this would mean that any user would have the ability to spam indiscriminately.  Although the ability to distribute can be opened up via configuration to any user, there is some basic distribution allowed for any user. 1) To [UserID] where the user in question is the current user 2) To @me which resolves to the same thing 3) To @public which means the event will appear on everyones discovery tab - but this is only permitted if the submitting user is also the actor in the event 4) To [CommunityId] where the current user is a member of that community or the community is public - again this is only permitted if the submitting user is also the actor in the event.  In order do distribute any event to any user, the distributing user needs to be in the appropriate J2EE Role. 41 © 2013 IBM Corporation
  • 42. Agenda  What is the Activity Stream ? ─ What do you expect to see and where, and what do you expect not to see ?  Decide on your user model ─ How do you want to interact with the Activity Stream ?  Tooling up ─ Use the right tools to get you started  Authentication and Authorization ─ Who are you and how can we be sure ?  Putting it all together ─ A simple extension . . .  Administration and configuration ─ What does an administrator need to know ?  Posting an event ─ How to POST and how the event is rendered  Retrieving lists of events ─ How to find the events of interest 42 © 2013 IBM Corporation
  • 43. Details . . . Querying feeds   My Activity Stream /activitystreams/@me/@all  ─ Filtered by Blogs /activitystreams/@me/@all/blogs ─ Filtered by Activities /activitystreams/@me/@all/activities ─ Filtered by Files /activitystreams/@me/@all/files ─ Filtered by [AnyApp] /activitystreams/@me/@all/AnyApp ─  Single event details /activitystreams/@me/@all/@all/[eventid]   Object History /activitystreams/@me/@all/@all?filterBy=object &filterOp=equals &filterValue=[blogid]  43 © 2013 IBM Corporation
  • 44. Additional details . . . Some special applications . . .    @communities - this covers any events you receive as a result of communities you are following and so the generator id you will see can be from the submitting component application and not always 'communities'  @tags - this covers any events you receive as a result of tags you are following and so the generator id you will see will be from the submitting component application and never 'tags'  @people - this covers any events you receive as a result of people you are following and so the generator id you will see can be from the submitting component application and not always 'profiles'  @status - this covers status updates that may be received from either the profiles application or the communities application  44 © 2013 IBM Corporation 
  • 45. Additonal details . . . Working with Communities   Filtering of a users stream based on events they receive as a result of following a  community simply involves using the /@communities application filter  When retrieving a 'community feed' we treat communities as a 'pseudo-person' ─ /connections/opensocial/rest/activitystreams/<communityid>/@all ─ This provides a list of all events relating to a community independent of who is following ─ This feed also verifies that the community is either public, or that the viewer is a member of the community (otherwise they would not have rights to view the feed)  To POST an event to a community, you distribute the event to the community as if it were a person, by either ─ POSTing to /connections/opensocial/rest/activitystreams/<communityid>/@all ─ Including the community in the distribution list  45 © 2013 IBM Corporation
  • 46. Additonal details . . . Saved and actionable events   Actionable Events  ─ These are events that are marked as requiring attention either by the user or by the application that submitted the event (note : the connections UX doesn't expose the ability for a user to mark an event actionable, but the API does) ─ All actionable events can be retrieved using the URL : /activitystreams/@me/@actions  Saved Events ─ These are events that are marked by the user as being of sufficient interest to review later ─ All actionable events can be retrieved using the URL : /activitystreams/@me/@saved ─  Note : Actionable and saved events are not removed during normal event cleanup.  46 © 2013 IBM Corporation
  • 47. OpenNTF Appathon (Starts Feburary 2013)  IBM Connections App Dev - Prizes: $5000  IBM XPages App Dev - Prizes: $5000   Anything leveraging Connections (social SDK, OpenSocial, iWidgets, REST APIs, customization, WebSphere, PHP, XPages, etc.) will be accepted. http://appathon.openntf.org © 2013 IBM Corporation
  • 48. Legal disclaimer © IBM Corporation 2013. All Rights Reserved. The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results. Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. All references to BriansApp refer to a fictitious company and are used for illustration purposes only. 48 © 2013 IBM Corporation
  • 49. Related Sessions  AD105 - Customizing and Extending IBM Connections - Tue 11:15am  INV305 - The Power of Social Software in the Enterprise - Tue 1:30pm  AD206 - IBM Domino XPages: Embrace, Extend, Integrate - Tue 1:30pm  ID105 - You Have My Mail in Your Connections - Tue 3:00pm   BOF406 - Connections at IBM and at Your Company - Wed 7:00am  ID308 - Social Content Managemner Solutions for IBM Connections - Wed 10:00am  AD401 - Developing Integrated Applications with the Social Business Toolkit - Wed 11:15am  ID307 - Make your Microsoft Stack Social with IBM Connections - Wed 11:15am  ID302 - What's new in IBM Connections Mobile - Wed 1:30pm  ID306 - IBM Connections Mobile Server Administration and Security - Wed 3:00pm  ID309 - Leveraging the Power of IBM Connections and IBM Websphere Portal Wed 3:00pm  ID304 - IBM Connections 4.0 Deployment and Performance Planning - Wed 4:15pm  INV211 - The New Social Business Paradigm with OpenSocial - Wed 4:15pm  SHOW300 - IBM Connections 4 101: Installing & Deploying IBM Connectons Cognos - Wed 4:30pm   ID305 - Getting the Most Value Out of Metrics in IBM Connections 4 - Thur 10:00am 49 © 2013 IBM Corporation