atlassian-api / atlassian-python-api

Atlassian Python REST API wrapper
https://atlassian-python-api.readthedocs.io
Apache License 2.0
1.36k stars 664 forks source link

confluence - not able to create page #1132

Open omerkarpas opened 1 year ago

omerkarpas commented 1 year ago

Hi, not sure if my issue is with auth part of auth is fine and just create is not working:

init seems to be fine as i am not error: Confluence(url='https://********.atlassian.net/wiki/home', token=self.token)

do I need to add anything except create an API token?

2023-03-12 16:10:53 | INFO | atlassian.confluence | Creating page "hi" -> "Shield_R8Z4nfEn" 2023-03-12 16:10:53 | DEBUG | atlassian.rest_client | curl --silent -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' --data '"{\"type\": \"page\", \"title\": \"Shield_R8Z4nfEn\", \"space\": {\"key\": \"hi\"}, \"body\": {\"storage\": {\"value\": \"Shield Page Body\", \"representation\": \"storage\"}}, \"metadata\": {\"properties\": {}}}"' 'https://pfptstg.atlassian.net/wiki/home/rest/api/content' 2023-03-12 16:10:55 | DEBUG | atlassian.rest_client | HTTP: POST rest/api/content/ -> 200 OK 2023-03-12 16:10:55 | DEBUG | atlassian.rest_client | HTTP: Response text -> <!doctype html>Log in with Atlassian account

2023-03-12 16:10:55 | DEBUG | atlassian.rest_client | Received response with no content

omerkarpas commented 1 year ago

APIs used in this repo are DEPRECATED: Both auth using user name and password:

And Confluence V1 APIs which are used in this repo: https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content/#api-wiki-rest-api-content-get

gonchik commented 1 year ago

I will update doc. @omerkarpas

Please keep in your mind, Atlassian provide Data-Center products and Cloud products. Suddenly APIs are not the same as expected.

omerkarpas commented 1 year ago

@gonchik I guess what you want to say is, old on-prem installations are not affected by the deprecation as they are not automatically updated. but this is of course true for Cloud or managed Confluence instances. please make sure you add a note that confluence cloud or managed instances will not work as V1 APIs used in the repo are deprecated!

gonchik commented 1 year ago

Will check in this weekend. Meanwhile could you share which methods did you use it?