Skip to content

[Confluence] ConfluenceV2: send the body representation in create_page/update_page - #1698

Merged
gonchik merged 1 commit into
atlassian-api:masterfrom
LuisFigueroaG:fix/confluence-v2-page-body-representation
Oct 20, 2026
Merged

gonchik merged 1 commit into
atlassian-api:masterfrom
LuisFigueroaG:fix/confluence-v2-page-body-representation

Conversation

@LuisFigueroaG

Copy link
Copy Markdown
Contributor

ConfluenceV2.create_page() and update_page() send the page body as

{"storage": {"value": "World"}}

representation is only added when the caller passes representation=, 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 representation to body_format, so the request becomes {"storage": {"value": "World", "representation": "storage"}}. An explicit representation= 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": null reported 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_page payload assertions in tests/test_confluence_v2.py and added one for atlas_doc_format (they fail on master). The full pytest suite, mypy, bandit and doc8 pass; flake8 and black only report the two files under examples/ that already fail on master.

…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"}}.
@gonchik
gonchik merged commit f99e52f into atlassian-api:master Oct 20, 2026
4 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants