Repository navigation
[Confluence] ConfluenceCloud: fix get_content_children and get_content_descendants - #1712
Merged
gonchik merged 1 commit intoOct 30, 2026
Conversation
…t_descendants
Cloud.get_content_children and get_content_descendants request
/wiki/rest/api/content/{id}/children and /descendants, but the v1
content API names these endpoints in the singular (/child and
/descendant), so both calls fail with a 404.
Use the singular paths, the same ones the Server client and the Cloud
get_child_pages and get_descendant_pages already use.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ConfluenceCloud.get_content_children(content_id)andget_content_descendants(content_id)(and the same methods onConfluence(url="https://<site>.atlassian.net")) send:The Confluence Cloud v1 REST API doesn't have plural endpoints. Descendants are at
/content/{id}/descendant(see the children and descendants reference and the v1 OpenAPI spec), and children were at/content/{id}/child(getContentChildrenin the spec)./childrenand/descendantsaren't in any version of the spec, so both calls always fail with a 404.This switches both methods to the singular paths:
get_content_children->GET /wiki/rest/api/content/{id}/childget_content_descendants->GET /wiki/rest/api/content/{id}/descendantThese are the paths the Server client's
get_content_children()/get_content_descendants()use, and the same ones the Cloudget_child_pages()(/child/page),get_page_child_by_type()(/child/{type}) andget_descendant_pages()(/descendant/page) already build on. Arguments and return values are unchanged.Note:
GET /content/{id}/childwas deprecated in CHANGE-864 and is no longer listed in the current v1 reference (/descendantis still there, also marked deprecated). The singular path is still the one that matches the API and the rest of the client.Tests: updated
test_get_content_childrenandtest_get_content_descendantsintests/confluence/test_confluence_cloud.py(they asserted the plural paths) and added a parametrized test that checks the final URLs arehttps://test.atlassian.net/wiki/rest/api/content/123/childand.../123/descendant. The four tests fail on master. The full pytest suite,tox -e mypy, bandit and doc8 pass, and black and flake8 are clean on the changed files. I haven't run it against a real Confluence Cloud site.