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

Kyle Fox 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

0 votes
Matt Lemons 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 July 15, 2022

Unfortunately not.

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events