SlideShare una empresa de Scribd logo
1 de 24
There’s an API for that! Why and 
how to build on the IBM 
Connections PLATFORM 
Mikkel Flindt Heisterberg 
Senior Solution Architect and Partner 
OnTime® by IntraVision
Agenda 
• Brief intro to 
–IBM Connections as a PLATFORM 
–iWidgets for IBM Connections 
–Developing for the Activity Stream 
–SPI’s and Event handlers 
Mikkel Flindt Heisterberg 
Twitter: @lekkim 
E-mail: mfh@intravision.dk 
http://lekkimworld.com 
http://slideshare.net/lekkim
The IBM Connections platform
Widgets
Widgets – descriptor 
<iw:iwidget id="com.example.ExampleWidget" supportedModes="view fullpage” 
mode="view” lang="en" xmlns:iw="http://www.ibm.com/xmlns/prod/iWidget" 
iScope="com.example.ExampleWidget"> 
<iw:resource uri="http://www.example.com/ExampleWidget.js" /> 
<iw:resource uri="http://www.example.com/ExampleWidget.css" /> 
<iw:content mode="view"> 
<![CDATA[ 
<div id="_IWID_widgetContent">Loading...</div> 
]]> 
</iw:content> 
<iw:content mode="fullpage"> 
<![CDATA[ 
<div id="_IWID_widgetContent">Loading...</div> 
]]> 
</iw:content> 
</iw:iwidget>
Widgets – iScope 
dojo.provide("com.example.ExampleWidget"); 
dojo.declare("com.example.ExampleWidget", null, { 
constructor: function() {}, 
onLoad: function() {}, 
onView: function() {}, 
onEdit: function() {}, 
onFullpage: function() {}, 
onSearch: function() {} 
});
Widgets – declaration 
Declaratively configured using widgets-config.xml 
<widgetDef defId="com.example.ExampleWidget” 
url="/ExampleWidget.xml" loginRequired="true” 
showInPallette=”true” primaryWidget=”false”> 
<itemSet> 
<item name="resourceId" value="{resourceId}" /> 
<item name="profilesCtx" value="{profilesSvcRef}" /> 
<item name="myProp" value="Abc123" /> 
</itemSet> 
</widgetDef>
Widgets – iContext 
• An iContext instance is set into the iScope instance 
• The iContext provides access to the widget markup (e.g. root 
element), I/O related functions (i.e. URL rewriting), widget 
attributes etc. 
• The iContext is easily accessed from the iScope class using 
this.iContext 
• Important functions include: 
– iContext.getRootElement() : DOM Element 
– iContext.getElementById(id:string) : DOM Element 
– iContext.getiWidgetAttributes() : ItemSet 
– iContext.getUserProfile() : ItemSet 
– iContext.io.rewriteURI(uri:string) : string 
– iContext.iEvents.fireEvent(name:string, type:string, payload:object)
Loading prior to IBM Connections 
5
Loading from IBM Connections 5
Loading from IBM Connections 5 
http://www.youtube.com/ 
watch?v=1GLpA604Iic
Activity Stream 
• The following is based on my highly acclaimed 
(cough, cough) presentation on the Activity 
Stream 
• Much more detail and many examples there 
• See http://slideshare.net/lekkim 
Mikkel Flindt Heisterberg 
Twitter: @lekkim 
E-mail: mfh@intravision.dk 
http://lekkimworld.com 
http://slideshare.net/lekkim
Activity Stream 
• IS 
– River of news – it’s like water flowing by you 
– Notifications about ”stuff” happening in (other) 
systems – we refer to these notifications as 
entries 
• ISN’T 
– A new inbox – doesn’t replace email 
– A perpeptual data store – entries are deleted 
based on a server defined purge interval (default 
is 30 days) unless saved or actionable
Activity Stream 
• In my opinion it makes most sense to not consider 
the activity stream as one single stream 
• Instead think that 
– Each user has his/her own (@me) 
– There is a public stream (@public) 
– A community may have a stream if the widget has 
been added by a community owner – if there’s no 
stream for a community posting to it will return a 
”403 Forbidden”
Activity Stream 
• You will mainly use the POST and PUT methods to send JSON data (Content-Type: 
application/json) to the API 
• JSON is super simple key/value data format. It has simple datatypes (strings, 
numbers, booleans), objects and arrays 
{ 
”email”: ”mh@intravision.dk”, 
”niceGuy”: true, 
”age”: 37, 
”name”: { 
”first”: ”Mikkel Flindt”, ”last”: ” Heisterberg” 
}, 
”Connectospheres”: [6, 7, 8, 9, 10, 11, 12, 13, 14, 15] 
}
Activity Stream 
{ 
"actor": {"id": "@me"}, 
"verb": "post", 
"title": "Some entry title", 
"updated": "2013-05-17T12:00:00.000Z", 
"object": { 
"title": "Some object title", 
"objectType": "note", 
"id": "1234567890-1234567890-1234567890" 
} 
}
Activity Stream 
https://<host>/connections/opensocial/<auth>/rest/activitystreams 
/<user ID>/<group ID>/<application ID>/<activity ID> 
Component Meaning 
<auth> (optional) If using form based authentication leave this component out. Otherwise options 
are anonymos, basic, oauth. 
<user ID> The user whose stream you’re addressing – use @me for current users stream, @public for 
public stream or a community ID for the stream in a community. 
<group ID> The group of entries you’re addressing – use @all for all posts or options for special 
meaning such as @saved, @actions, @mentions. Refer for InfoCenter and resources slide 
for more. 
<application ID> When retrieving entries this refers to the application (or ”generator”) that created the entry. 
All the IBM Connections app names can be used (profiles, blogs, wikis etc.) plus custom 
ones (e.g. ontimegc). @all used for all applications. 
<activity ID> Used to reference a specific event e.g. for updating saved status.
Activity Stream 
1. /activitystreams/@me/@all 
List my (current users) entries 
2. /activitystreams/@public/@all 
List public stream entries 
3. /activitystreams/@me/@actions 
List my actionable events 
4. /activitystreams/@me/@saved/blogs 
List my saved events from blogs 
5. /@me/@all/@all/urn:lsid:lconn.ibm.com:activitystreams.story:bdb562f… 
Work with entry from my stream based on ID 
* All URLs above start with 
https://<host>/connections/opensocial/<auth>/rest 
Also used 
when creating 
new entries 
(e.g. POSTing)
Other Programming Interfaces 
• SPIs are lower-level programming interfaces which may be subject to 
modification from release to release. 
• Event SPI 
– The IBM Connections Event SPI allows third parties to consume event data generated by 
IBM Connections. 
• Seedlist SPI 
– Use the Seedlist service provider interface (SPI) provided with IBM Connections to 
integrate your search engine with IBM Connections content. 
• Service SPI 
– You can use the IBM Connections Service SPI to learn about the applications running in 
your IBM Connections deployment. 
• User SPI 
– You can use the IBM Connections User SPIs to access information about the users in 
your IBM Connections deployment.
Event Handlers – declaration 
Declaratively configured using events-config.xml 
<postHandler enabled=”true" invoke="ASYNC" 
name=”MyEventHandler” class="com.example.MyEventHandler"> 
<subscriptions> 
<subscription source="*" type="*" eventName="*"/> 
<!-- 
<subscription source=”PROFILES" type="*" 
eventName=”profiles.updated"/> 
<subscription source=”PROFILES" type="*" 
eventName=”profiles.person.photo.updated"/> 
--> 
</subscriptions> 
</postHandler>
Event Handlers – implementation 
import com.ibm.connections.spi.events.EventHandler 
public class MyEventHandler implements EventHandler { 
public void init() throws EventHandlerInitException {} 
public void destroy() {} 
public void handleEvent(Event event) throws EventHandlerException { 
String eventName = event.getName(); // event name 
Person actor = event.getActor(); // person that triggered event 
// look at the event name 
if (event.getName().equals("profiles.person.photo.updated")) { 
// a profile photo was updated 
this.doEventProfilesPhotoUpdated(event); 
} else if (event.getName().equals("profiles.updated")) { 
// a profile was updated 
this.doEventProfilesUpdated(event); 
} 
} 
}
Event Handlers – summary 
• Make event handlers asynchroneous 
• What happens if your event handler fail? 
• What happens if the recipient of the event 
(3rd party API) fail? 
• Be defensive – consider what happens if 
events are lost
Thank you 
• Presentations on slideshare.net – this one is 
coming 
• Contact me – often times more than willing to 
help – I’ll let you know when it’s a project  
Mikkel Flindt Heisterberg 
Twitter: @lekkim 
E-mail: mfh@intravision.dk 
http://lekkimworld.com 
http://slideshare.net/lekkim

Más contenido relacionado

La actualidad más candente

Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)
Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)
Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)
PacSecJP
 
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Aaron Parecki
 
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the CloudSharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
Danny Jessee
 

La actualidad más candente (20)

7 Deadly Sins in Azure AD App Development
7 Deadly Sins in Azure AD App Development7 Deadly Sins in Azure AD App Development
7 Deadly Sins in Azure AD App Development
 
How to add your own OpenSocial Gadgets to IBM Connections
How to add your own OpenSocial Gadgets to IBM ConnectionsHow to add your own OpenSocial Gadgets to IBM Connections
How to add your own OpenSocial Gadgets to IBM Connections
 
Social Login
Social LoginSocial Login
Social Login
 
DEV-1467 - Darwino
DEV-1467 - DarwinoDEV-1467 - Darwino
DEV-1467 - Darwino
 
IBM Connect 2014 - AD204: What's new in the IBM Domino Objects: By Example
IBM Connect 2014 - AD204: What's new in the IBM Domino Objects: By ExampleIBM Connect 2014 - AD204: What's new in the IBM Domino Objects: By Example
IBM Connect 2014 - AD204: What's new in the IBM Domino Objects: By Example
 
O365con14 - a developer jam with yammer
O365con14 - a developer jam with yammerO365con14 - a developer jam with yammer
O365con14 - a developer jam with yammer
 
Introduction to OAuth 2.0 - Part 2
Introduction to OAuth 2.0 - Part 2Introduction to OAuth 2.0 - Part 2
Introduction to OAuth 2.0 - Part 2
 
Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)
Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)
Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)
 
- Webexpo 2010
- Webexpo 2010- Webexpo 2010
- Webexpo 2010
 
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the CloudSharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
 
Introduction to OAuth 2.0 - Part 1
Introduction to OAuth 2.0  - Part 1Introduction to OAuth 2.0  - Part 1
Introduction to OAuth 2.0 - Part 1
 
End to End Security with MVC and Web API
End to End Security with MVC and Web APIEnd to End Security with MVC and Web API
End to End Security with MVC and Web API
 
Introduction to OAuth 2.0 - Part 1
Introduction to OAuth 2.0 - Part 1Introduction to OAuth 2.0 - Part 1
Introduction to OAuth 2.0 - Part 1
 
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
 
Claims-Based Identity, Facebook, and the Cloud
Claims-Based Identity, Facebook, and the CloudClaims-Based Identity, Facebook, and the Cloud
Claims-Based Identity, Facebook, and the Cloud
 
Domino/Notes 9.0 upgrade to take advantage of NFL, WFL and CORS technologies
Domino/Notes 9.0 upgrade to take advantage of NFL, WFL and CORS technologiesDomino/Notes 9.0 upgrade to take advantage of NFL, WFL and CORS technologies
Domino/Notes 9.0 upgrade to take advantage of NFL, WFL and CORS technologies
 
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the CloudSharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
 
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the CloudSharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
 
Claims-Based Identity in SharePoint 2010
Claims-Based Identity in SharePoint 2010Claims-Based Identity in SharePoint 2010
Claims-Based Identity in SharePoint 2010
 
HTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applicationsHTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applications
 

Similar a There’s an API for that! Why and how to build on the IBM Connections PLATFORM

Entwickler camp2012 how to connect your app to the activity stream with x_pages
Entwickler camp2012 how to connect your app to the activity stream with x_pagesEntwickler camp2012 how to connect your app to the activity stream with x_pages
Entwickler camp2012 how to connect your app to the activity stream with x_pages
Frank van der Linden
 
Suguk activity feed
Suguk activity feedSuguk activity feed
Suguk activity feed
Wes Hackett
 
In Act Developers Platform
In Act Developers PlatformIn Act Developers Platform
In Act Developers Platform
Eris Ristemena
 

Similar a There’s an API for that! Why and how to build on the IBM Connections PLATFORM (20)

An Introduction to Working With the Activity Stream
An Introduction to Working With the Activity StreamAn Introduction to Working With the Activity Stream
An Introduction to Working With the Activity Stream
 
Mikkel Heisterberg - An introduction to developing for the Activity Stream
Mikkel Heisterberg - An introduction to developing for the Activity StreamMikkel Heisterberg - An introduction to developing for the Activity Stream
Mikkel Heisterberg - An introduction to developing for the Activity Stream
 
IBM Connections How to use existing data to increase adoption success with IB...
IBM Connections How to use existing data to increase adoption success with IB...IBM Connections How to use existing data to increase adoption success with IB...
IBM Connections How to use existing data to increase adoption success with IB...
 
How to increase social adoption - meetIT 2016, Milano
How to increase social adoption - meetIT 2016, MilanoHow to increase social adoption - meetIT 2016, Milano
How to increase social adoption - meetIT 2016, Milano
 
IBM Connections REST API Klompendans
IBM Connections REST API KlompendansIBM Connections REST API Klompendans
IBM Connections REST API Klompendans
 
1309 leveraging social business data visualizing the connections org structure
1309  leveraging social business data visualizing the connections org structure1309  leveraging social business data visualizing the connections org structure
1309 leveraging social business data visualizing the connections org structure
 
Prototyping applications with heroku and elasticsearch
 Prototyping applications with heroku and elasticsearch Prototyping applications with heroku and elasticsearch
Prototyping applications with heroku and elasticsearch
 
IBM Connections Activity Stream 3rd Party Integration - Social Connect VI - P...
IBM Connections Activity Stream 3rd Party Integration - Social Connect VI - P...IBM Connections Activity Stream 3rd Party Integration - Social Connect VI - P...
IBM Connections Activity Stream 3rd Party Integration - Social Connect VI - P...
 
Entwickler camp2012 how to connect your app to the activity stream with x_pages
Entwickler camp2012 how to connect your app to the activity stream with x_pagesEntwickler camp2012 how to connect your app to the activity stream with x_pages
Entwickler camp2012 how to connect your app to the activity stream with x_pages
 
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
 
Microsoft Graph community call-October 2018
Microsoft Graph community call-October 2018Microsoft Graph community call-October 2018
Microsoft Graph community call-October 2018
 
Mesh-ing around with Streams across the Enterprise | Phil Scanlon, Solace
Mesh-ing around with Streams across the Enterprise | Phil Scanlon, SolaceMesh-ing around with Streams across the Enterprise | Phil Scanlon, Solace
Mesh-ing around with Streams across the Enterprise | Phil Scanlon, Solace
 
Microsoft flow how, when &amp; why
Microsoft flow   how, when &amp; whyMicrosoft flow   how, when &amp; why
Microsoft flow how, when &amp; why
 
Android Trainning Session 2
Android Trainning  Session 2Android Trainning  Session 2
Android Trainning Session 2
 
Webdistilled API
Webdistilled APIWebdistilled API
Webdistilled API
 
Shindig in 2 hours
Shindig in 2 hoursShindig in 2 hours
Shindig in 2 hours
 
Suguk activity feed
Suguk activity feedSuguk activity feed
Suguk activity feed
 
Data/Applications Visualization and Mashup
Data/Applications Visualization and MashupData/Applications Visualization and Mashup
Data/Applications Visualization and Mashup
 
Client Building Functional webapps.
Client   Building Functional webapps.Client   Building Functional webapps.
Client Building Functional webapps.
 
In Act Developers Platform
In Act Developers PlatformIn Act Developers Platform
In Act Developers Platform
 

Más de Mikkel Flindt Heisterberg

BP309 Project Management Inside and Outside the Box
BP309 Project Management Inside and Outside the BoxBP309 Project Management Inside and Outside the Box
BP309 Project Management Inside and Outside the Box
Mikkel Flindt Heisterberg
 

Más de Mikkel Flindt Heisterberg (12)

An Introduction to Lightning Web Components
An Introduction to Lightning Web ComponentsAn Introduction to Lightning Web Components
An Introduction to Lightning Web Components
 
IBM Connections 5 Gæstemodel
IBM Connections 5 GæstemodelIBM Connections 5 Gæstemodel
IBM Connections 5 Gæstemodel
 
BP309 Project Management Inside and Outside the Box
BP309 Project Management Inside and Outside the BoxBP309 Project Management Inside and Outside the Box
BP309 Project Management Inside and Outside the Box
 
Creating a keystore for plugin signing the easy way
Creating a keystore for plugin signing the easy wayCreating a keystore for plugin signing the easy way
Creating a keystore for plugin signing the easy way
 
BP207 - Easy as pie creating widgets for ibm connections
BP207 - Easy as pie   creating widgets for ibm connectionsBP207 - Easy as pie   creating widgets for ibm connections
BP207 - Easy as pie creating widgets for ibm connections
 
OnTime Partner Webinar September 2011
OnTime Partner Webinar September 2011OnTime Partner Webinar September 2011
OnTime Partner Webinar September 2011
 
Plug yourself in and your app will never be the same (2 hr editon)
Plug yourself in and your app will never be the same (2 hr editon)Plug yourself in and your app will never be the same (2 hr editon)
Plug yourself in and your app will never be the same (2 hr editon)
 
Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)
 
Lotusphere Comes To You 2011
Lotusphere Comes To You 2011Lotusphere Comes To You 2011
Lotusphere Comes To You 2011
 
Lotus Community Call - 22 March 2011
Lotus Community Call - 22 March 2011Lotus Community Call - 22 March 2011
Lotus Community Call - 22 March 2011
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)
 
Lotus Notes Plugin Installation For Dummies
Lotus Notes Plugin Installation For DummiesLotus Notes Plugin Installation For Dummies
Lotus Notes Plugin Installation For Dummies
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 

There’s an API for that! Why and how to build on the IBM Connections PLATFORM

  • 1. There’s an API for that! Why and how to build on the IBM Connections PLATFORM Mikkel Flindt Heisterberg Senior Solution Architect and Partner OnTime® by IntraVision
  • 2.
  • 3. Agenda • Brief intro to –IBM Connections as a PLATFORM –iWidgets for IBM Connections –Developing for the Activity Stream –SPI’s and Event handlers Mikkel Flindt Heisterberg Twitter: @lekkim E-mail: mfh@intravision.dk http://lekkimworld.com http://slideshare.net/lekkim
  • 6. Widgets – descriptor <iw:iwidget id="com.example.ExampleWidget" supportedModes="view fullpage” mode="view” lang="en" xmlns:iw="http://www.ibm.com/xmlns/prod/iWidget" iScope="com.example.ExampleWidget"> <iw:resource uri="http://www.example.com/ExampleWidget.js" /> <iw:resource uri="http://www.example.com/ExampleWidget.css" /> <iw:content mode="view"> <![CDATA[ <div id="_IWID_widgetContent">Loading...</div> ]]> </iw:content> <iw:content mode="fullpage"> <![CDATA[ <div id="_IWID_widgetContent">Loading...</div> ]]> </iw:content> </iw:iwidget>
  • 7. Widgets – iScope dojo.provide("com.example.ExampleWidget"); dojo.declare("com.example.ExampleWidget", null, { constructor: function() {}, onLoad: function() {}, onView: function() {}, onEdit: function() {}, onFullpage: function() {}, onSearch: function() {} });
  • 8. Widgets – declaration Declaratively configured using widgets-config.xml <widgetDef defId="com.example.ExampleWidget” url="/ExampleWidget.xml" loginRequired="true” showInPallette=”true” primaryWidget=”false”> <itemSet> <item name="resourceId" value="{resourceId}" /> <item name="profilesCtx" value="{profilesSvcRef}" /> <item name="myProp" value="Abc123" /> </itemSet> </widgetDef>
  • 9. Widgets – iContext • An iContext instance is set into the iScope instance • The iContext provides access to the widget markup (e.g. root element), I/O related functions (i.e. URL rewriting), widget attributes etc. • The iContext is easily accessed from the iScope class using this.iContext • Important functions include: – iContext.getRootElement() : DOM Element – iContext.getElementById(id:string) : DOM Element – iContext.getiWidgetAttributes() : ItemSet – iContext.getUserProfile() : ItemSet – iContext.io.rewriteURI(uri:string) : string – iContext.iEvents.fireEvent(name:string, type:string, payload:object)
  • 10. Loading prior to IBM Connections 5
  • 11. Loading from IBM Connections 5
  • 12. Loading from IBM Connections 5 http://www.youtube.com/ watch?v=1GLpA604Iic
  • 13. Activity Stream • The following is based on my highly acclaimed (cough, cough) presentation on the Activity Stream • Much more detail and many examples there • See http://slideshare.net/lekkim Mikkel Flindt Heisterberg Twitter: @lekkim E-mail: mfh@intravision.dk http://lekkimworld.com http://slideshare.net/lekkim
  • 14. Activity Stream • IS – River of news – it’s like water flowing by you – Notifications about ”stuff” happening in (other) systems – we refer to these notifications as entries • ISN’T – A new inbox – doesn’t replace email – A perpeptual data store – entries are deleted based on a server defined purge interval (default is 30 days) unless saved or actionable
  • 15. Activity Stream • In my opinion it makes most sense to not consider the activity stream as one single stream • Instead think that – Each user has his/her own (@me) – There is a public stream (@public) – A community may have a stream if the widget has been added by a community owner – if there’s no stream for a community posting to it will return a ”403 Forbidden”
  • 16. Activity Stream • You will mainly use the POST and PUT methods to send JSON data (Content-Type: application/json) to the API • JSON is super simple key/value data format. It has simple datatypes (strings, numbers, booleans), objects and arrays { ”email”: ”mh@intravision.dk”, ”niceGuy”: true, ”age”: 37, ”name”: { ”first”: ”Mikkel Flindt”, ”last”: ” Heisterberg” }, ”Connectospheres”: [6, 7, 8, 9, 10, 11, 12, 13, 14, 15] }
  • 17. Activity Stream { "actor": {"id": "@me"}, "verb": "post", "title": "Some entry title", "updated": "2013-05-17T12:00:00.000Z", "object": { "title": "Some object title", "objectType": "note", "id": "1234567890-1234567890-1234567890" } }
  • 18. Activity Stream https://<host>/connections/opensocial/<auth>/rest/activitystreams /<user ID>/<group ID>/<application ID>/<activity ID> Component Meaning <auth> (optional) If using form based authentication leave this component out. Otherwise options are anonymos, basic, oauth. <user ID> The user whose stream you’re addressing – use @me for current users stream, @public for public stream or a community ID for the stream in a community. <group ID> The group of entries you’re addressing – use @all for all posts or options for special meaning such as @saved, @actions, @mentions. Refer for InfoCenter and resources slide for more. <application ID> When retrieving entries this refers to the application (or ”generator”) that created the entry. All the IBM Connections app names can be used (profiles, blogs, wikis etc.) plus custom ones (e.g. ontimegc). @all used for all applications. <activity ID> Used to reference a specific event e.g. for updating saved status.
  • 19. Activity Stream 1. /activitystreams/@me/@all List my (current users) entries 2. /activitystreams/@public/@all List public stream entries 3. /activitystreams/@me/@actions List my actionable events 4. /activitystreams/@me/@saved/blogs List my saved events from blogs 5. /@me/@all/@all/urn:lsid:lconn.ibm.com:activitystreams.story:bdb562f… Work with entry from my stream based on ID * All URLs above start with https://<host>/connections/opensocial/<auth>/rest Also used when creating new entries (e.g. POSTing)
  • 20. Other Programming Interfaces • SPIs are lower-level programming interfaces which may be subject to modification from release to release. • Event SPI – The IBM Connections Event SPI allows third parties to consume event data generated by IBM Connections. • Seedlist SPI – Use the Seedlist service provider interface (SPI) provided with IBM Connections to integrate your search engine with IBM Connections content. • Service SPI – You can use the IBM Connections Service SPI to learn about the applications running in your IBM Connections deployment. • User SPI – You can use the IBM Connections User SPIs to access information about the users in your IBM Connections deployment.
  • 21. Event Handlers – declaration Declaratively configured using events-config.xml <postHandler enabled=”true" invoke="ASYNC" name=”MyEventHandler” class="com.example.MyEventHandler"> <subscriptions> <subscription source="*" type="*" eventName="*"/> <!-- <subscription source=”PROFILES" type="*" eventName=”profiles.updated"/> <subscription source=”PROFILES" type="*" eventName=”profiles.person.photo.updated"/> --> </subscriptions> </postHandler>
  • 22. Event Handlers – implementation import com.ibm.connections.spi.events.EventHandler public class MyEventHandler implements EventHandler { public void init() throws EventHandlerInitException {} public void destroy() {} public void handleEvent(Event event) throws EventHandlerException { String eventName = event.getName(); // event name Person actor = event.getActor(); // person that triggered event // look at the event name if (event.getName().equals("profiles.person.photo.updated")) { // a profile photo was updated this.doEventProfilesPhotoUpdated(event); } else if (event.getName().equals("profiles.updated")) { // a profile was updated this.doEventProfilesUpdated(event); } } }
  • 23. Event Handlers – summary • Make event handlers asynchroneous • What happens if your event handler fail? • What happens if the recipient of the event (3rd party API) fail? • Be defensive – consider what happens if events are lost
  • 24. Thank you • Presentations on slideshare.net – this one is coming • Contact me – often times more than willing to help – I’ll let you know when it’s a project  Mikkel Flindt Heisterberg Twitter: @lekkim E-mail: mfh@intravision.dk http://lekkimworld.com http://slideshare.net/lekkim