Confluence REST API content pagination: limit parameter clamped or rejected above default 25
0 reputation · 19 Apr 2024, 10:04 UTC
I am working with the Confluence REST API endpoint GET /rest/api/content, which paginates results using the start and limit parameters. The documented default page size is 25, and I understand the maximum can be tuned via the confluence.rest.results.max system property in confluence.cfg.xml.
What I cannot pin down is the exact behavior when a request specifies a limit above the configured maximum. Some references suggest the API returns a 400 error, while others indicate the value is silently clamped to the maximum, and the behavior appears to differ across Confluence versions. This matters for client code that must decide whether to retry with a smaller limit or treat the response as an error.
There is also a secondary concern: in a clustered (Data Center) deployment, pagination over large result sets may return duplicate or missing entries if the index is out of sync between nodes, and I am unsure how to detect that condition reliably.
Assuming a recent Confluence Data Center version:
- For a given version, does exceeding
confluence.rest.results.maxproduce a 400 response or silent clamping, and where is this documented? - After changing the property and restarting, which response fields (e.g.,
size,limit,_links.next) confirm the new maximum is in effect? - Is there a supported way to detect duplicate pages caused by index lag during pagination in a cluster?