The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Is /gateway/api/xpsearch-aggregator/search/v2/advanced available for REST consumption?

Kyle Fox
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 1, 2021

Hello,

We have noticed that searches performed via the Confluence UI provide more accurate results than those performed using the search REST API.  I took a look at what the Confluence UI is doing when performing search, and found the following API being used:

POST https://x.atlassian.net/gateway/api/xpsearch-aggregator/search/v2/advanced

{
"pagination": {
"limit": 25
},
"query": "health",

"filters": [
{
"@type": "labels",
"labels": [
"condoc"
]
}
],
"cloudId": "removed",
"scope": "confluence.page"
}


The results for this call are significantly more accurate than if we attempt the same search via the documented search API:

GET https://x.atlassian.net/wiki/rest/api/content/search?cql=type=page and label=condoc and text~"health"

Is the /gateway/api/xpsearch-aggregator/search/v2/advanced API okay to consume via REST, or is the interface subject to change without notice?  Alternately, is there a way to get the /wiki/rest/api/content/search to perform like the former?

Thanks!

-Kyle

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Matt Lemons
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 14, 2022

Were you able to figure out how to return the proper results using the search REST API? 

Using the Confluence UI, I can return the results that I want, but using the same search terms via the REST API doesn't.

Kyle Fox
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 15, 2022

Unfortunately not.

We've since moved over to retaining our own index using Algolia.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events