How can I show the content of a Confluence page within an external application?

Ivar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2011

We are currently creating a new internal core system. The system will be used by many users. Authentication is managed by Crowd. We currently have 50 licenses for Confluence - they are mainly used by the SysDev department. I would like to avoid buying more licenses for Confluence at this time.

My scenario:

On any page in the core system, we'll have a 'Help' icon/url.

The intention is to link the 'Help' icon/url to specific content in Confluence explaining the business rules for the page, and why things work as they do (there are a lot of business rules, and since the organization is global we cannot assume that everybody knows everything :)) I would like for this to be a page that open up in the new system. Worst case I can have a new browser window that opens up and loads the Confluence page.

Question is:Is this possible without having 1 Confluence license per user?

Public space is not an option as the Confluence site is available from the web. I could ask my customer to add IP restrictions, but I would like to avoid that.

I've looked at 'Trusted applications'. Can this be used in this setting?

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Ivar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2011

I found the answer after a bit more searching (C# code)

  1. Enable remote API ( http://confluence.atlassian.com/display/DOC/Enabling+the+Remote+API )
  2. Add web reference in Visual Studio to your Confluence installation: http://<confluence-install>/rpc/soap-axis/confluenceservice-v1?wsdl</li<>>
  3. Write the following code (or more specific in regards to types - this was only to verify)
var soapService = new ConfluenceWebService.ConfluenceSoapServiceService();
var token = soapService.login("user", "pass");
var page = soapService.getPage(token.ToString(), 8454253);
//This will give you the page in HTML (\n and \t must be removed 'manually'):

string content = soapService.renderContent(token.ToString(), "eCrew2", 8454253, string.Empty);
content = content.Replace("\n", "");
content = content.Replace("\t", "");

Beware that ConfluenceWebService is the name of my local web reference from point 2.

8454253 is the ID of the page I want to show.

The entire SOAP API is documented here: http://confluence.atlassian.com/display/CONFDEV/Confluence+XML-RPC+and+SOAP+APIs

sorry to raise an old question. But I am trying to render a page that has a "code block" macro in it and renderContent doesn't render the result correctly and is giving me script instead. as shown below...

<script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[<filter>
<filter-name>login_nego</filter-name>
<filter-class>fi.polarshift.confluence.lib.kauth.NegotiateLoginFilter</filter-class>
</filter>]]></script>

have you had samiliar issue? how did you workaround that?

Thanks,

David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 19, 2013

@Asia Application Support Team Natixis: That's because your Confluence is using a Kerberos authenticator to login. It looks like the code macro uses client side JavaSCript to render the look & feel. It's assuming that your script is aware of the AD, but likely isn't.

Try changing the servlet filter - or similar for the authenicator so that it does not protect the JavaScript file for the code macro behind authentication. Or ask the Kerberos authenticator's vendor for help.

Hi David,

Thanks for the response. But I am not sure about "changing the servlet filter" as I am quite new to confluence/java. Could you please give a bit more hint about that?

Thanks,

0 votes
Matt Markus December 7, 2016

Ivar, I am trying to do the same thing. Do your users have to login to Confluence when they click your help links? My requirement is to provide help links to our wiki pages and have the user not be faced with a login page (otherwise they won't bother using the links). It should be seamless.

Decideware Admin February 7, 2017

Hi Matt, did you get this one solved?

0 votes
Ivar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 19, 2013

I cannot be of much assistance I'm afraid. My attempt was nearly a proof of concept - that it was possible. We ended up buing 500 user licenses for Confluence and link the different pages directly.

TAGS
AUG Leaders

Atlassian Community Events