atlassian-python-api 5.0.1__py3-none-any.whl → 5.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- atlassian/VERSION +1 -1
- atlassian/__init__.py +13 -2
- atlassian/assets.py +10 -3
- atlassian/bamboo.py +178 -2
- atlassian/bitbucket/__init__.py +87 -1
- atlassian/bitbucket/base.py +9 -2
- atlassian/bitbucket/server/__init__.py +11 -0
- atlassian/cloud_admin.py +418 -0
- atlassian/confluence/__init__.py +9 -0
- atlassian/confluence/base.py +32 -10
- atlassian/confluence/cloud/__init__.py +19 -0
- atlassian/confluence/cloud/classification_levels.py +77 -0
- atlassian/confluence/cloud/cloud.py +43 -5
- atlassian/confluence/cloud/content_properties.py +71 -0
- atlassian/confluence/cloud/graphql.py +99 -0
- atlassian/confluence/server/__init__.py +274 -74
- atlassian/crowd.py +78 -0
- atlassian/jira/__init__.py +21 -0
- atlassian/jira/core_methods.py +11698 -0
- atlassian/jira/jira_cloud.py +160 -0
- atlassian/{jira.py → jira/jira_server.py} +333 -6
- atlassian/jira/service_management_methods.py +1381 -0
- atlassian/jira/software_methods.py +2114 -0
- atlassian/rest_client.py +26 -1
- atlassian/service_desk.py +10 -3
- atlassian/yogi/__init__.py +17 -0
- atlassian/yogi/base.py +11 -0
- atlassian/yogi/cloud.py +2367 -0
- atlassian/yogi/yogi_confluence_cloud.py +10 -0
- atlassian/yogi/yogi_confluence_dc.py +94 -0
- atlassian/yogi/yogi_jira_cloud.py +10 -0
- atlassian/yogi/yogi_jira_dc.py +64 -0
- {atlassian_python_api-5.0.1.dist-info → atlassian_python_api-5.0.2.dist-info}/METADATA +80 -10
- {atlassian_python_api-5.0.1.dist-info → atlassian_python_api-5.0.2.dist-info}/RECORD +37 -22
- {atlassian_python_api-5.0.1.dist-info → atlassian_python_api-5.0.2.dist-info}/WHEEL +0 -0
- {atlassian_python_api-5.0.1.dist-info → atlassian_python_api-5.0.2.dist-info}/licenses/LICENSE +0 -0
- {atlassian_python_api-5.0.1.dist-info → atlassian_python_api-5.0.2.dist-info}/top_level.txt +0 -0
atlassian/crowd.py
CHANGED
|
@@ -180,6 +180,84 @@ class Crowd(AtlassianRestAPI):
|
|
|
180
180
|
json=data,
|
|
181
181
|
)
|
|
182
182
|
|
|
183
|
+
def group_remove_user(self, username, groupname):
|
|
184
|
+
"""Remove a direct user-to-group membership."""
|
|
185
|
+
return self.delete(
|
|
186
|
+
self._crowd_api_url("usermanagement", "user/group/direct"),
|
|
187
|
+
params={"username": username, "groupname": groupname},
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
def user_update(self, username, data):
|
|
191
|
+
"""Update a user with a Crowd user representation."""
|
|
192
|
+
return self.put(self._crowd_api_url("usermanagement", "user"), params={"username": username}, data=data)
|
|
193
|
+
|
|
194
|
+
def user_update_password(self, username, password):
|
|
195
|
+
"""Update a user's password."""
|
|
196
|
+
return self.put(
|
|
197
|
+
self._crowd_api_url("usermanagement", "user/password"),
|
|
198
|
+
params={"username": username},
|
|
199
|
+
data={"value": password},
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
def user_attributes(self, username):
|
|
203
|
+
"""Return all attributes for a user."""
|
|
204
|
+
return self.get(self._crowd_api_url("usermanagement", "user/attribute"), params={"username": username})
|
|
205
|
+
|
|
206
|
+
def user_store_attributes(self, username, attributes):
|
|
207
|
+
"""Store user attributes using Crowd's attribute request body."""
|
|
208
|
+
return self.put(
|
|
209
|
+
self._crowd_api_url("usermanagement", "user/attribute"), params={"username": username}, data=attributes
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
def user_remove_attribute(self, username, attribute_name):
|
|
213
|
+
"""Delete one user attribute."""
|
|
214
|
+
return self.delete(
|
|
215
|
+
self._crowd_api_url("usermanagement", "user/attribute"),
|
|
216
|
+
params={"username": username, "attributename": attribute_name},
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
def group(self, groupname):
|
|
220
|
+
"""Return a group by name."""
|
|
221
|
+
return self.get(self._crowd_api_url("usermanagement", "group"), params={"groupname": groupname})
|
|
222
|
+
|
|
223
|
+
def group_update(self, groupname, data):
|
|
224
|
+
"""Update a group with a Crowd group representation."""
|
|
225
|
+
return self.put(self._crowd_api_url("usermanagement", "group"), params={"groupname": groupname}, data=data)
|
|
226
|
+
|
|
227
|
+
def group_delete(self, groupname):
|
|
228
|
+
"""Delete a group by name."""
|
|
229
|
+
return self.delete(self._crowd_api_url("usermanagement", "group"), params={"groupname": groupname})
|
|
230
|
+
|
|
231
|
+
def group_attributes(self, groupname):
|
|
232
|
+
"""Return all attributes for a group."""
|
|
233
|
+
return self.get(self._crowd_api_url("usermanagement", "group/attribute"), params={"groupname": groupname})
|
|
234
|
+
|
|
235
|
+
def group_store_attributes(self, groupname, attributes):
|
|
236
|
+
"""Store group attributes using Crowd's attribute request body."""
|
|
237
|
+
return self.put(
|
|
238
|
+
self._crowd_api_url("usermanagement", "group/attribute"), params={"groupname": groupname}, data=attributes
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
def group_remove_attribute(self, groupname, attribute_name):
|
|
242
|
+
"""Delete one group attribute."""
|
|
243
|
+
return self.delete(
|
|
244
|
+
self._crowd_api_url("usermanagement", "group/attribute"),
|
|
245
|
+
params={"groupname": groupname, "attributename": attribute_name},
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
def nested_group_members(self, groupname, max_results=99999):
|
|
249
|
+
"""Return users who are direct or nested members of a group."""
|
|
250
|
+
response = self.get(
|
|
251
|
+
self._crowd_api_url("usermanagement", "group/user/nested"),
|
|
252
|
+
params={"groupname": groupname, "max-results": max_results},
|
|
253
|
+
)
|
|
254
|
+
return search("users[*].name", response)
|
|
255
|
+
|
|
256
|
+
def nested_user_groups(self, username):
|
|
257
|
+
"""Return direct and nested groups for a user."""
|
|
258
|
+
response = self.get(self._crowd_api_url("usermanagement", "user/group/nested"), params={"username": username})
|
|
259
|
+
return search("groups[*].name", response)
|
|
260
|
+
|
|
183
261
|
def health_check(self):
|
|
184
262
|
"""
|
|
185
263
|
Get health status
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
"""Jira API clients split by deployment target.
|
|
3
|
+
|
|
4
|
+
``Jira`` remains the legacy-compatible Server/Data Center client. Use
|
|
5
|
+
``JiraCloud`` for Jira Cloud Core REST v2/v3.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from .jira_cloud import JiraCloud, JiraServiceManagement, JiraSoftware, create_jira_cloud
|
|
9
|
+
from .jira_server import Jira as JiraServer
|
|
10
|
+
|
|
11
|
+
# Preserve ``from atlassian.jira import Jira`` and ``from atlassian import Jira``.
|
|
12
|
+
Jira = JiraServer
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"Jira",
|
|
16
|
+
"JiraServer",
|
|
17
|
+
"JiraCloud",
|
|
18
|
+
"JiraSoftware",
|
|
19
|
+
"JiraServiceManagement",
|
|
20
|
+
"create_jira_cloud",
|
|
21
|
+
]
|