Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,328,541
Community Members
 
Community Events
168
Community Groups

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

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

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.

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
Community showcase
Published in Confluence

Work and wellness: Confluence Space Cleanup Play 🧹

Confluence Space Cleanup Play Complete our new Play with your team to declutter your shared workspace and power knowledge-sharing and collaboration. Download the PDF version of Play i...

1,065 views 7 25
Read article

Atlassian Community Events