Skip to content

Commit b4082eb

Browse files
darrylleeDarryl Lee
andauthored
Setting api_version=cloud when Cloud=true (#532)
* Add method for add_space_permission (https://developer.atlassian.com/cloud/confluence/rest/api-group-experimental/#api-api-space-spacekey-permission-post). Needs some exception catching to deal with 400 errors, but it works! * Cleanup JSON * Removing id * Might be good to use that cloud property to set api_version * Documenting the cloud parameter Co-authored-by: Darryl Lee <[email protected]>
1 parent 2161198 commit b4082eb

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ Here's a short example of how to create a Confluence page:
3838
3939
print(status)
4040
41+
(Note that for Confluence Cloud, some API calls are different, so you'll
42+
want to add cloud=True to the Confluence() connection.)
43+
4144
And here's another example of how to get issues from Jira using JQL Query:
4245

4346
.. code-block:: python

atlassian/rest_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def __init__(self, url, username=None, password=None, timeout=60, api_root='rest
2828
and '/wiki' not in url \
2929
and self.__class__.__name__ in 'Confluence':
3030
url = self.url_joiner(url, '/wiki')
31+
if (cloud == True):
32+
api_version = 'cloud'
3133
self.url = url
3234
self.username = username
3335
self.password = password

0 commit comments

Comments
 (0)