I'm trying to create a script that creates/updates pages on Confluence Cloud and I have the following code:
from atlassian import ConfluenceV2
from dotenv import dotenv_values
confluence = ConfluenceV2(
url=dotenv_values('.env')['CLOUD_URL'],
username=dotenv_values('.env')['EMAIL'],
password=dotenv_values('.env')['API_TOKEN']
)
try:
page_id = confluence.get_page_id("PSL", "System Validation Test Reports")
space_id = confluence.get_page_space(page_id)["spaceId"]
page = confluence.create_page(space_id=space_id, title="Hello", body="World")
except Exception as e:
print(f"Error: {e.response.content}")
But when I run it, it keeps:
- Returning "Deprecation warning" error message even though I explicitly used ConfluenceV2
- Getting response 500
DeprecationWarning: V1 methods are deprecated in ConfluenceCloud. Use V2 methods instead.
confluence = ConfluenceV2(
Error: b'{"errors":[{"status":500,"code":"INTERNAL_SERVER_ERROR","title":"Internal Server Error","detail":null}]}'
I'm able to get the page_id and space_id with no issues, but I'm getting HTTP response 500 also when I use confluence.update_page()
I'm trying to create a script that creates/updates pages on Confluence Cloud and I have the following code:
But when I run it, it keeps:
I'm able to get the page_id and space_id with no issues, but I'm getting HTTP response 500 also when I use confluence.update_page()