Skip to content

[Confluence] ConfluenceCloud: get_page_by_id(get_body=False) no longer sends body-format=none - #1719

Open
star7js wants to merge 1 commit into
atlassian-api:masterfrom
star7js:fix/confluence-page-by-id-no-body
Open

star7js wants to merge 1 commit into
atlassian-api:masterfrom
star7js:fix/confluence-page-by-id-no-body

Conversation

@star7js

@star7js star7js commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Fixes #1718

ConfluenceCloud.get_page_by_id(page_id, get_body=False) sent body-format=none. none isn't one of the values GET /api/v2/pages/{id} accepts (storage, atlas_doc_format, view, export_view, anonymous_export_view, styled_view, editor), so Confluence answered 400.

This drops body-format when get_body=False, so the page comes back without a body. get_body=False still wins when body_format is also passed, as it did before.

Tests

  • test_get_page_by_id_without_body now expects no body-format param.
  • Added test_get_page_by_id_without_body_ignores_body_format for get_body=False together with body_format="storage".
  • Both fail without the change. All Confluence tests (tests/test_confluence_v2*.py, tests/confluence) pass, and flake8 is clean on the changed files.

…r sends body-format=none

"none" is not a valid body-format for GET /api/v2/pages/{id}, so Confluence
answered 400. Leave body-format out instead, which returns the page without a
body. get_body=False still takes precedence over body_format.

Fixes atlassian-api#1718
@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.48%. Comparing base (ac90e5d) to head (8a47351).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1719   +/-   ##
=======================================
  Coverage   65.48%   65.48%           
=======================================
  Files         107      107           
  Lines       19436    19436           
  Branches     2129     2129           
=======================================
  Hits        12728    12728           
  Misses       6001     6001           
  Partials      707      707           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

confluence.cloud.get_page_by_id returns error if get_body = False

1 participant