atlassian-python-api 3.41.15__tar.gz → 3.41.18__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 (229) hide show
  1. {atlassian_python_api-3.41.15/atlassian_python_api.egg-info → atlassian_python_api-3.41.18}/PKG-INFO +16 -2
  2. atlassian_python_api-3.41.18/atlassian/VERSION +1 -0
  3. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/__init__.py +58 -8
  4. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/repositories/__init__.py +2 -2
  5. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/server/projects/repos/__init__.py +2 -1
  6. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/confluence.py +301 -45
  7. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/insight.py +2 -3
  8. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/jira.py +44 -37
  9. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/rest_client.py +73 -36
  10. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/service_desk.py +9 -9
  11. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18/atlassian_python_api.egg-info}/PKG-INFO +16 -2
  12. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian_python_api.egg-info/SOURCES.txt +1 -43
  13. atlassian_python_api-3.41.18/tests/responses/jira/rest/api/2/issue/FOO-123/remotelink/POST +17 -0
  14. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/test_jira.py +37 -0
  15. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tox.ini +8 -1
  16. atlassian_python_api-3.41.15/atlassian/VERSION +0 -1
  17. atlassian_python_api-3.41.15/tests/__pycache__/__init__.cpython-311.pyc +0 -0
  18. atlassian_python_api-3.41.15/tests/__pycache__/mockup.cpython-311.pyc +0 -0
  19. atlassian_python_api-3.41.15/tests/__pycache__/test_base.cpython-311-pytest-7.2.0.pyc +0 -0
  20. atlassian_python_api-3.41.15/tests/__pycache__/test_base.cpython-311-pytest-7.2.1.pyc +0 -0
  21. atlassian_python_api-3.41.15/tests/__pycache__/test_base.cpython-311-pytest-7.3.1.pyc +0 -0
  22. atlassian_python_api-3.41.15/tests/__pycache__/test_base.cpython-311-pytest-7.4.0.pyc +0 -0
  23. atlassian_python_api-3.41.15/tests/__pycache__/test_base.cpython-311-pytest-7.4.2.pyc +0 -0
  24. atlassian_python_api-3.41.15/tests/__pycache__/test_bitbucket_cloud_oo.cpython-311-pytest-7.2.0.pyc +0 -0
  25. atlassian_python_api-3.41.15/tests/__pycache__/test_bitbucket_cloud_oo.cpython-311-pytest-7.2.1.pyc +0 -0
  26. atlassian_python_api-3.41.15/tests/__pycache__/test_bitbucket_cloud_oo.cpython-311-pytest-7.3.1.pyc +0 -0
  27. atlassian_python_api-3.41.15/tests/__pycache__/test_bitbucket_cloud_oo.cpython-311-pytest-7.4.0.pyc +0 -0
  28. atlassian_python_api-3.41.15/tests/__pycache__/test_bitbucket_cloud_oo.cpython-311-pytest-7.4.2.pyc +0 -0
  29. atlassian_python_api-3.41.15/tests/__pycache__/test_bitbucket_server.cpython-311-pytest-7.2.0.pyc +0 -0
  30. atlassian_python_api-3.41.15/tests/__pycache__/test_bitbucket_server.cpython-311-pytest-7.2.1.pyc +0 -0
  31. atlassian_python_api-3.41.15/tests/__pycache__/test_bitbucket_server.cpython-311-pytest-7.3.1.pyc +0 -0
  32. atlassian_python_api-3.41.15/tests/__pycache__/test_bitbucket_server.cpython-311-pytest-7.4.0.pyc +0 -0
  33. atlassian_python_api-3.41.15/tests/__pycache__/test_bitbucket_server.cpython-311-pytest-7.4.2.pyc +0 -0
  34. atlassian_python_api-3.41.15/tests/__pycache__/test_bitbucket_server_oo.cpython-311-pytest-7.2.0.pyc +0 -0
  35. atlassian_python_api-3.41.15/tests/__pycache__/test_bitbucket_server_oo.cpython-311-pytest-7.2.1.pyc +0 -0
  36. atlassian_python_api-3.41.15/tests/__pycache__/test_bitbucket_server_oo.cpython-311-pytest-7.3.1.pyc +0 -0
  37. atlassian_python_api-3.41.15/tests/__pycache__/test_bitbucket_server_oo.cpython-311-pytest-7.4.0.pyc +0 -0
  38. atlassian_python_api-3.41.15/tests/__pycache__/test_bitbucket_server_oo.cpython-311-pytest-7.4.2.pyc +0 -0
  39. atlassian_python_api-3.41.15/tests/__pycache__/test_confluence_advanced_mode.cpython-311-pytest-7.2.0.pyc +0 -0
  40. atlassian_python_api-3.41.15/tests/__pycache__/test_confluence_advanced_mode.cpython-311-pytest-7.2.1.pyc +0 -0
  41. atlassian_python_api-3.41.15/tests/__pycache__/test_confluence_advanced_mode.cpython-311-pytest-7.3.1.pyc +0 -0
  42. atlassian_python_api-3.41.15/tests/__pycache__/test_confluence_advanced_mode.cpython-311-pytest-7.4.0.pyc +0 -0
  43. atlassian_python_api-3.41.15/tests/__pycache__/test_confluence_advanced_mode.cpython-311-pytest-7.4.2.pyc +0 -0
  44. atlassian_python_api-3.41.15/tests/__pycache__/test_confluence_attach.cpython-311-pytest-7.2.0.pyc +0 -0
  45. atlassian_python_api-3.41.15/tests/__pycache__/test_confluence_attach.cpython-311-pytest-7.2.1.pyc +0 -0
  46. atlassian_python_api-3.41.15/tests/__pycache__/test_confluence_attach.cpython-311-pytest-7.3.1.pyc +0 -0
  47. atlassian_python_api-3.41.15/tests/__pycache__/test_confluence_attach.cpython-311-pytest-7.4.0.pyc +0 -0
  48. atlassian_python_api-3.41.15/tests/__pycache__/test_confluence_attach.cpython-311-pytest-7.4.2.pyc +0 -0
  49. atlassian_python_api-3.41.15/tests/__pycache__/test_jira.cpython-311-pytest-7.2.0.pyc +0 -0
  50. atlassian_python_api-3.41.15/tests/__pycache__/test_jira.cpython-311-pytest-7.2.1.pyc +0 -0
  51. atlassian_python_api-3.41.15/tests/__pycache__/test_jira.cpython-311-pytest-7.3.1.pyc +0 -0
  52. atlassian_python_api-3.41.15/tests/__pycache__/test_jira.cpython-311-pytest-7.4.0.pyc +0 -0
  53. atlassian_python_api-3.41.15/tests/__pycache__/test_jira.cpython-311-pytest-7.4.2.pyc +0 -0
  54. atlassian_python_api-3.41.15/tests/__pycache__/test_jira.cpython-311-pytest-8.0.0.pyc +0 -0
  55. atlassian_python_api-3.41.15/tests/__pycache__/test_servicedesk.cpython-311-pytest-7.2.0.pyc +0 -0
  56. atlassian_python_api-3.41.15/tests/__pycache__/test_servicedesk.cpython-311-pytest-7.2.1.pyc +0 -0
  57. atlassian_python_api-3.41.15/tests/__pycache__/test_servicedesk.cpython-311-pytest-7.3.1.pyc +0 -0
  58. atlassian_python_api-3.41.15/tests/__pycache__/test_servicedesk.cpython-311-pytest-7.4.0.pyc +0 -0
  59. atlassian_python_api-3.41.15/tests/__pycache__/test_servicedesk.cpython-311-pytest-7.4.2.pyc +0 -0
  60. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/LICENSE +0 -0
  61. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/MANIFEST.in +0 -0
  62. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/README.rst +0 -0
  63. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/__init__.py +0 -0
  64. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bamboo.py +0 -0
  65. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/base.py +0 -0
  66. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/__init__.py +0 -0
  67. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/base.py +0 -0
  68. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/common/__init__.py +0 -0
  69. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/common/builds.py +0 -0
  70. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/common/comments.py +0 -0
  71. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/common/users.py +0 -0
  72. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/repositories/branchRestrictions.py +0 -0
  73. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/repositories/commits.py +0 -0
  74. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/repositories/defaultReviewers.py +0 -0
  75. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/repositories/deploymentEnvironments.py +0 -0
  76. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/repositories/diffstat.py +0 -0
  77. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/repositories/groupPermissions.py +0 -0
  78. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/repositories/hooks.py +0 -0
  79. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/repositories/issues.py +0 -0
  80. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/repositories/pipelines.py +0 -0
  81. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/repositories/pullRequests.py +0 -0
  82. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/repositories/refs.py +0 -0
  83. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/repositories/repositoryVariables.py +0 -0
  84. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/workspaces/__init__.py +0 -0
  85. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/workspaces/members.py +0 -0
  86. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/workspaces/permissions.py +0 -0
  87. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/cloud/workspaces/projects.py +0 -0
  88. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/server/__init__.py +0 -0
  89. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/server/base.py +0 -0
  90. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/server/common/__init__.py +0 -0
  91. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/server/common/permissions.py +0 -0
  92. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/server/globalPermissions.py +0 -0
  93. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/bitbucket/server/projects/__init__.py +0 -0
  94. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/cloud_admin.py +0 -0
  95. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/crowd.py +0 -0
  96. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/errors.py +0 -0
  97. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/marketplace.py +0 -0
  98. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/portfolio.py +0 -0
  99. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/request_utils.py +0 -0
  100. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/statuspage.py +0 -0
  101. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/utils.py +0 -0
  102. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian/xray.py +0 -0
  103. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian_python_api.egg-info/dependency_links.txt +0 -0
  104. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian_python_api.egg-info/not-zip-safe +0 -0
  105. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian_python_api.egg-info/requires.txt +0 -0
  106. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/atlassian_python_api.egg-info/top_level.txt +0 -0
  107. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/pyproject.toml +0 -0
  108. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/requirements.txt +0 -0
  109. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/setup.cfg +0 -0
  110. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/setup.py +0 -0
  111. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/__init__.py +0 -0
  112. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/mockup.py +0 -0
  113. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/GET +0 -0
  114. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/TestRepositoryCreated/POST +0 -0
  115. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/GET +0 -0
  116. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/17203842/DELETE +0 -0
  117. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/17203842/GET +0 -0
  118. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/17203842/PUT +0 -0
  119. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/GET +0 -0
  120. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/default-reviewers/DefaultReviewer1Uuid/DELETE +0 -0
  121. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/default-reviewers/DefaultReviewer1Uuid/GET +0 -0
  122. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/default-reviewers/GET +0 -0
  123. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/3/DELETE +0 -0
  124. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/3/GET +0 -0
  125. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/3/PUT +0 -0
  126. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/GET +0 -0
  127. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/POST +0 -0
  128. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/GET +0 -0
  129. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/POST +0 -0
  130. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/GET +0 -0
  131. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/GET +0 -0
  132. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/{PipelineStep1Uuid}/GET +0 -0
  133. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/{PipelineStep2Uuid}/GET +0 -0
  134. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/{PipelineStep2Uuid}/log/GET +0 -0
  135. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/stopPipeline/POST +0 -0
  136. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/GET +0 -0
  137. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/approve/DELETE +0 -0
  138. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/approve/POST +0 -0
  139. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/comments/GET +0 -0
  140. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/comments/POST +0 -0
  141. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/commits/GET +0 -0
  142. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/decline/POST +0 -0
  143. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/merge/POST +0 -0
  144. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/request-changes/DELETE +0 -0
  145. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/request-changes/POST +0 -0
  146. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/statuses/GET +0 -0
  147. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/123456/DELETE +0 -0
  148. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/123456/PUT +0 -0
  149. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/GET +0 -0
  150. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/POST +0 -0
  151. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/25/GET +0 -0
  152. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/GET +0 -0
  153. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/POST +0 -0
  154. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/workspaces/GET +0 -0
  155. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/workspaces/TestWorkspace1/GET +0 -0
  156. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/workspaces/TestWorkspace2/GET +0 -0
  157. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/cloud/2.0/workspaces/TestWorkspace3/GET +0 -0
  158. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/DELETE +0 -0
  159. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/GET +0 -0
  160. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/none/GET +0 -0
  161. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/DELETE +0 -0
  162. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/GET +0 -0
  163. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/none/GET +0 -0
  164. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/GET +0 -0
  165. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/GET +0 -0
  166. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/PUT +0 -0
  167. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/DELETE +0 -0
  168. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/GET +0 -0
  169. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/none/GET +0 -0
  170. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/DELETE +0 -0
  171. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/GET +0 -0
  172. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/none/GET +0 -0
  173. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/GET +0 -0
  174. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/GET +0 -0
  175. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/PUT +0 -0
  176. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/archive/GET +0 -0
  177. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/contributing/GET +0 -0
  178. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/default-branch/GET +0 -0
  179. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/default-branch/PUT +0 -0
  180. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/forks/GET +0 -0
  181. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/license/GET +0 -0
  182. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/DELETE +0 -0
  183. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/GET +0 -0
  184. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/none/GET +0 -0
  185. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/DELETE +0 -0
  186. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/GET +0 -0
  187. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/none/GET +0 -0
  188. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/readme/GET +0 -0
  189. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/related/GET +0 -0
  190. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/3/DELETE +0 -0
  191. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/3/GET +0 -0
  192. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/3/PUT +0 -0
  193. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/GET +0 -0
  194. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/POST +0 -0
  195. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/jira/rest/agile/1.0/epic/BAR-22/issue/GET +0 -0
  196. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/jira/rest/agile/1.0/epic/none/issue/GET +0 -0
  197. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/jira/rest/api/2/comment/list/POST +0 -0
  198. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/jira/rest/api/2/issue/FOO-123/GET +0 -0
  199. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/jira/rest/api/2/issue/FOO-123/comment/10000/GET +0 -0
  200. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/jira/rest/api/2/issue/FOO-123/comment/GET +0 -0
  201. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar1/DELETE +0 -0
  202. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar1/GET +0 -0
  203. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar1/PUT +0 -0
  204. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar2New/PUT +0 -0
  205. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/GET +0 -0
  206. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/jira/rest/api/2/issue/POST +0 -0
  207. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/jira/rest/api/2/issue/REGEX-123/file.txt +0 -0
  208. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/servicedesk/rest/servicedeskapi/customer/POST +0 -0
  209. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/servicedesk/rest/servicedeskapi/organization/GET +0 -0
  210. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/servicedesk/rest/servicedeskapi/organization/POST +0 -0
  211. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/DELETE +0 -0
  212. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/GET +0 -0
  213. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/property/GET +0 -0
  214. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/user/DELETE +0 -0
  215. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/user/GET +0 -0
  216. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/user/POST +0 -0
  217. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer/DELETE +0 -0
  218. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer/GET +0 -0
  219. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer/POST +0 -0
  220. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/organization/DELETE +0 -0
  221. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/organization/GET +0 -0
  222. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/organization/POST +0 -0
  223. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/test_base.py +0 -0
  224. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/test_bitbucket_cloud_oo.py +0 -0
  225. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/test_bitbucket_server.py +0 -0
  226. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/test_bitbucket_server_oo.py +0 -0
  227. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/test_confluence_advanced_mode.py +0 -0
  228. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/test_confluence_attach.py +0 -0
  229. {atlassian_python_api-3.41.15 → atlassian_python_api-3.41.18}/tests/test_servicedesk.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: atlassian-python-api
3
- Version: 3.41.15
3
+ Version: 3.41.18
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
@@ -54,6 +54,20 @@ Requires-Dist: jmespath
54
54
  Requires-Dist: beautifulsoup4
55
55
  Provides-Extra: kerberos
56
56
  Requires-Dist: requests-kerberos; extra == "kerberos"
57
+ Dynamic: author
58
+ Dynamic: author-email
59
+ Dynamic: classifier
60
+ Dynamic: description
61
+ Dynamic: download-url
62
+ Dynamic: home-page
63
+ Dynamic: keywords
64
+ Dynamic: license
65
+ Dynamic: maintainer
66
+ Dynamic: maintainer-email
67
+ Dynamic: platform
68
+ Dynamic: provides-extra
69
+ Dynamic: requires-dist
70
+ Dynamic: summary
57
71
 
58
72
  ============================
59
73
  Atlassian Python API wrapper
@@ -0,0 +1 @@
1
+ 3.41.18
@@ -1,7 +1,6 @@
1
1
  # coding=utf-8
2
2
  import logging
3
3
  from enum import Enum
4
- from typing import Optional, Union
5
4
 
6
5
  from deprecated import deprecated
7
6
  from requests import HTTPError
@@ -1907,6 +1906,22 @@ class Bitbucket(BitbucketBase):
1907
1906
  params["limit"] = limit
1908
1907
  return self._get_paged(url, params)
1909
1908
 
1909
+ def assign_pull_request_participant_role(
1910
+ self, project_key: str, repository_slug: str, pull_request_id: int, role: str, user: str
1911
+ ) -> dict:
1912
+ """
1913
+ Assign a role to a user for a pull request
1914
+ :param project_key: The project key
1915
+ :param repository_slug: The repository key
1916
+ :param pull_request_id: The pull request id
1917
+ :param role: The role to assign, currently it only accepts REVIEWER
1918
+ :param user: The user to assign the role to
1919
+ :return:
1920
+ """
1921
+ url = self._url_pull_request_participants(project_key, repository_slug, pull_request_id)
1922
+ data = {"role": role, "user": {"name": user}}
1923
+ return self.post(url, data=data)
1924
+
1910
1925
  def get_dashboard_pull_requests(
1911
1926
  self,
1912
1927
  start=0,
@@ -2105,6 +2120,37 @@ class Bitbucket(BitbucketBase):
2105
2120
  data = {"version": comment_version}
2106
2121
  return self.delete(url, params=data)
2107
2122
 
2123
+ def _url_pull_request_blocker_comments(self, project_key, repository_slug, pull_request_id) -> str:
2124
+ url = "{}/blocker-comments".format(self._url_pull_request(project_key, repository_slug, pull_request_id))
2125
+ return url
2126
+
2127
+ def add_pull_request_blocker_comment(
2128
+ self, project_key: str, repository_slug: str, pull_request_id: int, text: dict, severity: str
2129
+ ) -> dict:
2130
+ """
2131
+ Add a comment to a pull request that blocks the merge
2132
+ :param project_key: The project key
2133
+ :param repository_slug: The repository key
2134
+ :param pull_request_id: The pull request id
2135
+ :param text: The text of the comment
2136
+ :param severity: The severity of the comment
2137
+ :return:
2138
+ """
2139
+ url = self._url_pull_request_blocker_comments(project_key, repository_slug, pull_request_id)
2140
+ data = {"text": text, "severity": severity}
2141
+ return self.post(url, data=data)
2142
+
2143
+ def search_pull_request_blocker_comment(self, project_key: str, repository_slug: str, pull_request_id: int) -> dict:
2144
+ """
2145
+ Get all comments that block the merge of a pull request
2146
+ :param project_key: The project key
2147
+ :param repository_slug: The repository key
2148
+ :param pull_request_id: The pull request id
2149
+ :return:
2150
+ """
2151
+ url = self._url_pull_request_blocker_comments(project_key, repository_slug, pull_request_id)
2152
+ return self.get(url)
2153
+
2108
2154
  def decline_pull_request(self, project_key, repository_slug, pr_id, pr_version):
2109
2155
  """
2110
2156
  Decline a pull request.
@@ -2208,13 +2254,13 @@ class Bitbucket(BitbucketBase):
2208
2254
 
2209
2255
  def merge_pull_request(
2210
2256
  self,
2211
- project_key: str,
2212
- repository_slug: str,
2213
- pr_id: int,
2214
- merge_message: str,
2215
- close_source_branch: bool = False,
2216
- merge_strategy: Union[str, MergeStrategy] = MergeStrategy.MERGE_COMMIT,
2217
- pr_version: Optional[int] = None,
2257
+ project_key,
2258
+ repository_slug,
2259
+ pr_id,
2260
+ merge_message,
2261
+ close_source_branch=False,
2262
+ merge_strategy=MergeStrategy.MERGE_COMMIT,
2263
+ pr_version=None,
2218
2264
  ):
2219
2265
  """
2220
2266
  Merge pull request
@@ -2330,6 +2376,7 @@ class Bitbucket(BitbucketBase):
2330
2376
  limit=None,
2331
2377
  until=None,
2332
2378
  since=None,
2379
+ path=None,
2333
2380
  ):
2334
2381
  """
2335
2382
  Get commit list from repo
@@ -2347,6 +2394,7 @@ class Bitbucket(BitbucketBase):
2347
2394
  fixed system limits. Default by built-in method: None
2348
2395
  :param until: OPTIONAL: The commit ID or ref (inclusively) to retrieve commits before
2349
2396
  :param since: OPTIONAL: The commit ID or ref (exclusively) to retrieve commits after
2397
+ :param path: OPTIONAL: An optional path to filter commits by
2350
2398
  :return:
2351
2399
  """
2352
2400
  url = self._url_commits(project_key, repository_slug)
@@ -2373,6 +2421,8 @@ class Bitbucket(BitbucketBase):
2373
2421
  params["since"] = since
2374
2422
  if until:
2375
2423
  params["until"] = until
2424
+ if path:
2425
+ params["path"] = path
2376
2426
  return self._get_paged(url, params=params)
2377
2427
 
2378
2428
  def get_commit_changes(self, project_key, repository_slug, hash_newest=None, merges="include", commit_id=None):
@@ -263,8 +263,8 @@ class Repository(BitbucketCloudBase):
263
263
  self.__hooks = Hooks(
264
264
  "{}/hooks".format(self.url),
265
265
  data={"links": {"hooks": {"href": "{}/hooks".format(self.url)}}},
266
- **self._new_session_args,
267
- )
266
+ **self._new_session_args
267
+ ) # fmt: skip
268
268
  self.__default_reviewers = DefaultReviewers("{}/default-reviewers".format(self.url), **self._new_session_args)
269
269
  self.__deployment_environments = DeploymentEnvironments(
270
270
  "{}/environments".format(self.url), **self._new_session_args
@@ -301,7 +301,8 @@ class Repository(BitbucketServerBase):
301
301
  For further information visit:
302
302
  https://docs.atlassian.com/bitbucket-server/rest/7.13.0/bitbucket-rest.html#idp199
303
303
  :param dest_fd: a file-like object to which the archive will be written
304
- :param at: string: Optional, the commit to download an archive of; if not supplied, an archive of the default branch is downloaded
304
+ :param at: string: Optional, the commit to download an archive of; if not supplied,
305
+ an archive of the default branch is downloaded
305
306
  :param filename: string: Optional, a filename to include the "Content-Disposition" header
306
307
  :param format: string: Optional, the format to stream the archive in; must be one of: zip, tar, tar.gz or tgz.
307
308
  If not specified, then the archive will be in zip format.
@@ -1,15 +1,25 @@
1
1
  # coding=utf-8
2
+ import io
3
+ import json
2
4
  import logging
3
5
  import os
4
- import time
5
- import json
6
6
  import re
7
- from requests import HTTPError
8
- import requests
9
- from deprecated import deprecated
7
+ import time
8
+
10
9
  from bs4 import BeautifulSoup
10
+ from deprecated import deprecated
11
+ import requests
12
+ from requests import HTTPError
13
+
11
14
  from atlassian import utils
12
- from .errors import ApiError, ApiNotFoundError, ApiPermissionError, ApiValueError, ApiConflictError, ApiNotAcceptable
15
+ from .errors import (
16
+ ApiConflictError,
17
+ ApiError,
18
+ ApiNotAcceptable,
19
+ ApiNotFoundError,
20
+ ApiPermissionError,
21
+ ApiValueError,
22
+ )
13
23
  from .rest_client import AtlassianRestAPI
14
24
 
15
25
  log = logging.getLogger(__name__)
@@ -136,6 +146,24 @@ class Confluence(AtlassianRestAPI):
136
146
  else:
137
147
  return False
138
148
 
149
+ def share_with_others(self, page_id, group, message):
150
+ """
151
+ Notify members (currently only groups implemented) about something on that page
152
+ """
153
+ url = "rest/share-page/latest/share"
154
+ params = {
155
+ "contextualPageId": page_id,
156
+ # "emails": [],
157
+ "entityId": page_id,
158
+ "entityType": "page",
159
+ "groups": group,
160
+ "note": message,
161
+ # "users":[]
162
+ }
163
+ r = self.post(url, json=params, headers={"contentType": "application/json; charset=utf-8"}, advanced_mode=True)
164
+ if r.status_code != 200:
165
+ raise Exception("failed sharing content {code}: {reason}".format(code=r.status_code, reason=r.text))
166
+
139
167
  def get_page_child_by_type(self, page_id, type="page", start=None, limit=None, expand=None):
140
168
  """
141
169
  Provide content by type (page, blog, comment)
@@ -522,13 +550,14 @@ class Confluence(AtlassianRestAPI):
522
550
  # operate differently between different collaborative modes
523
551
  return self.get_page_by_id(page_id=page_id, expand=expand, status=status)
524
552
 
525
- def get_all_pages_by_label(self, label, start=0, limit=50):
553
+ def get_all_pages_by_label(self, label, start=0, limit=50, expand=None):
526
554
  """
527
555
  Get all page by label
528
556
  :param label:
529
557
  :param start: OPTIONAL: The start point of the collection to return. Default: None (0).
530
558
  :param limit: OPTIONAL: The limit of the number of pages to return, this may be restricted by
531
559
  fixed system limits. Default: 50
560
+ :param expand: OPTIONAL: a comma separated list of properties to expand on the content
532
561
  :return:
533
562
  """
534
563
  url = "rest/api/content/search"
@@ -539,6 +568,8 @@ class Confluence(AtlassianRestAPI):
539
568
  params["start"] = start
540
569
  if limit:
541
570
  params["limit"] = limit
571
+ if expand:
572
+ params["expand"] = expand
542
573
 
543
574
  try:
544
575
  response = self.get(url, params=params)
@@ -689,10 +720,76 @@ class Confluence(AtlassianRestAPI):
689
720
 
690
721
  return response.get("results")
691
722
 
723
+ def get_all_pages_by_space_ids_confluence_cloud(
724
+ self,
725
+ space_ids,
726
+ batch_size=250,
727
+ sort=None,
728
+ status=None,
729
+ title=None,
730
+ body_format=None,
731
+ ):
732
+ """
733
+ Get all pages from a set of space ids:
734
+ https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-get
735
+
736
+ :param space_ids: A Set of space IDs passed as a filter to Confluence
737
+ :param batch_size: OPTIONAL: The batch size of pages to retrieve from confluence per request MAX is 250.
738
+ Default: 250
739
+ :param sort: OPTIONAL: The order the pages are retrieved in.
740
+ Valid values: id, -id, created-date, -created-date, modified-date, -modified-date, title, -title
741
+ :param status: OPTIONAL: Filter pages based on their status.
742
+ Valid values: current, archived, deleted, trashed
743
+ Default: current,archived
744
+ :param title: OPTIONAL: Filter pages based on their title.
745
+ :param body-format: OPTIONAL: The format of the body in the response. Valid values: storage, atlas_doc_format
746
+ :return:
747
+ """
748
+ path = "/api/v2/pages"
749
+ params = {}
750
+ if space_ids:
751
+ params["space-id"] = ",".join(space_ids)
752
+ if batch_size:
753
+ params["limit"] = batch_size
754
+ if sort:
755
+ params["sort"] = sort
756
+ if status:
757
+ params["status"] = status
758
+ if title:
759
+ params["title"] = title
760
+ if body_format:
761
+ params["body-format"] = body_format
762
+
763
+ _all_pages = []
764
+ try:
765
+ while True:
766
+ response = self.get(path, params=params)
767
+
768
+ pages = response.get("results")
769
+ _all_pages = _all_pages + pages
770
+
771
+ links = response.get("_links")
772
+ if links is not None and "next" in links:
773
+ path = response["_links"]["next"].removeprefix("/wiki/")
774
+ params = {}
775
+ else:
776
+ break
777
+ except HTTPError as e:
778
+ if e.response.status_code == 400:
779
+ raise ApiValueError(
780
+ "The configured params cannot be interpreted by Confluence"
781
+ "Check the api documentation for valid values for status, expand, and sort params",
782
+ reason=e,
783
+ )
784
+ if e.response.status_code == 401:
785
+ raise HTTPError("Unauthorized (401)", response=response)
786
+ raise
787
+
788
+ return _all_pages
789
+
692
790
  @deprecated(version="2.4.2", reason="Use get_all_restrictions_for_content()")
693
791
  def get_all_restictions_for_content(self, content_id):
694
792
  """Let's use the get_all_restrictions_for_content()"""
695
- log.warning("Please, be informed that is deprecated as typo naming")
696
793
  return self.get_all_restrictions_for_content(content_id=content_id)
697
794
 
698
795
  def get_all_restrictions_for_content(self, content_id):
@@ -793,6 +890,7 @@ class Confluence(AtlassianRestAPI):
793
890
  representation="storage",
794
891
  editor=None,
795
892
  full_width=False,
893
+ status="current",
796
894
  ):
797
895
  """
798
896
  Create page from scratch
@@ -804,6 +902,7 @@ class Confluence(AtlassianRestAPI):
804
902
  :param representation: OPTIONAL: either Confluence 'storage' or 'wiki' markup format
805
903
  :param editor: OPTIONAL: v2 to be created in the new editor
806
904
  :param full_width: DEFAULT: False
905
+ :param status: either 'current' or 'draft'
807
906
  :return:
808
907
  """
809
908
  log.info('Creating %s "%s" -> "%s"', type, space, title)
@@ -811,6 +910,7 @@ class Confluence(AtlassianRestAPI):
811
910
  data = {
812
911
  "type": type,
813
912
  "title": title,
913
+ "status": status,
814
914
  "space": {"key": space},
815
915
  "body": self._create_body(body, representation),
816
916
  "metadata": {"properties": {}},
@@ -1211,7 +1311,8 @@ class Confluence(AtlassianRestAPI):
1211
1311
  :type name: ``str``
1212
1312
  :param content: Contains the content which should be uploaded
1213
1313
  :type content: ``binary``
1214
- :param content_type: Specify the HTTP content type. The default is
1314
+ :param content_type: Specify the HTTP content type.
1315
+ The default is "application/binary"
1215
1316
  :type content_type: ``str``
1216
1317
  :param comment: A comment describing this upload/file
1217
1318
  :type comment: ``str``
@@ -1293,6 +1394,7 @@ class Confluence(AtlassianRestAPI):
1293
1394
  Is no name give the file name is used as name
1294
1395
  :type name: ``str``
1295
1396
  :param content_type: Specify the HTTP content type. The default is
1397
+ The default is "application/binary"
1296
1398
  :type content_type: ``str``
1297
1399
  :param comment: A comment describing this upload/file
1298
1400
  :type comment: ``str``
@@ -1316,40 +1418,83 @@ class Confluence(AtlassianRestAPI):
1316
1418
  comment=comment,
1317
1419
  )
1318
1420
 
1319
- def download_attachments_from_page(self, page_id, path=None, start=0, limit=50):
1320
- """
1321
- Downloads all attachments from a page
1322
- :param page_id:
1323
- :param path: OPTIONAL: path to directory where attachments will be saved. If None, current working directory will be used.
1324
- :param start: OPTIONAL: The start point of the collection to return. Default: None (0).
1325
- :param limit: OPTIONAL: The limit of the number of attachments to return, this may be restricted by
1326
- fixed system limits. Default: 50
1327
- :return info message: number of saved attachments + path to directory where attachments were saved:
1328
- """
1329
- if path is None:
1421
+ def download_attachments_from_page(self, page_id, path=None, start=0, limit=50, filename=None, to_memory=False):
1422
+ """
1423
+ Downloads attachments from a Confluence page. Supports downloading all files or a specific file.
1424
+ Files can either be saved to disk or returned as BytesIO objects for in-memory handling.
1425
+
1426
+ :param page_id: str
1427
+ The ID of the Confluence page to fetch attachments from.
1428
+ :param path: str, optional
1429
+ Directory where attachments will be saved. If None, defaults to the current working directory.
1430
+ Ignored if `to_memory` is True.
1431
+ :param start: int, optional
1432
+ The start point for paginated attachment fetching. Default is 0. Ignored if `filename` is specified.
1433
+ :param limit: int, optional
1434
+ The maximum number of attachments to fetch per request. Default is 50. Ignored if `filename` is specified.
1435
+ :param filename: str, optional
1436
+ The name of a specific file to download. If provided, only this file will be fetched.
1437
+ :param to_memory: bool, optional
1438
+ If True, attachments are returned as a dictionary of {filename: BytesIO object}.
1439
+ If False, files are written to the specified directory on disk.
1440
+ :return:
1441
+ - If `to_memory` is True, returns a dictionary {filename: BytesIO object}.
1442
+ - If `to_memory` is False, returns a summary dict: {"attachments_downloaded": int, "path": str}.
1443
+ :raises:
1444
+ - FileNotFoundError: If the specified path does not exist.
1445
+ - PermissionError: If there are permission issues with the specified path.
1446
+ - requests.HTTPError: If the HTTP request to fetch an attachment fails.
1447
+ - Exception: For any unexpected errors.
1448
+ """
1449
+ # Default path to current working directory if not provided
1450
+ if not to_memory and path is None:
1330
1451
  path = os.getcwd()
1452
+
1331
1453
  try:
1332
- attachments = self.get_attachments_from_content(page_id=page_id, start=start, limit=limit)["results"]
1333
- if not attachments:
1334
- return "No attachments found"
1454
+ # Fetch attachments based on the specified parameters
1455
+ if filename:
1456
+ # Fetch specific file by filename
1457
+ attachments = self.get_attachments_from_content(page_id=page_id, filename=filename)["results"]
1458
+ if not attachments:
1459
+ return "No attachment with filename '{0}' found on the page.".format(filename)
1460
+ else:
1461
+ # Fetch all attachments with pagination
1462
+ attachments = self.get_attachments_from_content(page_id=page_id, start=start, limit=limit)["results"]
1463
+ if not attachments:
1464
+ return "No attachments found on the page."
1465
+
1466
+ # Prepare to handle downloads
1467
+ downloaded_files = {}
1335
1468
  for attachment in attachments:
1336
- file_name = attachment["title"]
1337
- if not file_name:
1338
- file_name = attachment["id"] # if the attachment has no title, use attachment_id as a filename
1469
+ file_name = attachment["title"] or attachment["id"] # Use attachment ID if title is unavailable
1339
1470
  download_link = self.url + attachment["_links"]["download"]
1340
- r = self._session.get(f"{download_link}")
1341
- file_path = os.path.join(path, file_name)
1342
- with open(file_path, "wb") as f:
1343
- f.write(r.content)
1471
+ # Fetch the file content
1472
+ response = self._session.get(str(download_link))
1473
+ response.raise_for_status() # Raise error if request fails
1474
+
1475
+ if to_memory:
1476
+ # Store in BytesIO object
1477
+ file_obj = io.BytesIO(response.content)
1478
+ downloaded_files[file_name] = file_obj
1479
+ else:
1480
+ # Save file to disk
1481
+ file_path = os.path.join(path, file_name)
1482
+ with open(file_path, "wb") as file:
1483
+ file.write(response.content)
1484
+
1485
+ # Return results based on storage mode
1486
+ if to_memory:
1487
+ return downloaded_files
1488
+ else:
1489
+ return {"attachments_downloaded": len(attachments), "path": path}
1344
1490
  except NotADirectoryError:
1345
- raise NotADirectoryError("Verify if directory path is correct and/or if directory exists")
1491
+ raise FileNotFoundError("The directory '{path}' does not exist.".format(path=path))
1346
1492
  except PermissionError:
1347
- raise PermissionError(
1348
- "Directory found, but there is a problem with saving file to this directory. Check directory permissions"
1349
- )
1350
- except Exception as e:
1351
- raise e
1352
- return {"attachments downloaded": len(attachments), " to path ": path}
1493
+ raise PermissionError("Permission denied when trying to save files to '{path}'.".format(path=path))
1494
+ except requests.HTTPError as http_err:
1495
+ raise Exception("HTTP error occurred while downloading attachments: {http_err}".format(http_err=http_err))
1496
+ except Exception as err:
1497
+ raise Exception("An unexpected error occurred: {error}".format(error=err))
1353
1498
 
1354
1499
  def delete_attachment(self, page_id, filename, version=None):
1355
1500
  """
@@ -1375,9 +1520,11 @@ class Confluence(AtlassianRestAPI):
1375
1520
  :param version: file version
1376
1521
  :return:
1377
1522
  """
1378
- return self.delete(
1379
- "rest/experimental/content/{id}/version/{versionId}".format(id=attachment_id, versionId=version)
1380
- )
1523
+ if self.cloud:
1524
+ url = "rest/api/content/{id}/version/{versionId}".format(id=attachment_id, versionId=version)
1525
+ else:
1526
+ url = "rest/experimental/content/{id}/version/{versionId}".format(id=attachment_id, versionId=version)
1527
+ return self.delete(url)
1381
1528
 
1382
1529
  def remove_page_attachment_keep_version(self, page_id, filename, keep_last_versions):
1383
1530
  """
@@ -1414,7 +1561,10 @@ class Confluence(AtlassianRestAPI):
1414
1561
  :return
1415
1562
  """
1416
1563
  params = {"limit": limit, "start": start}
1417
- url = "rest/experimental/content/{}/version".format(attachment_id)
1564
+ if self.cloud:
1565
+ url = "rest/api/content/{id}/version".format(id=attachment_id)
1566
+ else:
1567
+ url = "rest/experimental/content/{id}/version".format(id=attachment_id)
1418
1568
  return (self.get(url, params=params) or {}).get("results")
1419
1569
 
1420
1570
  # @todo prepare more attachments info
@@ -2209,7 +2359,7 @@ class Confluence(AtlassianRestAPI):
2209
2359
  :param name: str
2210
2360
  :return:
2211
2361
  """
2212
- log.warning("Removing group...")
2362
+ log.info("Removing group: %s during Confluence remove_group method execution", name)
2213
2363
  url = "rest/api/admin/group/{groupName}".format(groupName=name)
2214
2364
 
2215
2365
  try:
@@ -2582,6 +2732,111 @@ class Confluence(AtlassianRestAPI):
2582
2732
  url = "exportword?pageId={pageId}".format(pageId=page_id)
2583
2733
  return self.get(url, headers=headers, not_json_response=True)
2584
2734
 
2735
+ def get_space_export(self, space_key: str, export_type: str) -> str:
2736
+ """
2737
+ Export a Confluence space to a file of the specified type.
2738
+ (!) This method was developed for Confluence Cloud and may not work with Confluence on-prem.
2739
+ (!) This is an experimental method that does not trigger an officially supported REST endpoint. It may break if Atlassian changes the space export front-end logic.
2740
+
2741
+ :param space_key: The key of the space to export.
2742
+ :param export_type: The type of export to perform. Valid values are: 'html', 'csv', 'xml', 'pdf'.
2743
+ :return: The URL to download the exported file.
2744
+ """
2745
+
2746
+ def get_atl_request(url: str):
2747
+ # Nested function used to get atl_token used for XSRF protection. this is only applicable to html/csv/xml space exports
2748
+ try:
2749
+ response = self.get(url, advanced_mode=True)
2750
+ parsed_html = BeautifulSoup(response.text, "html.parser")
2751
+ atl_token = parsed_html.find("input", {"name": "atl_token"}).get("value")
2752
+ return atl_token
2753
+ except Exception as e:
2754
+ raise ApiError("Problems with getting the atl_token for get_space_export method :", reason=e)
2755
+
2756
+ # Checks if space_ke parameter is valid and if api_token has relevant permissions to space
2757
+ self.get_space(space_key=space_key, expand="permissions")
2758
+
2759
+ try:
2760
+ log.info(
2761
+ "Initiated experimental get_space_export method for export type: "
2762
+ + export_type
2763
+ + " from Confluence space: "
2764
+ + space_key
2765
+ )
2766
+ if export_type == "csv":
2767
+ form_data = {
2768
+ "atl_token": get_atl_request(
2769
+ "spaces/exportspacecsv.action?key={space_key}".format(space_key=space_key)
2770
+ ),
2771
+ "exportType": "TYPE_CSV",
2772
+ "contentOption": "all",
2773
+ "includeComments": "true",
2774
+ "confirm": "Export",
2775
+ }
2776
+ elif export_type == "html":
2777
+ form_data = {
2778
+ "atl_token": get_atl_request(
2779
+ "spaces/exportspacehtml.action?key={space_key}".format(space_key=space_key)
2780
+ ),
2781
+ "exportType": "TYPE_HTML",
2782
+ "contentOption": "visibleOnly",
2783
+ "includeComments": "true",
2784
+ "confirm": "Export",
2785
+ }
2786
+ elif export_type == "xml":
2787
+ form_data = {
2788
+ "atl_token": get_atl_request(
2789
+ "spaces/exportspacexml.action?key={space_key}".format(space_key=space_key)
2790
+ ),
2791
+ "exportType": "TYPE_XML",
2792
+ "contentOption": "all",
2793
+ "includeComments": "true",
2794
+ "confirm": "Export",
2795
+ }
2796
+ elif export_type == "pdf":
2797
+ url = "spaces/flyingpdf/doflyingpdf.action?key=" + space_key
2798
+ log.info("Initiated PDF space export")
2799
+ return self.get_pdf_download_url_for_confluence_cloud(url)
2800
+ else:
2801
+ raise ValueError("Invalid export_type parameter value. Valid values are: 'html/csv/xml/pdf'")
2802
+ url = self.url_joiner(
2803
+ url=self.url, path="spaces/doexportspace.action?key={space_key}".format(space_key=space_key)
2804
+ )
2805
+
2806
+ # Sending a POST request that triggers the space export.
2807
+ response = self.session.post(url, headers=self.form_token_headers, data=form_data)
2808
+ parsed_html = BeautifulSoup(response.text, "html.parser")
2809
+ # Getting the poll URL to get the export progress status
2810
+ try:
2811
+ poll_url = parsed_html.find("meta", {"name": "ajs-pollURI"}).get("content")
2812
+ except Exception as e:
2813
+ raise ApiError("Problems with getting the poll_url for get_space_export method :", reason=e)
2814
+ running_task = True
2815
+ while running_task:
2816
+ try:
2817
+ progress_response = self.get(poll_url)
2818
+ log.info("Space" + space_key + " export status: " + progress_response["message"])
2819
+ if progress_response["complete"]:
2820
+ parsed_html = BeautifulSoup(progress_response["message"], "html.parser")
2821
+ download_url = parsed_html.find("a", {"class": "space-export-download-path"}).get("href")
2822
+ if self.url in download_url:
2823
+ return download_url
2824
+ else:
2825
+ combined_url = self.url + download_url
2826
+ # Ensure only one /wiki is included in the path
2827
+ if combined_url.count("/wiki") > 1:
2828
+ combined_url = combined_url.replace("/wiki/wiki", "/wiki")
2829
+ return combined_url
2830
+ time.sleep(30)
2831
+ except Exception as e:
2832
+ raise ApiError(
2833
+ "Encountered error during space export status check from space " + space_key, reason=e
2834
+ )
2835
+
2836
+ return "None" # Return None if the while loop does not return a value
2837
+ except Exception as e:
2838
+ raise ApiError("Encountered error during space export from space " + space_key, reason=e)
2839
+
2585
2840
  def export_page(self, page_id):
2586
2841
  """
2587
2842
  Alias method for export page as pdf
@@ -2830,6 +3085,7 @@ class Confluence(AtlassianRestAPI):
2830
3085
  and provides a link to download the PDF once the process completes.
2831
3086
  This functions polls the long-running task page and returns the
2832
3087
  download url of the PDF.
3088
+ This method is used in get_space_export() method for space-> PDF export.
2833
3089
  :param url: URL to initiate PDF export
2834
3090
  :return: Download url for PDF file
2835
3091
  """
@@ -2919,7 +3175,7 @@ class Confluence(AtlassianRestAPI):
2919
3175
 
2920
3176
  def get_whiteboard(self, whiteboard_id):
2921
3177
  try:
2922
- url = f"/api/v2/whiteboards/{whiteboard_id}"
3178
+ url = "/api/v2/whiteboards/%s" % (whiteboard_id)
2923
3179
  return self.get(url)
2924
3180
  except HTTPError as e:
2925
3181
  # Default 404 error handling is ambiguous
@@ -2932,7 +3188,7 @@ class Confluence(AtlassianRestAPI):
2932
3188
 
2933
3189
  def delete_whiteboard(self, whiteboard_id):
2934
3190
  try:
2935
- url = f"/api/v2/whiteboards/{whiteboard_id}"
3191
+ url = "/api/v2/whiteboards/%s" % (whiteboard_id)
2936
3192
  return self.delete(url)
2937
3193
  except HTTPError as e:
2938
3194
  # # Default 404 error handling is ambiguous
@@ -3068,7 +3324,7 @@ class Confluence(AtlassianRestAPI):
3068
3324
  :param group_name: str - name of group to add user to
3069
3325
  :return: Current state of the group
3070
3326
  """
3071
- url = f"rest/api/user/{username}/group/{group_name}"
3327
+ url = "rest/api/user/%s/group/%s" % (username, group_name)
3072
3328
  return self.put(url)
3073
3329
 
3074
3330
  def add_space_permissions(