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?
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!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.