-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Permissions - Content (Page, Database, Whiteboard)
-
None
-
1
-
Severity 3 - Minor
Issue Summary
GET /wiki/api/v2/pages returns HTTP 500 when pagination reaches a page whose parent hierarchy contains a circular relationship.
During permission resolution, Confluence traverses the page ancestor chain and If the hierarchy contains a cycle such as:
Page A → Page B → Page A
the function raises CYCLE DETECTED, which currently propagates as HTTP 500 for the entire paginated response.
Steps to Reproduce
- Have a Confluence Cloud site containing a circular page-parent relationship.
- Call: GET /wiki/api/v2/pages
- Paginate through the results until a page associated with the cyclic ancestor hierarchy is reached.
- Observe that the request returns HTTP 500.
- Retry the same cursor with limit=1.
- The request continues to fail, confirming that the issue is associated with the specific content record rather than page size or request volume.
Expected Results
A malformed page hierarchy should not cause the entire paginated result to fail.
The API should ideally:
- Skip or safely handle the affected record.
- Log a clear message for the error
- Return the affected content ID
- Detect cyclic page hierarchies earlier
Actual Results
A single malformed page hierarchy causes the complete /api/v2/pages request to fail with:
{{
{ "status": 500, "code": "INTERNAL_SERVER_ERROR", "detail": null }}}
This can block Marketplace apps, migration tools, backups, and other integrations that enumerate pages.
Workaround
Break the circular parent relationship by moving one of the affected pages to a valid parent or the space root.