Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Integrate Confluence to my Web Application?

Aravind Sankar January 31, 2019

I would like to integrate the confluence search directory into my web application so the users can directly search application related documents from the application itself.

 

Is there a way to integrate and view the confluence documents inside of my application itself with my application UI rather than an Iframe kind of design?

1 answer

1 vote
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 4, 2019

Hello there! Thanks for sharing with the Community Aravind.

You could try to interact with Confluence via REST API. You can send Confluence Query Language (CQL) strings to your instance via REST:

curl -u username:password -G "http://myhost:8090/rest/api/content/search" \
--data-urlencode "cql=text ~ \"My Search\"" \
| python -m json.tool

note: you need to escape " with \ when using python to send the cURL. This is why I used \"My Seearch\"

We do not have much information on what kind of application you are working on. However, you could use a variable as a payload to be inserted in the search string. The ~ operator is the CONTAINS one, used to search for strings.

For further information on the REST API and it's uses, you can check it here:

Advanced Searching Using CQL - Contains

Let us know your thoughts!

Aravind Sankar February 5, 2019

Thank you for the quick response.

 I am currently using 

https://myhost:8090/rest/quicknav/1/search?query=TEST&spaceKey=abcd

but using this i am able to restrict searching with only one space but my requirement is to search in 3 spaces and in the above URL i am not able to send a list of space keys.

 

Can you help me out on how to frame a similar kind of URL which i can hit on the browser and check using cql as i dont have python installed and i dont want to use curl.

Kindly send me a url using cql where i can search a particular string in 3 spaces.I checked and learnt that there is space.key in (abcd, lmn , xyz) in cql to search in 3 spaces but not getting a proper example where i can check the same.

Kindly send me the same url which i can copy paste on my browser where i can change my host and query and spacekey and get results on the browser itself.

 

 

Thanks in advance.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events