Repository navigation
[Confluence] ConfluenceV2: send the body representation in create_page/update_page - #1698
Merged
gonchik merged 1 commit intoOct 20, 2026
Conversation
…e/update_page
create_page() and update_page() sent the page body as
{"storage": {"value": "..."}} and only added "representation" when the
caller passed it, while the comment and custom content methods always
send it. atlassian-api#1683 reports a 500 with no error detail from both calls on
Confluence Cloud.
The representation now defaults to body_format, so the body goes out as
{"storage": {"value": "...", "representation": "storage"}}.
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.
ConfluenceV2.create_page()andupdate_page()send the page body asrepresentationis only added when the caller passesrepresentation=, which in practice only happens for wiki. The v2 API documents the body as{"<format>": {"value": ..., "representation": ...}}, and the other V2 write methods in the same class (footer/inline comments, custom content) always send it.This defaults
representationtobody_format, so the request becomes{"storage": {"value": "World", "representation": "storage"}}. An explicitrepresentation=still wins and the wiki check is unchanged.Refs #1683: this is the other half of that issue (the warning was handled in #1697). The 500 with
"detail": nullreported there fits the missing field, but I couldn't try it against a Cloud site, so I've left the issue open rather than claiming it's fixed.Updated the four
create_page/update_pagepayload assertions intests/test_confluence_v2.pyand added one foratlas_doc_format(they fail on master). The full pytest suite, mypy, bandit and doc8 pass; flake8 and black only report the two files underexamples/that already fail on master.