atlassian-python-api 4.0.0__tar.gz → 4.0.2__tar.gz

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.
Files changed (199) hide show
  1. {atlassian_python_api-4.0.0/atlassian_python_api.egg-info → atlassian_python_api-4.0.2}/PKG-INFO +2 -1
  2. atlassian_python_api-4.0.2/atlassian/VERSION +1 -0
  3. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bamboo.py +6 -4
  4. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/__init__.py +7 -3
  5. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/repositories/repositoryVariables.py +2 -3
  6. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/confluence.py +264 -18
  7. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/jira.py +841 -588
  8. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/rest_client.py +406 -98
  9. atlassian_python_api-4.0.2/atlassian/typehints.py +7 -0
  10. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2/atlassian_python_api.egg-info}/PKG-INFO +2 -1
  11. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian_python_api.egg-info/SOURCES.txt +2 -0
  12. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian_python_api.egg-info/requires.txt +1 -0
  13. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/requirements.txt +2 -0
  14. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/setup.py +1 -1
  15. atlassian_python_api-4.0.2/tests/__pycache__/test_confluence_advanced_mode.cpython-39-pytest-8.3.4.pyc +0 -0
  16. atlassian_python_api-4.0.2/tests/responses/jira/rest/api/2/issue/REGEX-123/file.txt +0 -0
  17. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/test_confluence_advanced_mode.py +5 -1
  18. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tox.ini +1 -0
  19. atlassian_python_api-4.0.0/atlassian/VERSION +0 -1
  20. atlassian_python_api-4.0.0/tests/__pycache__/test_confluence_advanced_mode.cpython-39-pytest-8.3.4.pyc +0 -0
  21. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/LICENSE +0 -0
  22. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/MANIFEST.in +0 -0
  23. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/README.rst +0 -0
  24. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/__init__.py +0 -0
  25. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/base.py +0 -0
  26. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/__init__.py +0 -0
  27. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/base.py +0 -0
  28. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/common/__init__.py +0 -0
  29. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/common/builds.py +0 -0
  30. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/common/comments.py +0 -0
  31. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/common/users.py +0 -0
  32. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/repositories/__init__.py +0 -0
  33. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/repositories/branchRestrictions.py +0 -0
  34. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/repositories/commits.py +0 -0
  35. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/repositories/defaultReviewers.py +0 -0
  36. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/repositories/deploymentEnvironments.py +0 -0
  37. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/repositories/diffstat.py +0 -0
  38. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/repositories/groupPermissions.py +0 -0
  39. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/repositories/hooks.py +0 -0
  40. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/repositories/issues.py +0 -0
  41. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/repositories/pipelines.py +0 -0
  42. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/repositories/pullRequests.py +0 -0
  43. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/repositories/refs.py +0 -0
  44. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/workspaces/__init__.py +0 -0
  45. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/workspaces/members.py +0 -0
  46. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/workspaces/permissions.py +0 -0
  47. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/cloud/workspaces/projects.py +0 -0
  48. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/server/__init__.py +0 -0
  49. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/server/base.py +0 -0
  50. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/server/common/__init__.py +0 -0
  51. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/server/common/permissions.py +0 -0
  52. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/server/globalPermissions.py +0 -0
  53. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/server/projects/__init__.py +0 -0
  54. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/bitbucket/server/projects/repos/__init__.py +0 -0
  55. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/cloud_admin.py +0 -0
  56. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/crowd.py +0 -0
  57. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/errors.py +0 -0
  58. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/insight.py +0 -0
  59. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/marketplace.py +0 -0
  60. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/portfolio.py +0 -0
  61. /atlassian_python_api-4.0.0/tests/__init__.py → /atlassian_python_api-4.0.2/atlassian/py.typed +0 -0
  62. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/request_utils.py +0 -0
  63. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/service_desk.py +0 -0
  64. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/statuspage.py +0 -0
  65. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/utils.py +0 -0
  66. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian/xray.py +0 -0
  67. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian_python_api.egg-info/dependency_links.txt +0 -0
  68. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian_python_api.egg-info/not-zip-safe +0 -0
  69. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/atlassian_python_api.egg-info/top_level.txt +0 -0
  70. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/pyproject.toml +0 -0
  71. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/setup.cfg +0 -0
  72. /atlassian_python_api-4.0.0/tests/responses/jira/rest/api/2/issue/REGEX-123/file.txt → /atlassian_python_api-4.0.2/tests/__init__.py +0 -0
  73. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/__pycache__/__init__.cpython-39.pyc +0 -0
  74. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/__pycache__/mockup.cpython-39.pyc +0 -0
  75. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/__pycache__/test_base.cpython-39-pytest-8.3.4.pyc +0 -0
  76. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/__pycache__/test_bitbucket_cloud_oo.cpython-39-pytest-8.3.4.pyc +0 -0
  77. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/__pycache__/test_bitbucket_server.cpython-39-pytest-8.3.4.pyc +0 -0
  78. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/__pycache__/test_bitbucket_server_oo.cpython-39-pytest-8.3.4.pyc +0 -0
  79. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/__pycache__/test_confluence_attach.cpython-39-pytest-8.3.4.pyc +0 -0
  80. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/__pycache__/test_jira.cpython-39-pytest-8.3.4.pyc +0 -0
  81. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/__pycache__/test_servicedesk.cpython-39-pytest-8.3.4.pyc +0 -0
  82. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/mockup.py +0 -0
  83. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/GET +0 -0
  84. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/TestRepositoryCreated/POST +0 -0
  85. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/GET +0 -0
  86. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/17203842/DELETE +0 -0
  87. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/17203842/GET +0 -0
  88. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/17203842/PUT +0 -0
  89. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/GET +0 -0
  90. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/default-reviewers/DefaultReviewer1Uuid/DELETE +0 -0
  91. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/default-reviewers/DefaultReviewer1Uuid/GET +0 -0
  92. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/default-reviewers/GET +0 -0
  93. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/3/DELETE +0 -0
  94. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/3/GET +0 -0
  95. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/3/PUT +0 -0
  96. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/GET +0 -0
  97. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/POST +0 -0
  98. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/GET +0 -0
  99. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/POST +0 -0
  100. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/GET +0 -0
  101. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/GET +0 -0
  102. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/{PipelineStep1Uuid}/GET +0 -0
  103. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/{PipelineStep2Uuid}/GET +0 -0
  104. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/{PipelineStep2Uuid}/log/GET +0 -0
  105. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/stopPipeline/POST +0 -0
  106. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/GET +0 -0
  107. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/approve/DELETE +0 -0
  108. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/approve/POST +0 -0
  109. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/comments/GET +0 -0
  110. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/comments/POST +0 -0
  111. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/commits/GET +0 -0
  112. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/decline/POST +0 -0
  113. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/merge/POST +0 -0
  114. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/request-changes/DELETE +0 -0
  115. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/request-changes/POST +0 -0
  116. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/statuses/GET +0 -0
  117. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/123456/DELETE +0 -0
  118. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/123456/PUT +0 -0
  119. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/GET +0 -0
  120. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/POST +0 -0
  121. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/25/GET +0 -0
  122. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/GET +0 -0
  123. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/POST +0 -0
  124. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/workspaces/GET +0 -0
  125. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/workspaces/TestWorkspace1/GET +0 -0
  126. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/workspaces/TestWorkspace2/GET +0 -0
  127. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/cloud/2.0/workspaces/TestWorkspace3/GET +0 -0
  128. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/DELETE +0 -0
  129. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/GET +0 -0
  130. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/none/GET +0 -0
  131. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/DELETE +0 -0
  132. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/GET +0 -0
  133. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/none/GET +0 -0
  134. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/GET +0 -0
  135. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/GET +0 -0
  136. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/PUT +0 -0
  137. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/DELETE +0 -0
  138. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/GET +0 -0
  139. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/none/GET +0 -0
  140. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/DELETE +0 -0
  141. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/GET +0 -0
  142. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/none/GET +0 -0
  143. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/GET +0 -0
  144. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/GET +0 -0
  145. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/PUT +0 -0
  146. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/archive/GET +0 -0
  147. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/contributing/GET +0 -0
  148. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/default-branch/GET +0 -0
  149. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/default-branch/PUT +0 -0
  150. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/forks/GET +0 -0
  151. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/license/GET +0 -0
  152. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/DELETE +0 -0
  153. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/GET +0 -0
  154. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/none/GET +0 -0
  155. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/DELETE +0 -0
  156. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/GET +0 -0
  157. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/none/GET +0 -0
  158. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/readme/GET +0 -0
  159. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/related/GET +0 -0
  160. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/3/DELETE +0 -0
  161. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/3/GET +0 -0
  162. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/3/PUT +0 -0
  163. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/GET +0 -0
  164. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/POST +0 -0
  165. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/jira/rest/agile/1.0/epic/BAR-22/issue/GET +0 -0
  166. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/jira/rest/agile/1.0/epic/none/issue/GET +0 -0
  167. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/jira/rest/api/2/comment/list/POST +0 -0
  168. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/jira/rest/api/2/issue/FOO-123/GET +0 -0
  169. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/jira/rest/api/2/issue/FOO-123/comment/10000/GET +0 -0
  170. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/jira/rest/api/2/issue/FOO-123/comment/GET +0 -0
  171. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar1/DELETE +0 -0
  172. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar1/GET +0 -0
  173. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar1/PUT +0 -0
  174. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar2New/PUT +0 -0
  175. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/GET +0 -0
  176. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/jira/rest/api/2/issue/FOO-123/remotelink/POST +0 -0
  177. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/jira/rest/api/2/issue/POST +0 -0
  178. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/servicedesk/rest/servicedeskapi/customer/POST +0 -0
  179. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/servicedesk/rest/servicedeskapi/organization/GET +0 -0
  180. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/servicedesk/rest/servicedeskapi/organization/POST +0 -0
  181. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/DELETE +0 -0
  182. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/GET +0 -0
  183. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/property/GET +0 -0
  184. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/user/DELETE +0 -0
  185. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/user/GET +0 -0
  186. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/user/POST +0 -0
  187. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer/DELETE +0 -0
  188. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer/GET +0 -0
  189. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer/POST +0 -0
  190. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/organization/DELETE +0 -0
  191. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/organization/GET +0 -0
  192. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/organization/POST +0 -0
  193. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/test_base.py +0 -0
  194. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/test_bitbucket_cloud_oo.py +0 -0
  195. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/test_bitbucket_server.py +0 -0
  196. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/test_bitbucket_server_oo.py +0 -0
  197. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/test_confluence_attach.py +0 -0
  198. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/test_jira.py +0 -0
  199. {atlassian_python_api-4.0.0 → atlassian_python_api-4.0.2}/tests/test_servicedesk.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atlassian-python-api
3
- Version: 4.0.0
3
+ Version: 4.0.2
4
4
  Summary: Python Atlassian REST API Wrapper
5
5
  Home-page: https://github.com/atlassian-api/atlassian-python-api
6
6
  Download-URL: https://github.com/atlassian-api/atlassian-python-api
@@ -46,6 +46,7 @@ Requires-Dist: oauthlib
46
46
  Requires-Dist: requests_oauthlib
47
47
  Requires-Dist: jmespath
48
48
  Requires-Dist: beautifulsoup4
49
+ Requires-Dist: typing-extensions
49
50
  Provides-Extra: kerberos
50
51
  Requires-Dist: requests-kerberos; extra == "kerberos"
51
52
  Dynamic: author
@@ -0,0 +1 @@
1
+ 4.0.2
@@ -746,11 +746,13 @@ class Bamboo(AtlassianRestAPI):
746
746
  return self.delete(self.resource_url(resource))
747
747
 
748
748
  @property
749
- def get_projects(self):
749
+ def get_projects(self, start=0, limit=25):
750
750
  """Method used to list all projects defined in Bamboo.
751
- Projects without any plan are not listed."""
752
- start_idx = 0
753
- max_results = 25
751
+ Projects without any plan are not listed.
752
+ :return: GET request
753
+ """
754
+ start_idx = start
755
+ max_results = limit
754
756
 
755
757
  while True:
756
758
  resource = f"project?start-index={start_idx}&max-result={max_results}"
@@ -1,13 +1,15 @@
1
1
  # coding=utf-8
2
2
  import logging
3
3
  from enum import Enum
4
+ from typing import Optional
4
5
 
5
6
  from deprecated import deprecated
6
7
  from requests import HTTPError
7
8
 
8
- from .base import BitbucketBase
9
9
  from atlassian.bitbucket.cloud import Cloud
10
10
 
11
+ from .base import BitbucketBase
12
+
11
13
  log = logging.getLogger(__name__)
12
14
 
13
15
 
@@ -1891,7 +1893,7 @@ class Bitbucket(BitbucketBase):
1891
1893
 
1892
1894
  def assign_pull_request_participant_role(
1893
1895
  self, project_key: str, repository_slug: str, pull_request_id: int, role: str, user: str
1894
- ) -> dict:
1896
+ ) -> Optional[dict]:
1895
1897
  """
1896
1898
  Assign a role to a user for a pull request
1897
1899
  :param project_key: The project key
@@ -2117,7 +2119,9 @@ class Bitbucket(BitbucketBase):
2117
2119
  data = {"text": text, "severity": severity}
2118
2120
  return self.post(url, data=data)
2119
2121
 
2120
- def search_pull_request_blocker_comment(self, project_key: str, repository_slug: str, pull_request_id: int) -> dict:
2122
+ def search_pull_request_blocker_comment(
2123
+ self, project_key: str, repository_slug: str, pull_request_id: int
2124
+ ) -> Optional[dict]:
2121
2125
  """
2122
2126
  Get all comments that block the merge of a pull request
2123
2127
  :param project_key: The project key
@@ -1,5 +1,4 @@
1
1
  # coding=utf-8
2
-
3
2
  from ..base import BitbucketCloudBase
4
3
 
5
4
 
@@ -7,7 +6,7 @@ class RepositoryVariables(BitbucketCloudBase):
7
6
  def __init__(self, url, *args, **kwargs):
8
7
  super(RepositoryVariables, self).__init__(url, *args, **kwargs)
9
8
 
10
- def __get_object(self, data):
9
+ def __get_object(self, data) -> "RepositoryVariable":
11
10
  return RepositoryVariable(
12
11
  self.url_joiner(self.url, data["uuid"]),
13
12
  data,
@@ -61,7 +60,7 @@ class RepositoryVariables(BitbucketCloudBase):
61
60
 
62
61
  return
63
62
 
64
- def get(self, uuid):
63
+ def get(self, uuid: str): # type: ignore[override]
65
64
  """
66
65
  Returns the pipeline with the uuid in this repository.
67
66
 
@@ -5,13 +5,15 @@ import logging
5
5
  import os
6
6
  import re
7
7
  import time
8
+ from typing import cast
8
9
 
10
+ import requests
9
11
  from bs4 import BeautifulSoup
10
12
  from deprecated import deprecated
11
- import requests
12
13
  from requests import HTTPError
13
14
 
14
15
  from atlassian import utils
16
+
15
17
  from .errors import (
16
18
  ApiConflictError,
17
19
  ApiError,
@@ -343,7 +345,7 @@ class Confluence(AtlassianRestAPI):
343
345
  try:
344
346
  return response.get("results")[0]
345
347
  except (IndexError, TypeError) as e:
346
- log.error("Can't find '%s' page on the %s!", title, self.url)
348
+ log.error(f"Can't find '{title}' page on {self.url}")
347
349
  log.debug(e)
348
350
  return None
349
351
 
@@ -1468,7 +1470,7 @@ class Confluence(AtlassianRestAPI):
1468
1470
  downloaded_files = {}
1469
1471
  for attachment in attachments:
1470
1472
  file_name = attachment["title"] or attachment["id"] # Use attachment ID if title is unavailable
1471
- download_link = self.url + attachment["_links"]["download"]
1473
+ download_link = attachment["_links"]["download"]
1472
1474
  # Fetch the file content
1473
1475
  response = self.get(str(download_link), not_json_response=True)
1474
1476
 
@@ -1644,7 +1646,7 @@ class Confluence(AtlassianRestAPI):
1644
1646
 
1645
1647
  return response
1646
1648
 
1647
- def remove_page_label(self, page_id, label):
1649
+ def remove_page_label(self, page_id: str, label: str):
1648
1650
  """
1649
1651
  Delete Confluence page label
1650
1652
  :param page_id: content_id format
@@ -1803,7 +1805,7 @@ class Confluence(AtlassianRestAPI):
1803
1805
  log.debug('Old Content: """%s"""', confluence_body_content)
1804
1806
  log.debug('New Content: """%s"""', body)
1805
1807
 
1806
- if confluence_body_content.strip() == body.strip():
1808
+ if confluence_body_content.strip().lower() == body.strip().lower():
1807
1809
  log.info("Content of %s is exactly the same", page_id)
1808
1810
  return True
1809
1811
  else:
@@ -2423,7 +2425,7 @@ class Confluence(AtlassianRestAPI):
2423
2425
  else:
2424
2426
  members.extend(values)
2425
2427
  if not members:
2426
- print((f"Did not get members from {group_name} group, please check permissions or connectivity"))
2428
+ print(f"Did not get members from {group_name} group, please check permissions or connectivity")
2427
2429
  return members
2428
2430
 
2429
2431
  def get_space(self, space_key, expand="description.plain,homepage", params=None):
@@ -2709,7 +2711,7 @@ class Confluence(AtlassianRestAPI):
2709
2711
  """
2710
2712
  headers = self.form_token_headers
2711
2713
  url = f"spaces/flyingpdf/pdfpageexport.action?pageId={page_id}"
2712
- if self.api_version == "cloud":
2714
+ if self.api_version == "cloud" or self.cloud:
2713
2715
  url = self.get_pdf_download_url_for_confluence_cloud(url)
2714
2716
  if not url:
2715
2717
  log.error("Failed to get download PDF url.")
@@ -2740,13 +2742,13 @@ class Confluence(AtlassianRestAPI):
2740
2742
  :return: The URL to download the exported file.
2741
2743
  """
2742
2744
 
2743
- def get_atl_request(url: str):
2745
+ def get_atl_request(link: str):
2744
2746
  # Nested function used to get atl_token used for XSRF protection.
2745
2747
  # This is only applicable to html/csv/xml space exports
2746
2748
  try:
2747
- response = self.get(url, advanced_mode=True)
2749
+ response = self.get(link, advanced_mode=True)
2748
2750
  parsed_html = BeautifulSoup(response.text, "html.parser")
2749
- atl_token = parsed_html.find("input", {"name": "atl_token"}).get("value")
2751
+ atl_token = parsed_html.find("input", {"name": "atl_token"}).get("value") # type: ignore[union-attr]
2750
2752
  return atl_token
2751
2753
  except Exception as e:
2752
2754
  raise ApiError("Problems with getting the atl_token for get_space_export method :", reason=e)
@@ -2798,17 +2800,17 @@ class Confluence(AtlassianRestAPI):
2798
2800
  parsed_html = BeautifulSoup(response.text, "html.parser")
2799
2801
  # Getting the poll URL to get the export progress status
2800
2802
  try:
2801
- poll_url = parsed_html.find("meta", {"name": "ajs-pollURI"}).get("content")
2803
+ poll_url = cast("str", parsed_html.find("meta", {"name": "ajs-pollURI"}).get("content")) # type: ignore[union-attr]
2802
2804
  except Exception as e:
2803
2805
  raise ApiError("Problems with getting the poll_url for get_space_export method :", reason=e)
2804
2806
  running_task = True
2805
2807
  while running_task:
2806
2808
  try:
2807
- progress_response = self.get(poll_url)
2808
- log.info("Space" + space_key + " export status: " + progress_response["message"])
2809
- if progress_response["complete"]:
2810
- parsed_html = BeautifulSoup(progress_response["message"], "html.parser")
2811
- download_url = parsed_html.find("a", {"class": "space-export-download-path"}).get("href")
2809
+ progress_response = self.get(poll_url) or {}
2810
+ log.info(f"Space {space_key} export status: {progress_response.get('message', 'None')}")
2811
+ if progress_response is not {} and progress_response.get("complete"):
2812
+ parsed_html = BeautifulSoup(progress_response.get("message"), "html.parser")
2813
+ download_url = cast("str", parsed_html.find("a", {"class": "space-export-download-path"}).get("href")) # type: ignore
2812
2814
  if self.url in download_url:
2813
2815
  return download_url
2814
2816
  else:
@@ -3313,6 +3315,250 @@ class Confluence(AtlassianRestAPI):
3313
3315
  url = "rest/api/user/%s/group/%s" % (username, group_name)
3314
3316
  return self.put(url)
3315
3317
 
3318
+ # Space Permissions
3319
+ def get_all_space_permissions(self, space_key):
3320
+ """
3321
+ Returns list of permissions granted to users and groups in the particular space.
3322
+ :param space_key:
3323
+ :return:
3324
+ """
3325
+ url = f"rest/api/space/{space_key}/permissions"
3326
+ return self.get(url)
3327
+
3328
+ def set_permissions_to_multiple_items_for_space(self, space_key, user_key=None, group_name=None, operations=None):
3329
+ """
3330
+ Sets permissions to multiple users/groups in the given space.
3331
+ Request should contain all permissions that user/group/anonymous user will have in a given space.
3332
+ If permission is absent in the request, but was granted before, it will be revoked.
3333
+ If empty list of permissions passed to user/group/anonymous user,
3334
+ then all their existing permissions will be revoked.
3335
+ If user/group/anonymous user not mentioned in the request, their permissions will not be revoked.
3336
+
3337
+ Maximum 40 different users/groups/anonymous user could be passed in the request.
3338
+ :param space_key:
3339
+ :param user_key:
3340
+ :param group_name:
3341
+ :param operations:
3342
+ :return:
3343
+ """
3344
+ url = f"rest/api/space/{space_key}/permissions"
3345
+ params = []
3346
+
3347
+ if user_key:
3348
+ params.append({"userKey": user_key, "operations": operations or []})
3349
+
3350
+ if group_name:
3351
+ params.append({"groupName": group_name, "operations": operations or []})
3352
+
3353
+ if not user_key and not group_name:
3354
+ params.append({"operations": operations or []})
3355
+ payload_json = json.dumps(params)
3356
+ return self.post(url, data=payload_json)
3357
+
3358
+ def get_permissions_granted_to_anonymous_for_space(self, space_key):
3359
+ """
3360
+ Get permissions granted to anonymous user for the given space
3361
+ :param space_key:
3362
+ :return:
3363
+ """
3364
+ url = f"rest/api/space/{space_key}/permissions/anonymous"
3365
+ return self.get(url)
3366
+
3367
+ def set_permissions_to_anonymous_for_space(self, space_key, operations=None):
3368
+ """
3369
+ Grant permissions to anonymous user in the given space. Operation doesn't override existing permissions,
3370
+ will only add those one that weren't granted before. Multiple permissions could be passed in one request.
3371
+ Supported targetType and operationKey pairs:
3372
+
3373
+ space read
3374
+ space administer
3375
+ space export
3376
+ space restrict
3377
+ space delete_own
3378
+ space delete_mail
3379
+ page create
3380
+ page delete
3381
+ blogpost create
3382
+ blogpost delete
3383
+ comment create
3384
+ comment delete
3385
+ attachment create
3386
+ attachment delete
3387
+ :param space_key:
3388
+ :param operations:
3389
+ :return:
3390
+ """
3391
+ url = f"rest/api/space/{space_key}/permissions/anonymous"
3392
+ data = {"operations": operations or []}
3393
+ return self.put(url, data=data)
3394
+
3395
+ def remove_permissions_from_anonymous_for_space(self, space_key, operations=None):
3396
+ """
3397
+ Revoke permissions from anonymous user in the given space.
3398
+ If anonymous user doesn't have permissions that we are trying to revoke,
3399
+ those permissions will be silently skipped. Multiple permissions could be passed in one request.
3400
+ Supported targetType and operationKey pairs:
3401
+
3402
+ space read
3403
+ space administer
3404
+ space export
3405
+ space restrict
3406
+ space delete_own
3407
+ space delete_mail
3408
+ page create
3409
+ page delete
3410
+ blogpost create
3411
+ blogpost delete
3412
+ comment create
3413
+ comment delete
3414
+ attachment create
3415
+ attachment delete
3416
+ :param space_key:
3417
+ :param operations:
3418
+ :return:
3419
+ """
3420
+ url = f"rest/api/space/{space_key}/permissions/anonymous/revoke"
3421
+ data = {"operations": operations or []}
3422
+ return self.put(url, data=data)
3423
+
3424
+ def get_permissions_granted_to_group_for_space(self, space_key, group_name):
3425
+ """
3426
+ Get permissions granted to group for the given space
3427
+ :param space_key:
3428
+ :param group_name:
3429
+ :return:
3430
+ """
3431
+ url = f"rest/api/space/{space_key}/permissions/group/{group_name}"
3432
+ return self.get(url)
3433
+
3434
+ def set_permissions_to_group_for_space(self, space_key, group_name, operations=None):
3435
+ """
3436
+ Grant permissions to group in the given space.
3437
+ Operation doesn't override existing permissions, will only add those one that weren't granted before.
3438
+ Multiple permissions could be passed in one request. Supported targetType and operationKey pairs:
3439
+
3440
+ space read
3441
+ space administer
3442
+ space export
3443
+ space restrict
3444
+ space delete_own
3445
+ space delete_mail
3446
+ page create
3447
+ page delete
3448
+ blogpost create
3449
+ blogpost delete
3450
+ comment create
3451
+ comment delete
3452
+ attachment create
3453
+ attachment delete
3454
+ :param space_key:
3455
+ :param group_name:
3456
+ :param operations:
3457
+ :return:
3458
+ """
3459
+ url = f"rest/api/space/{space_key}/permissions/group/{group_name}"
3460
+ data = {"operations": operations or []}
3461
+ return self.put(url, data=data)
3462
+
3463
+ def remove_permissions_from_group_for_space(self, space_key, group_name, operations=None):
3464
+ """
3465
+ Revoke permissions from a group in the given space.
3466
+ If group doesn't have permissions that we are trying to revoke,
3467
+ those permissions will be silently skipped. Multiple permissions could be passed in one request.
3468
+ Supported targetType and operationKey pairs:
3469
+
3470
+ space read
3471
+ space administer
3472
+ space export
3473
+ space restrict
3474
+ space delete_own
3475
+ space delete_mail
3476
+ page create
3477
+ page delete
3478
+ blogpost create
3479
+ blogpost delete
3480
+ comment create
3481
+ comment delete
3482
+ attachment create
3483
+ attachment delete
3484
+ :param space_key:
3485
+ :param group_name:
3486
+ :param operations:
3487
+ :return:
3488
+ """
3489
+ url = f"rest/api/space/{space_key}/permissions/group/{group_name}/revoke"
3490
+ data = {"operations": operations or []}
3491
+ return self.put(url, data=data)
3492
+
3493
+ def get_permissions_granted_to_user_for_space(self, space_key, user_key):
3494
+ """
3495
+ Get permissions granted to user for the given space
3496
+ :param space_key:
3497
+ :param user_key:
3498
+ :return:
3499
+ """
3500
+ url = f"rest/api/space/{space_key}/permissions/user/{user_key}"
3501
+ return self.get(url)
3502
+
3503
+ def set_permissions_to_user_for_space(self, space_key, user_key, operations=None):
3504
+ """
3505
+ Grant permissions to user in the given space.
3506
+ Operation doesn't override existing permissions, will only add those one that weren't granted before.
3507
+ Multiple permissions could be passed in one request. Supported targetType and operationKey pairs:
3508
+
3509
+ space read
3510
+ space administer
3511
+ space export
3512
+ space restrict
3513
+ space delete_own
3514
+ space delete_mail
3515
+ page create
3516
+ page delete
3517
+ blogpost create
3518
+ blogpost delete
3519
+ comment create
3520
+ comment delete
3521
+ attachment create
3522
+ attachment delete
3523
+ :param space_key:
3524
+ :param user_key:
3525
+ :param operations:
3526
+ :return:
3527
+ """
3528
+ url = f"rest/api/space/{space_key}/permissions/user/{user_key}"
3529
+ data = {"operations": operations or []}
3530
+ return self.put(url, data=data)
3531
+
3532
+ def remove_permissions_from_user_for_space(self, space_key, user_key, operations=None):
3533
+ """
3534
+ Revoke permissions from a user in the given space.
3535
+ If user doesn't have permissions that we are trying to revoke,
3536
+ those permissions will be silently skipped. Multiple permissions could be passed in one request.
3537
+ Supported targetType and operationKey pairs:
3538
+
3539
+ space read
3540
+ space administer
3541
+ space export
3542
+ space restrict
3543
+ space delete_own
3544
+ space delete_mail
3545
+ page create
3546
+ page delete
3547
+ blogpost create
3548
+ blogpost delete
3549
+ comment create
3550
+ comment delete
3551
+ attachment create
3552
+ attachment delete
3553
+ :param space_key:
3554
+ :param user_key:
3555
+ :param operations:
3556
+ :return:
3557
+ """
3558
+ url = f"rest/api/space/{space_key}/permissions/user/{user_key}/revoke"
3559
+ data = {"operations": operations or []}
3560
+ return self.put(url, params=data)
3561
+
3316
3562
  def add_space_permissions(
3317
3563
  self,
3318
3564
  space_key,
@@ -3347,7 +3593,7 @@ class Confluence(AtlassianRestAPI):
3347
3593
  To learn more about how to use these APIs,
3348
3594
  please refer to the Confluence JSON-RPC documentation on Atlassian Developers.
3349
3595
  """
3350
- if self.api_version == "cloud":
3596
+ if self.api_version == "cloud" or self.cloud:
3351
3597
  return {}
3352
3598
  url = "rpc/json-rpc/confluenceservice-v2"
3353
3599
  data = {
@@ -3365,7 +3611,7 @@ class Confluence(AtlassianRestAPI):
3365
3611
  To learn more about how to use these APIs,
3366
3612
  please refer to the Confluence JSON-RPC documentation on Atlassian Developers.
3367
3613
  """
3368
- if self.api_version == "cloud":
3614
+ if self.api_version == "cloud" or self.cloud:
3369
3615
  return self.get_space(space_key=space_key, expand="permissions")
3370
3616
  url = "rpc/json-rpc/confluenceservice-v2"
3371
3617
  data = {