From 9a879f566d45fa1c181e15d4bd5bd239635f47e4 Mon Sep 17 00:00:00 2001 From: Christian Gick Date: Thu, 26 Feb 2026 11:08:29 +0200 Subject: [PATCH] fix: Use Confluence v2 API for page reads The v1 /wiki/rest/api/content/{id} endpoint returns 410 Gone. Switch to /wiki/api/v2/pages/{id} with body-format=storage parameter. Co-Authored-By: Claude Opus 4.6 --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 9da629c..edc3048 100644 --- a/bot.py +++ b/bot.py @@ -458,8 +458,8 @@ class AtlassianClient: try: async with httpx.AsyncClient(timeout=15.0) as client: resp = await client.get( - f"https://api.atlassian.com/ex/confluence/{cloud_id}/wiki/rest/api/content/{page_id}", - params={"expand": "body.storage,version"}, + f"https://api.atlassian.com/ex/confluence/{cloud_id}/wiki/api/v2/pages/{page_id}", + params={"body-format": "storage"}, headers={"Authorization": f"Bearer {token}"}, ) resp.raise_for_status()