atlassian-python-api
atlassian-python-api copied to clipboard
Failure updating page with update_page in Confluence
Oddly I am sometimes able to use update_page to update an existing page in Confluence, but 9 times out of 10 I get the non-descript and unhelpful atlassian.errors.ApiValueError: No space or no content type, or setup a wrong version type set to content, or status param is not draft and status content is current
Looking at these lines a couple issues stand out: https://github.com/atlassian-api/atlassian-python-api/blob/c9b4bb0156983fdff1b9b87bc5376784cb400766/atlassian/confluence.py#L42-L46
- The
ifstatement and error message do not match (in fact the few times the API has worked for me I used the'editor'representation - The Atlassian API documentation suggests the returned object's key should be
storage, notrepresentation: https://docs.atlassian.com/ConfluenceServer/rest/7.12.0/#api/content-update