atlassian-api / atlassian-python-api

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

confluence.get_space_permissions(space_key) gives 404 #1371

Open tallandtree opened 2 months ago

tallandtree commented 2 months ago

Dear maintainers,

The python function confluence.get_space_permissions(space_key) seems broken. We get a 404 HTTPError:

raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://mysite.atlassian.net/wiki/rpc/json-rpc/confluenceservice-v2

If we do the same via REST API call, the call works correctly. Could it be that the JSON-RPC calls no longer work, as Atlassian says it is deprecated: https://developer.atlassian.com/server/confluence/confluence-json-rpc-apis/:

The JSON-RPC API is deprecated since Confluence 5.5. Confluence has a new REST API that is progressively replacing our existing APIs. We recommend plugin developers use the new REST APIs where possible.

Kind regards, M. Tallandtree.

gkowalc commented 2 months ago

Thanks for reporting it. I looked into the code and it looks like we have more methods based on deprecaated json-rpc api which should be refactored to currently supported endpoints. methods that require refreshing: confluence: add_user confluence: change_user_password confluence: change_my_password confluence: remove_space_permission confluence: get_space_permissions