Calling a Wiki Page from the Product UI
Asked by Lavanya K:

I'd like to enable context-sensitivity by calling the documentation wiki pages from the product interface. Please tell me how we can acheive this. If there are API, point me to the APIs. Thanks much in advance.


Answers:
author: Lavanya K
body: I just learned that a simple search query is all i need to do this. For example, we just to pass the following URL from the UI and pass the appropriate labelText:

[](http://wiki.abc.com/dosearchsite.action?queryString=labelText%3AGetting_started&startIndex=0&where=AAND707FALL2013)[http://wiki.abc.com/dosearchsite.action?queryString=labelText%3AGetting_started\&startIndex=0\&where=AAND707FALL2013](http://wiki.abc.com/dosearchsite.action?queryString=labelText%253AGetting_started&startIndex=0&where=AAND707FALL2013)

I'm still happy with this community and appreciate Steve for his responses:).


author: Steve Gerstner [bridgingIT]
body: Ok, next try thanks to more informations ;)

Asumig, you don't have puplic access to your wiki:

You can use the soap or rest apis to get the content of the pages you wanna embed. BUT, you don't get them as html. You need to convert from the confluence-storage format to html. You might get problems with a lot of macros. This will force you to use only a couple of macros ond use them not too much.

[](https://developer.atlassian.com/display/CONFDEV/Confluence+XML-RPC+and+SOAP+APIs)<https://developer.atlassian.com/display/CONFDEV/Confluence+XML-RPC+and+SOAP+APIs>

<https://developer.atlassian.com/display/CONFDEV/Confluence+REST+APIs+-+Prototype+Only>

Alternativly you can use the html export in confluence to export a space in html, maybe that's an option, but only if your pages don't change to often.

<https://confluence.atlassian.com/display/DOC/Exporting+Confluence+Pages+and+Spaces+to+HTML>

Second option, if your confluence is accesible from the internet, then you can grant anonymous access and link directly in your confluence. That might be the easiest way.

comments: author: Lavanya K
body: Thanks again, Steve. I think we are very close to the solution now. Can you please expand on the second option and let me know how to "Call" a specific confluence page from the product interface? For example, the product interface would pass the labels and the Wiki Space to be searched, and will open the wiki site and display all the topics/pages that match the given labels. I found the following API in the Rest API documentation.

"/search?query\&type\&search\&startIndex\&pageSize\&max-results\&spaceKey\&attachmentType\&label\&groupResults\&searchParentName\&preferredSpaceKey"

The REST API documentation is here: [](https://docs.atlassian.com/atlassian-confluence/REST/latest/)<https://docs.atlassian.com/atlassian-confluence/REST/latest/>

<br />

Will that help?


author: Lavanya K
body: Thank you so much for your immediate response, Steve. May be i wasn't clear in my original email. Let me give some background:

- Our product documentation is hosted on Confluence wiki

- Our product has a web interface that's not in the public domain

- When the user clicks the "Help" link from the UI, we'd like to launch a related topic(s) from the confluence wiki site

So, i'd like to know how we can make the calls from the product to the wiki.


author: Steve Gerstner [bridgingIT]
body: You can write a plugin with so called web item modules. With them, you can extend the menus in confluence and point e.g. to the documentation of confluence.

You need to read these pages:

[](https://developer.atlassian.com/display/CONFDEV/Writing+Confluence+Plugins)<https://developer.atlassian.com/display/CONFDEV/Writing+Confluence+Plugins>

and maybe there is something similar in these tutorials:

[](https://developer.atlassian.com/display/CONFDEV/Tutorials)<https://developer.atlassian.com/display/CONFDEV/Tutorials>

If that's to tekkie, and you only need it in pages and blogs in the view mode, you need to work with simple links.


Tags: context