-
Bug
-
Resolution: Fixed
-
High
-
None
-
Severity 3 - Minor
Issue Summary
The Confluence serch endpoint /wiki/rest/api/search?cql= doesn't work well in case we add a limitation in the search - the top results will be 250.
Steps to Reproduce
- Create around 1000 of pages on a space (you can use the below script)
#!/bin/bash UIDPAS='EMAIL_ADDRESS:API_TOKEN' space='SPACEKEY' site='https://SITENAME.atlassian.net/wiki' totalpage=1000 for ((i=1;i<=$totalpage;i++)); do echo $i curl -u $UIDPAS -X POST -H 'Content-Type: application/json' -d '{"type":"page","title":"Test API page '$i'","space":{"key":"'$space'"},"body":{"storage":{"value":"<p>This is a page created from an API call, later this page will be queried out via the TEST API.</p>","representation":"storage"}}}' $site/rest/api/content done
- Once all the pages are created, run this endpoint on the browser: https://SITENAME.atlassian.net/wiki/rest/api/search?cql=title~page?&limit=1000&start=0
Expected Results
With no pagination, it should return all the 1000 pages we just created (as well as other pages with "page" on their title.
Actual Results
It only shows 250 results, even the totalSize field showing the total amount of results.
Notes
- Let's say you then try to get &limit=1000&start=250, it still won't show the expected number of results in the page.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available
[AI-440] Confluence Search API doesn't work well limiting results
Component/s | Original: Search - Scaling [ 61411 ] | |
Component/s | Original: Search - Core [ 46383 ] | |
Component/s | Original: Ecosystem - API Framework [ 46317 ] | |
Component/s | New: Search - Core [ 75296 ] | |
Component/s | New: Search - Core [ 75296 ] | |
Component/s | New: Admin Experience [ 74216 ] | |
Key |
Original:
|
New:
|
QA Demo Status | Original: Not Done [ 14330 ] | |
QA Kickoff Status | Original: Not Done [ 14234 ] | |
Support reference count | Original: 1 | |
Project | Original: Confluence Cloud [ 18513 ] | New: Atlassian Intelligence [ 23110 ] |
Component/s | New: Ecosystem - API Framework [ 46317 ] | |
Component/s | New: Search - Core [ 46383 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Short Term Backlog [ 12074 ] | New: Closed [ 6 ] |
Due Date | New: 08/Sep/2020 |
Priority | Original: Low [ 4 ] | New: High [ 2 ] |
Status | Original: Needs Triage [ 10030 ] | New: Short Term Backlog [ 12074 ] |
Component/s | Original: Core - APIs [ 46317 ] |
Assignee | New: David Rizzuto [ drizzuto ] |
Hello. The reason you might be seeing some issues is because we have deprecated the start param in the API here: https://developer.atlassian.com/cloud/confluence/change-notice-moderize-search-rest-apis/ Please switch over the new method of pagination as mentioned in the notice. Also, you should see a max of 250 results with each request. Please do not rely on the max count because the API does not enforce a specific max number of results returned. This is subject to change even in the future.