SlideShare a Scribd company logo
1 of 27
IBM Connections REST-API
Klompendans
Henning Schmidt
hedersoft GmbH
@schmhen
1#engageug
About.me
• Co-Founder and CEO of hedersoft
• CNX and Graph API Junkie
• System Architect
• Web Developer
• Speaker @ different events
twitter: schmhen – linkedin: de.linkedin.com/in/schmhen - blog: schmhen.de
About.hedersoft
Agenda
• Different APIs
• Example 1: Activity Stream
• Example 2: Embedded Experience
• Example 3: Forum Entry as Question
• Example 4: Wiki Entry
• Example 5: Blog Entry with Embedded Image
• Example 6: File Upload to Community
• Example 7: Email to Activity
• What to expect and get with Connections Pink
• API Real Life Usage
Different APIs
• REST APIs
• Service Provider Interfaces (SPIs)
• Event SPI – Hook into events to work with the event data
• Seedlist SPI – Integrate IBM Connections‘ into your search engine
• Service SPI – Learn about the different services provided by CNX
• User SPI – Obtain information about your IBM CNX Users
• The lc.spi.jar file contains the Server and User SPIs and is stored in
the EAR file in the root installation directory of the following
5#engageug
Example 1: Activity Stream
URL:
https://<host>/connect
ions/opensocial/<auth>
/rest/activitystreams/<
user ID>/<group ID>
Compoment Meaning
<auth> (optional) omit on form based authentication, otherwise use:
anonymos, basic, oauth.
<user ID> UserID to post to, @me = current User, alternatively:
CommunityUNID, ProfileID
IMPERSONATION!
<group ID> Group to post to
@self = my posts, @friends = friends posts, @all = all posts, ... .
Only @self supported at the moment, more in the infocenter!
Example 1: Activity Stream
{
"actor": {
"id": "@me"
},
"verb": "post",
"title": “Presenting the REST-API Klompendans",
"content": "This event is my <b>first entry</b>",
"object": {
"summary": "First Entry details",
"objectType": "note",
"id": "objectid",
"displayName": "First entry“
}
}
[entry.title]
[entry.content]
[entry.object.summary]
Henning Schmidt posted [entry.object.displayame]
[entry.content]
[entry.object.summary]
DEMO
8#engageug
Example 2: Embedded Experience
Example 2: Embedded Experience
{
"actor": {"id": "@me"},
"verb": "post",
"content": "This event is my <b>Embedded Experience!</b>",
"object": {
"summary": "Have a look at hedersoft:",
...
},
"openSocial": {
"embed": {
"gadget":
"https://apps.na.collabserv.com/connections/resources/web/com.ibm.social.ee.cloud/cloudee.xml",
"context": {
"url":"https://www.hedersoft.de",
"height": "400"
}
}
}}
DEMO
11#engageug
Example 3: Forum Entry as Question
URL
https://<host>/forums/atom/topics?forumUuid=xyz
Query Params
forumUuid – The Uuid of the forum to post to
atom+xml (as the rest of the APIs) 
Example 3: Forum Entry as Question
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<title type="text">I have a question</title>
<content type="html">Do you think SS Rotterdam is an awesome
venue?</content>
<category scheme="http://www.ibm.com/xmlns/prod/sn/type"
term="forum-topic"></category>
<category scheme="http://www.ibm.com/xmlns/prod/sn/flags"
term="question"/>
<category term="question"></category>
<category term=“rotterdam"></category>
<category term="2017"></category>
</entry>
DEMO
14#engageug
Example 4: Wiki Entry
URL
https://<host>/wikis/basic/api/wiki/<wiki-
label>/feed
CDATA HTML content
<content type="text/html"><![CDATA[<?xml version="1.0"
encoding="UTF-8"?><!DOCTYPE html [<!ENTITY amp
"&#38;#38;"><!ENTITY lt "&#60;#60;"><!ENTITY gt
"&#62;#62;"><!ENTITY nbsp "&#160;"><!ENTITY apos
"&#39;"><!ENTITY quot "&#34;">]> <div></div>]]></content>
Attention: Wiki’s do have a very narrow HTML interpretation,
my favorite source of problems
Example 4: Wiki Entry
Impersonation API
• Allows to act on behalf of someone else
• Special admin rights needed!
• OnPrem: Websphere config
(trustedExternalApplication)
• Cloud: Mail to IBM, request API activation
Header
X-LConn-RunAs: userid=2368723457
DEMO
17#engageug
Example 5: Blog Entry with Embedded Image
URL
https://<host>/blogs/<blog-id>/api/entries
• Up to 5.0 – Base 64 encoded Image
• Since 5.5 – Upload Image and Link
• Escape HTML content in payload
DEMO
19#engageug
Example 6: File Upload to Community
URL
https://<host>/files/basic/api/communitylibrary/<communi
ty-id>/feed
To add to folder first upload file and then move
https://<host>/files/basic/api/library/<folder-
id>/document/<file-id>/entry
Get nonce first
https://<host>/files/basic/api/nonce
Headers
Content-Type, Content-Length, Slug, X-Update-Nonce
DEMO
21#engageug
Example 7: Email to Activity
URL
https://<host>/activities/service/atom2/activity?acti
vityUuid=xyz
Query Parameter
activityUuid – Id of the activity to add item to
• Escape Content (<div> -> &lt;div&gt;)
• Do not forget namespaces!
DEMO
23#engageug
What to expect and get with Connections Pink
API Real Life Usage
• Source
• Notes Database (3GB)
• 34 categories, 2906 documents
• 25 categories migrated and 5 synchronized
• Destination
• 30 different communities
• Formatting of RichText, Definition of Tags
• Embedded Images
• -> IBM Connections Wiki and Files
POWERED BY
Lessons learned
• Different applications = Non-unique APIs
• Impersonation: X-LConn-RunAs
• Different payloads and pitfalls in different applications
• Standalone App or Community App makes no difference, except
for URL
• Embedded Images as Files (CNX 5.5+)
• Use Postman to test the APIs
• Connections Pink: Coexistence of APIs
THANK YOU!

More Related Content

What's hot

The Pink road – Dorothy’s journey through an all pink wonderland
The Pink road – Dorothy’s journey through an all pink wonderlandThe Pink road – Dorothy’s journey through an all pink wonderland
The Pink road – Dorothy’s journey through an all pink wonderlandLetsConnect
 
Christian Brothers Services Journey from On Premises Lotus Collaboration to C...
Christian Brothers Services Journey from On Premises Lotus Collaboration to C...Christian Brothers Services Journey from On Premises Lotus Collaboration to C...
Christian Brothers Services Journey from On Premises Lotus Collaboration to C...LetsConnect
 
HyperLedger Lightning-Talk BjoernSimon
HyperLedger Lightning-Talk BjoernSimonHyperLedger Lightning-Talk BjoernSimon
HyperLedger Lightning-Talk BjoernSimonBjoernSimon
 
HyperLedger LightningTalk BjoernSimon
HyperLedger LightningTalk BjoernSimonHyperLedger LightningTalk BjoernSimon
HyperLedger LightningTalk BjoernSimonBjoernSimon
 
Avoiding Zombies in Archival Replay Using ServiceWorker
Avoiding Zombies in Archival Replay Using ServiceWorkerAvoiding Zombies in Archival Replay Using ServiceWorker
Avoiding Zombies in Archival Replay Using ServiceWorkerSawood Alam
 
Andrew Hoppin, CIO, NY State Senate
Andrew Hoppin, CIO, NY State SenateAndrew Hoppin, CIO, NY State Senate
Andrew Hoppin, CIO, NY State SenateAcquia
 
Building an Event-driven Web @ Impact
Building an Event-driven Web @ ImpactBuilding an Event-driven Web @ Impact
Building an Event-driven Web @ ImpactJeff Lindsay
 
Drupal Open Source Everything
Drupal Open Source EverythingDrupal Open Source Everything
Drupal Open Source Everythinglibrarywebchic
 
Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...
Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...
Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...data://disrupted®
 

What's hot (10)

The Pink road – Dorothy’s journey through an all pink wonderland
The Pink road – Dorothy’s journey through an all pink wonderlandThe Pink road – Dorothy’s journey through an all pink wonderland
The Pink road – Dorothy’s journey through an all pink wonderland
 
Christian Brothers Services Journey from On Premises Lotus Collaboration to C...
Christian Brothers Services Journey from On Premises Lotus Collaboration to C...Christian Brothers Services Journey from On Premises Lotus Collaboration to C...
Christian Brothers Services Journey from On Premises Lotus Collaboration to C...
 
HyperLedger Lightning-Talk BjoernSimon
HyperLedger Lightning-Talk BjoernSimonHyperLedger Lightning-Talk BjoernSimon
HyperLedger Lightning-Talk BjoernSimon
 
HyperLedger LightningTalk BjoernSimon
HyperLedger LightningTalk BjoernSimonHyperLedger LightningTalk BjoernSimon
HyperLedger LightningTalk BjoernSimon
 
Avoiding Zombies in Archival Replay Using ServiceWorker
Avoiding Zombies in Archival Replay Using ServiceWorkerAvoiding Zombies in Archival Replay Using ServiceWorker
Avoiding Zombies in Archival Replay Using ServiceWorker
 
Andrew Hoppin, CIO, NY State Senate
Andrew Hoppin, CIO, NY State SenateAndrew Hoppin, CIO, NY State Senate
Andrew Hoppin, CIO, NY State Senate
 
Building an Event-driven Web @ Impact
Building an Event-driven Web @ ImpactBuilding an Event-driven Web @ Impact
Building an Event-driven Web @ Impact
 
Drupal Open Source Everything
Drupal Open Source EverythingDrupal Open Source Everything
Drupal Open Source Everything
 
Edge
EdgeEdge
Edge
 
Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...
Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...
Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...
 

Similar to IBM Connections REST API for Posting, Embedding and File Uploads

There’s an API for that! Why and how to build on the IBM Connections PLATFORM
There’s an API for that! Why and how to build on the IBM Connections PLATFORMThere’s an API for that! Why and how to build on the IBM Connections PLATFORM
There’s an API for that! Why and how to build on the IBM Connections PLATFORMMikkel Flindt Heisterberg
 
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 StreamMikkel Flindt Heisterberg
 
IBM Connections Activity Stream APIs - Lab Dec 2012
IBM Connections Activity Stream APIs - Lab Dec 2012IBM Connections Activity Stream APIs - Lab Dec 2012
IBM Connections Activity Stream APIs - Lab Dec 2012Vincent Burckhardt
 
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 StreamLetsConnect
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformAntonio Peric-Mazar
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformAntonio Peric-Mazar
 
2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar Slides2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar SlidesDuraSpace
 
4.Building a Data Product using apache Zeppelin - Apache Kylin Meetup @Shanghai
4.Building a Data Product using apache Zeppelin - Apache Kylin Meetup @Shanghai4.Building a Data Product using apache Zeppelin - Apache Kylin Meetup @Shanghai
4.Building a Data Product using apache Zeppelin - Apache Kylin Meetup @ShanghaiLuke Han
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Tom Johnson
 
Microservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell MonsterMicroservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell MonsterC4Media
 
Kasten securing access to your kubernetes applications
Kasten securing access to your kubernetes applicationsKasten securing access to your kubernetes applications
Kasten securing access to your kubernetes applicationsLibbySchulze
 
API-Driven Relationships: Building The Trans-Internet Express of the Future
API-Driven Relationships: Building The Trans-Internet Express of the FutureAPI-Driven Relationships: Building The Trans-Internet Express of the Future
API-Driven Relationships: Building The Trans-Internet Express of the FuturePat Patterson
 
Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...
Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...
Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...Autodesk
 
API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015Tom Johnson
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsTom Johnson
 
apidays LIVE Paris - Exploring an API with Blocks by Larry Kluger
apidays LIVE Paris - Exploring an API with Blocks by Larry Klugerapidays LIVE Paris - Exploring an API with Blocks by Larry Kluger
apidays LIVE Paris - Exploring an API with Blocks by Larry Klugerapidays
 
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...wesley chun
 
apidays LIVE LONDON - Exploring an API with Blocks by Larry Kluger
apidays LIVE LONDON - Exploring an API with Blocks by Larry Klugerapidays LIVE LONDON - Exploring an API with Blocks by Larry Kluger
apidays LIVE LONDON - Exploring an API with Blocks by Larry Klugerapidays
 
Federated sharing with the Open Cloud Mesh API
Federated sharing with the Open Cloud Mesh APIFederated sharing with the Open Cloud Mesh API
Federated sharing with the Open Cloud Mesh APIDimitri van Hees
 

Similar to IBM Connections REST API for Posting, Embedding and File Uploads (20)

There’s an API for that! Why and how to build on the IBM Connections PLATFORM
There’s an API for that! Why and how to build on the IBM Connections PLATFORMThere’s an API for that! Why and how to build on the IBM Connections PLATFORM
There’s an API for that! Why and how to build on the IBM Connections PLATFORM
 
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
 
IBM Connections Activity Stream APIs - Lab Dec 2012
IBM Connections Activity Stream APIs - Lab Dec 2012IBM Connections Activity Stream APIs - Lab Dec 2012
IBM Connections Activity Stream APIs - Lab Dec 2012
 
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
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar Slides2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar Slides
 
4.Building a Data Product using apache Zeppelin - Apache Kylin Meetup @Shanghai
4.Building a Data Product using apache Zeppelin - Apache Kylin Meetup @Shanghai4.Building a Data Product using apache Zeppelin - Apache Kylin Meetup @Shanghai
4.Building a Data Product using apache Zeppelin - Apache Kylin Meetup @Shanghai
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
 
Microservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell MonsterMicroservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell Monster
 
Kasten securing access to your kubernetes applications
Kasten securing access to your kubernetes applicationsKasten securing access to your kubernetes applications
Kasten securing access to your kubernetes applications
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
API-Driven Relationships: Building The Trans-Internet Express of the Future
API-Driven Relationships: Building The Trans-Internet Express of the FutureAPI-Driven Relationships: Building The Trans-Internet Express of the Future
API-Driven Relationships: Building The Trans-Internet Express of the Future
 
Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...
Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...
Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...
 
API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIs
 
apidays LIVE Paris - Exploring an API with Blocks by Larry Kluger
apidays LIVE Paris - Exploring an API with Blocks by Larry Klugerapidays LIVE Paris - Exploring an API with Blocks by Larry Kluger
apidays LIVE Paris - Exploring an API with Blocks by Larry Kluger
 
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
 
apidays LIVE LONDON - Exploring an API with Blocks by Larry Kluger
apidays LIVE LONDON - Exploring an API with Blocks by Larry Klugerapidays LIVE LONDON - Exploring an API with Blocks by Larry Kluger
apidays LIVE LONDON - Exploring an API with Blocks by Larry Kluger
 
Federated sharing with the Open Cloud Mesh API
Federated sharing with the Open Cloud Mesh APIFederated sharing with the Open Cloud Mesh API
Federated sharing with the Open Cloud Mesh API
 

Recently uploaded

办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一F La
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degreeyuu sss
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAbdelrhman abooda
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfBoston Institute of Analytics
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...limedy534
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home ServiceSapana Sha
 
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一F La
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhijennyeacort
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Cantervoginip
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024thyngster
 

Recently uploaded (20)

办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service
 
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
 
Call Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort ServiceCall Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort Service
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Canter
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
 

IBM Connections REST API for Posting, Embedding and File Uploads

  • 1. IBM Connections REST-API Klompendans Henning Schmidt hedersoft GmbH @schmhen 1#engageug
  • 2. About.me • Co-Founder and CEO of hedersoft • CNX and Graph API Junkie • System Architect • Web Developer • Speaker @ different events twitter: schmhen – linkedin: de.linkedin.com/in/schmhen - blog: schmhen.de
  • 4. Agenda • Different APIs • Example 1: Activity Stream • Example 2: Embedded Experience • Example 3: Forum Entry as Question • Example 4: Wiki Entry • Example 5: Blog Entry with Embedded Image • Example 6: File Upload to Community • Example 7: Email to Activity • What to expect and get with Connections Pink • API Real Life Usage
  • 5. Different APIs • REST APIs • Service Provider Interfaces (SPIs) • Event SPI – Hook into events to work with the event data • Seedlist SPI – Integrate IBM Connections‘ into your search engine • Service SPI – Learn about the different services provided by CNX • User SPI – Obtain information about your IBM CNX Users • The lc.spi.jar file contains the Server and User SPIs and is stored in the EAR file in the root installation directory of the following 5#engageug
  • 6. Example 1: Activity Stream URL: https://<host>/connect ions/opensocial/<auth> /rest/activitystreams/< user ID>/<group ID> Compoment Meaning <auth> (optional) omit on form based authentication, otherwise use: anonymos, basic, oauth. <user ID> UserID to post to, @me = current User, alternatively: CommunityUNID, ProfileID IMPERSONATION! <group ID> Group to post to @self = my posts, @friends = friends posts, @all = all posts, ... . Only @self supported at the moment, more in the infocenter!
  • 7. Example 1: Activity Stream { "actor": { "id": "@me" }, "verb": "post", "title": “Presenting the REST-API Klompendans", "content": "This event is my <b>first entry</b>", "object": { "summary": "First Entry details", "objectType": "note", "id": "objectid", "displayName": "First entry“ } } [entry.title] [entry.content] [entry.object.summary] Henning Schmidt posted [entry.object.displayame] [entry.content] [entry.object.summary]
  • 9. Example 2: Embedded Experience
  • 10. Example 2: Embedded Experience { "actor": {"id": "@me"}, "verb": "post", "content": "This event is my <b>Embedded Experience!</b>", "object": { "summary": "Have a look at hedersoft:", ... }, "openSocial": { "embed": { "gadget": "https://apps.na.collabserv.com/connections/resources/web/com.ibm.social.ee.cloud/cloudee.xml", "context": { "url":"https://www.hedersoft.de", "height": "400" } } }}
  • 12. Example 3: Forum Entry as Question URL https://<host>/forums/atom/topics?forumUuid=xyz Query Params forumUuid – The Uuid of the forum to post to atom+xml (as the rest of the APIs) 
  • 13. Example 3: Forum Entry as Question <?xml version="1.0" encoding="UTF-8"?> <entry xmlns="http://www.w3.org/2005/Atom"> <title type="text">I have a question</title> <content type="html">Do you think SS Rotterdam is an awesome venue?</content> <category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="forum-topic"></category> <category scheme="http://www.ibm.com/xmlns/prod/sn/flags" term="question"/> <category term="question"></category> <category term=“rotterdam"></category> <category term="2017"></category> </entry>
  • 15. Example 4: Wiki Entry URL https://<host>/wikis/basic/api/wiki/<wiki- label>/feed CDATA HTML content <content type="text/html"><![CDATA[<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html [<!ENTITY amp "&#38;#38;"><!ENTITY lt "&#60;#60;"><!ENTITY gt "&#62;#62;"><!ENTITY nbsp "&#160;"><!ENTITY apos "&#39;"><!ENTITY quot "&#34;">]> <div></div>]]></content> Attention: Wiki’s do have a very narrow HTML interpretation, my favorite source of problems
  • 16. Example 4: Wiki Entry Impersonation API • Allows to act on behalf of someone else • Special admin rights needed! • OnPrem: Websphere config (trustedExternalApplication) • Cloud: Mail to IBM, request API activation Header X-LConn-RunAs: userid=2368723457
  • 18. Example 5: Blog Entry with Embedded Image URL https://<host>/blogs/<blog-id>/api/entries • Up to 5.0 – Base 64 encoded Image • Since 5.5 – Upload Image and Link • Escape HTML content in payload
  • 20. Example 6: File Upload to Community URL https://<host>/files/basic/api/communitylibrary/<communi ty-id>/feed To add to folder first upload file and then move https://<host>/files/basic/api/library/<folder- id>/document/<file-id>/entry Get nonce first https://<host>/files/basic/api/nonce Headers Content-Type, Content-Length, Slug, X-Update-Nonce
  • 22. Example 7: Email to Activity URL https://<host>/activities/service/atom2/activity?acti vityUuid=xyz Query Parameter activityUuid – Id of the activity to add item to • Escape Content (<div> -> &lt;div&gt;) • Do not forget namespaces!
  • 24. What to expect and get with Connections Pink
  • 25. API Real Life Usage • Source • Notes Database (3GB) • 34 categories, 2906 documents • 25 categories migrated and 5 synchronized • Destination • 30 different communities • Formatting of RichText, Definition of Tags • Embedded Images • -> IBM Connections Wiki and Files POWERED BY
  • 26. Lessons learned • Different applications = Non-unique APIs • Impersonation: X-LConn-RunAs • Different payloads and pitfalls in different applications • Standalone App or Community App makes no difference, except for URL • Embedded Images as Files (CNX 5.5+) • Use Postman to test the APIs • Connections Pink: Coexistence of APIs