### Get Bitbucket Project List Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/README.rst Example of fetching a list of projects from Bitbucket using the Bitbucket module. ```python from atlassian import Bitbucket import requests session= requests.Session() bitbucket = Bitbucket( url='http://localhost:7990', username='admin', password='admin', session=session) data = bitbucket.project_list() print(data) ``` -------------------------------- ### Run Atlassian Standalone Product in Docker Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/CONTRIBUTING.rst Run an Atlassian standalone product using the Docker image. This example starts Bamboo. ```bash docker run -i -t -p 6990:6990 atlassian-sdk:latest atlas-run-standalone --product bamboo ``` -------------------------------- ### Install from Git Repository Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/CONTRIBUTING.rst Install the library directly from a Git repository, useful for testing unmerged changes. ```bash python3 -m pip install git+https://github.com/atlassian-api/atlassian-python-api.git ``` -------------------------------- ### Tempo Planner API: Get, Create, and Get Assignments Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/tempo.md Provides examples for the Tempo Planner API, covering retrieval of all plans, creation of a new plan, and fetching assignments for a specific plan. Requires plan_id for assignments. ```python from atlassian.tempo import TempoServerPlanner planner_client = TempoServerPlanner( url="https://your-tempo-server.com", token="your-tempo-api-token" ) # Get all plans plans = planner_client.get_plans() # Create new plan new_plan = planner_client.create_plan({ "name": "New Plan", "description": "Plan description" }) # Get plan assignments assignments = planner_client.get_plan_assignments(plan_id) ``` -------------------------------- ### Run Confluence Server Example Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/examples/confluence/README.md Navigate to the server examples directory and execute the Python script. Ensure your Confluence Server URL, username, and password are configured in the script. ```bash cd examples/confluence/server python confluence_server_content_management.py ``` -------------------------------- ### Run Confluence Cloud Example Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/examples/confluence/README.md Navigate to the cloud examples directory and execute the Python script. Ensure your Confluence Cloud URL and API token are configured in the script. ```bash cd examples/confluence/cloud python confluence_cloud_content_management.py ``` -------------------------------- ### Install atlassian-python-api via pip Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/README.rst Install the library from PyPI using pip. ```console $ pip install atlassian-python-api ``` -------------------------------- ### Install Development Requirements Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/CONTRIBUTING.rst Install development dependencies, including Kerberos, using the provided requirements file. ```bash pip install -r requirements-dev.txt ``` -------------------------------- ### Install Local Changes Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/CONTRIBUTING.rst Install your local changes to the library into the global Python environment for testing. ```bash pip install . --upgrade ``` -------------------------------- ### Get Service Desk Customer Requests Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/README.rst Example of retrieving customer requests from Jira Service Desk using the ServiceDesk module. ```python from atlassian import ServiceDesk import requests sd = ServiceDesk( url='http://localhost:7990', username='admin', password='admin', session=requests.Session()) data = sd.get_my_customer_requests() print(data) ``` -------------------------------- ### Tempo Servlet API: Worklogs Operations Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/tempo.md Provides examples for the Tempo Servlet API, focusing on worklog management. Includes getting all worklogs, creating a new worklog, and managing worklog attributes. Requires worklog_id for attribute operations. ```python from atlassian.tempo import TempoServerServlet servlet_client = TempoServerServlet( url="https://your-tempo-server.com", token="your-tempo-api-token" ) # Get all worklogs worklogs = servlet_client.get_worklogs() # Create new worklog new_worklog = servlet_client.create_worklog({ "issueKey": "TEST-1", "timeSpentSeconds": 3600 }) # Get worklog attributes attributes = servlet_client.get_worklog_attributes(worklog_id) # Update worklog attributes servlet_client.update_worklog_attributes(worklog_id, { "attribute1": "value1" }) ``` -------------------------------- ### Tempo Budgets API: Get, Create, and Get Allocations Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/tempo.md Illustrates usage of the Tempo Budgets API for retrieving all budgets, creating a new budget, and fetching allocations for a specific budget. Requires budget_id for allocations. ```python from atlassian.tempo import TempoServerBudgets budgets_client = TempoServerBudgets( url="https://your-tempo-server.com", token="your-tempo-api-token" ) # Get all budgets budgets = budgets_client.get_budgets() # Create new budget new_budget = budgets_client.create_budget({ "name": "New Budget", "amount": 10000 }) # Get budget allocations allocations = budgets_client.get_budget_allocations(budget_id) ``` -------------------------------- ### Get Jira Issues using enhanced_jql (Cloud) Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/README.rst Example of retrieving Jira issues using the enhanced_jql method for Jira Cloud. This method uses nextPageToken for pagination, which is recommended for Cloud instances. ```python from atlassian import Jira import requests session = requests.Session() jira = Jira( url='https://your-jira-instance.atlassian.net', username='your-email@example.com', password='your-api-token', cloud=True, # Ensure this is set to True for Jira Cloud session=session # Optional: use a session for persistent connections ) JQL = 'project = DEMO AND status IN ("To Do", "In Progress") ORDER BY issuekey' # Fetch issues using the new enhanced_jql method data = jira.enhanced_jql(JQL) print(data) ``` -------------------------------- ### Get Jira Issues using JQL (Server) Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/README.rst Example of retrieving Jira issues using a JQL query with the Jira module. This is suitable for Jira Server instances. ```python from atlassian import Jira import requests session = requests.Session() jira = Jira( url='http://localhost:8080', username='admin', password='admin', session=session) # Optional: use a session for persistent connections JQL = 'project = DEMO AND status IN ("To Do", "In Progress") ORDER BY issuekey' data = jira.jql(JQL) print(data) ``` -------------------------------- ### Get Project Permission Scheme Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves the permission scheme associated with a project. Use 'expand' to get detailed information. ```python # Get project permission scheme # Use 'expand' to get details (default is None) jira.get_project_permission_scheme(project_id_or_key, expand='permissions,user,group,projectRole,field,all') ``` -------------------------------- ### Get All Groups Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/confluence.md Retrieves all groups from Confluence User management, with options for start and limit. ```python # Get all groups from Confluence User management confluence.get_all_groups(start=0, limit=1000) ``` -------------------------------- ### Get Insight Object Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/README.rst Example of retrieving an object from Insight (CMDB Tool for Jira) using the Insight module. ```python from atlassian import Insight import requests session = requests.Session() insight = Insight( url='http://localhost:7990', username='admin', password='admin', session=session) data = insight.get_object(88) print(data) ``` -------------------------------- ### Confluence Cloud and Server Initialization Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/confluence.md Demonstrates how to initialize Confluence Cloud and Confluence Server clients using their respective authentication methods. ```APIDOC ## Initialization ### Confluence Cloud ```python from atlassian.confluence import ConfluenceCloud confluence_cloud = ConfluenceCloud( url="https://your-domain.atlassian.net", token="your-api-token" ) ``` ### Confluence Server ```python from atlassian.confluence import ConfluenceServer confluence_server = ConfluenceServer( url="https://your-confluence-server.com", username="your-username", password="your-password" ) ``` ``` -------------------------------- ### Initialize Tempo Cloud Client Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/tempo.md Initialize the Tempo Cloud client with your domain and API token. Ensure 'cloud=True' is set. ```python tempo = TempoCloud( url="https://your-domain.atlassian.net", token="your-tempo-api-token", cloud=True ) ``` -------------------------------- ### Manage Bitbucket Pipelines Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/bitbucket.md Examples for retrieving pipeline results, triggering pipelines on different branches or revisions, and managing specific pipelines and their steps. ```python bitbucket.get_pipelines(workspace, repository) ``` ```python bitbucket.trigger_pipeline(workspace, repository) ``` ```python bitbucket.trigger_pipeline(workspace, repository, branch="develop") ``` ```python bitbucket.trigger_pipeline(workspace, repository, branch="develop", revision="<40-char hash>") ``` ```python bitbucket.trigger_pipeline(workspace, repository, revision="<40-char hash>", name="style-check") ``` ```python bitbucket.get_pipeline(workspace, repository, "{7d6c327d-6336-4721-bfeb-c24caf25045c}") ``` ```python bitbucket.stop_pipeline(workspace, repository, "{7d6c327d-6336-4721-bfeb-c24caf25045c}") ``` ```python bitbucket.get_pipeline_steps(workspace, repository, "{7d6c327d-6336-4721-bfeb-c24caf25045c}") ``` ```python bitbucket.get_pipeline_step(workspace, repository, "{7d6c327d-6336-4721-bfeb-c24caf25045c}", "{56d2d8af-6526-4813-a22c-733ec6ecabf3}") ``` ```python bitbucket.get_pipeline_step_log(workspace, repository, "{7d6c327d-6336-4721-bfeb-c24caf25045c}", "{56d2d8af-6526-4813-a22c-733ec6ecabf3}") ``` -------------------------------- ### Get Approvals for a Request Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/service_desk.md Retrieves a paginated list of approvals associated with a specific request ID or key. Use 'start' and 'limit' for pagination. ```python sd.get_approvals(issue_id_or_key, start=0, limit=50) ``` -------------------------------- ### Initialize Xray Module Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/README.rst Example of initializing the Xray module for interacting with the Xray Test Management tool for Jira. ```python from atlassian import Xray import requests session = requests.Session() xr = Xray( ``` -------------------------------- ### Get Space Content Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/confluence.md Retrieves content for a given space, with options to specify depth, start, limit, content type, and expand properties like body storage. ```python confluence.get_space_content(space_key, depth="all", start=0, limit=500, content_type=None, expand="body.storage") ``` -------------------------------- ### Initialize Jira, Confluence, and Service Desk Clients Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/index.md Instantiate clients for Jira, Confluence, and Service Desk. Use your Atlassian domain, username, and API token for cloud instances. Ensure you are using an API token, not your regular password. ```python jira = Jira( url='https://your-domain.atlassian.net', username=atlassian_username, password=atlassian_api_token, cloud=True) confluence = Confluence( url='https://your-domain.atlassian.net', username=atlassian_username, password=atlassian_api_token, cloud=True) service_desk = ServiceDesk( url='https://your-domain.atlassian.net', username=atlassian_username, password=atlassian_api_token, cloud=True) ``` -------------------------------- ### Get All Project Issues Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves all issues for a project with specified fields and pagination. ```python # Get all project issues jira.get_all_project_issues(project, fields='*all', start=100, limit=500) ``` -------------------------------- ### Get Queue Settings Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/service_desk.md Retrieves the settings for a specific queue within a project. ```APIDOC ## Get Queue Settings ### Description Retrieves queue settings on a project. ### Method GET (implied) ### Endpoint `/rest/servicedeskapi/queues/settings/{project_key}` (implied) ### Parameters #### Path Parameters - **project_key** (string) - Required - The key of the project. ``` -------------------------------- ### Initialize Tempo Server Client Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/tempo.md Basic initialization of the Tempo Server client. Ensure the URL and token are correctly set for your Tempo instance. Set cloud=False for self-hosted instances. ```python tempo = TempoServer( url="https://your-tempo-server.com", token="your-tempo-api-token", cloud=False ) ``` -------------------------------- ### Initialize Confluence Cloud and Server Clients Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/confluence.md Instantiate Confluence Cloud and Server clients using their respective URLs and authentication credentials. Use API tokens for Cloud and username/password for Server. ```python from atlassian.confluence import ConfluenceCloud, ConfluenceServer # For Confluence Cloud confluence_cloud = ConfluenceCloud( url="https://your-domain.atlassian.net", token="your-api-token" ) # For Confluence Server confluence_server = ConfluenceServer( url="https://your-confluence-server.com", username="your-username", password="your-password" ) ``` -------------------------------- ### Manage Bitbucket Issues (Object-Oriented) Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/bitbucket.md Examples for managing issues using an object-oriented approach, including fetching, creating, updating, and deleting issues. ```python # Get the repository first r = cloud.workspaces.get(workspace).repositories.get(repository) ``` ```python # Get all tracked issues r.issues.each() ``` ```python # Get all unassigned issues and sort them by priority r.issues.get(sort_by="priority", query='assignee = null') ``` ```python # Create a new issue of kind 'enhancement' and priority 'minor' r.issues.create("New idea", "How about this", kind="enhancement", priority="minor") ``` ```python # Update the 'priority' field of the issue 42 r.issues.get(42).priority = "blocker" ``` ```python # Mark issue 42 as resolved r.issues.get(42).state = "resolved" ``` ```python # Get information about issue 1 i = r.issues.get(1) ``` ```python # Delete issue 123 r.issues.get(123).delete() ``` -------------------------------- ### Get Jira Cluster Nodes Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieve all nodes in the Jira cluster. Use this to get an overview of the cluster's current state. ```python jira.get_cluster_all_nodes() ``` -------------------------------- ### TempoCloud Initialization Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/tempo.md Initialize the Tempo Cloud client with your Atlassian domain and API token. ```APIDOC ## TempoCloud Initialization ### Description Initialize the Tempo Cloud client with your Atlassian domain and API token. ### Method ```python TempoCloud(url: str, token: str, cloud: bool = True) ``` ### Parameters - **url** (str) - Required - The URL of your Tempo Cloud instance (e.g., "https://your-domain.atlassian.net"). - **token** (str) - Required - Your Tempo Cloud API token. - **cloud** (bool) - Optional - Set to True for Tempo Cloud instances. Defaults to True. ### Request Example ```python from atlassian import TempoCloud tempo = TempoCloud( url="https://your-domain.atlassian.net", token="your-tempo-api-token", cloud=True ) ``` ``` -------------------------------- ### Get Project Issue Security Scheme Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves the issue security scheme for a project. Requires administrator permissions. Set 'only_levels=True' to get only the levels entries. ```python # Get the issue security scheme for project. # Returned if the user has the administrator permission or if the scheme is used in a project in which the # user has the administrative permission. # Use only_levels=True for get the only levels entries jira.get_project_issue_security_scheme(project_id_or_key, only_levels=False) ``` -------------------------------- ### Connect to Atlassian Products with Username/Password Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/index.md Instantiate clients for various Atlassian products using basic authentication. Ensure the correct URL and credentials are provided for each service. ```python from atlassian import Jira from atlassian import Confluence from atlassian import Crowd from atlassian import Bitbucket from atlassian import ServiceDesk from atlassian import Xray jira = Jira( url='http://localhost:8080', username='admin', password='admin') confluence = Confluence( url='http://localhost:8090', username='admin', password='admin') crowd = Crowd( url='http://localhost:4990', username='app-name', password='app-password' ) bitbucket = Bitbucket( url='http://localhost:7990', username='admin', password='admin') service_desk = ServiceDesk( url='http://localhost:8080', username='admin', password='admin') xray = Xray( url='http://localhost:8080', username='admin', password='admin') ``` -------------------------------- ### Retrieve Build and Deployment Queues Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/bamboo.md Fetch information about the build and deployment queues. The 'expand' parameter can be used to include specific details. ```python get_build_queue(expand='queuedBuilds') ``` ```python get_deployment_queue(expand='queuedDeployments') ``` -------------------------------- ### Connect to Atlassian Products with Kerberos Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/index.md Establish connections using Kerberos authentication. Requires installation with the 'kerberos' extra. ```python jira = Jira( url='http://localhost:8080', kerberos={}) confluence = Confluence( url='http://localhost:8090', kerberos={}) bitbucket = Bitbucket( url='http://localhost:7990', kerberos={}) service_desk = ServiceDesk( url='http://localhost:8080', kerberos={}) xray = Xray( url='http://localhost:8080', kerberos={}) ``` -------------------------------- ### Get Component Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves a component by its ID. ```APIDOC ## Get Component ### Description Retrieves a component by its ID. ### Method `jira.component(component_id)` ### Parameters * **component_id** (string) - Required - The ID of the component. ``` -------------------------------- ### Configure Tempo Cloud Client Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/tempo.md Instantiate the TempoCloud client with various configuration options including URL, API token, SSL verification, proxies, and retry settings. ```python tempo = TempoCloud( url="https://your-domain.atlassian.net", token="your-tempo-api-token", cloud=True, timeout=75, verify_ssl=True, proxies={"http": "http://proxy:8080"}, backoff_and_retry=True, max_backoff_retries=1000 ) ``` -------------------------------- ### Get Dashboard Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves a dashboard by its ID. ```APIDOC ## Get Dashboard ### Description Retrieves a dashboard by its ID. ### Method `jira.get_dashboard(dashboard_id)` ### Parameters * **dashboard_id** (string) - Required - The ID of the dashboard. ``` -------------------------------- ### Manage Bitbucket Issues (Function-Oriented) Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/bitbucket.md Examples for managing issues using a function-oriented approach, including fetching, creating, updating, and deleting issues. ```python # Get all tracked issues bitbucket.get_issues(workspace, repository) ``` ```python # Get all unassigned issues and sort them by priority bitbucket.get_issues(workspace, repository, sort_by="priority", query='assignee = null') ``` ```python # Create a new issue bitbucket.create_issue(workspace, repository, "The title", "The description") ``` ```python # Create a new issue of kind 'enhancement' and priority 'minor' bitbucket.create_issue(workspace, repository, "New idea", "How about this", kind="enhancement", priority="minor") ``` ```python # Update the 'priority' field of the issue 42 bitbucket.update_issue(workspace, repository, 42, priority="blocker") ``` ```python # Mark issue 42 as resolved bitbucket.update_issue(workspace, repository, 42, state="resolved") ``` ```python # Get information about issue 1 bitbucket.get_issue(workspace, repository, 1) ``` ```python # Delete issue 123 bitbucket.delete_issue(workspace, repository, 123) ``` -------------------------------- ### Get Project Leaders Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves the leaders of a project. ```APIDOC ## GET Project Leaders ### Description Retrieves the leaders associated with a Jira project. ### Method GET ### Endpoint `/jira/project/leaders` ### Parameters No parameters required. ``` -------------------------------- ### Build Atlassian SDK Docker Image Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/CONTRIBUTING.rst Build the Docker image for running an Atlassian standalone product. ```bash make docker-atlassian-standalone ``` -------------------------------- ### Tempo Server Initialization Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/tempo.md Initializes the base Tempo Server client for self-hosted instances. ```APIDOC ## Initialize Tempo Server Client ### Description Initializes the base Tempo Server client for self-hosted Tempo instances. ### Usage ```python from atlassian.tempo import TempoServer tempo = TempoServer( url="https://your-tempo-server.com", token="your-tempo-api-token", cloud=False ) ``` ### Parameters - **url** (str) - Required - The URL of your Tempo Server instance. - **token** (str) - Required - Your API token for authentication. - **cloud** (bool) - Required - Set to `False` for self-hosted instances. ``` -------------------------------- ### Get Project Leaders Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves the leaders of a project. ```python # Get project leaders jira.project_leaders() ``` -------------------------------- ### Get Agile Board Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves an agile board by its ID. ```APIDOC ## Get Agile Board ### Description Retrieves an agile board by its ID. ### Method `jira.get_agile_board(board_id)` ### Parameters * **board_id** (string) - Required - The ID of the board. ``` -------------------------------- ### Import Tempo API Clients Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/tempo.md Import the necessary Tempo client classes for cloud and server instances. ```python from atlassian import TempoCloud, TempoServer ``` -------------------------------- ### Get Issue Comments Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves all comments for a Jira issue. ```APIDOC ## Get Issue Comments ### Description Retrieves all comments for a Jira issue. ### Method `jira.issue_get_comments(issue_id_or_key)` ### Parameters - **issue_id_or_key** (string) - Required - The ID or key of the issue. ``` -------------------------------- ### Build and Upload Package to PIP Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/CONTRIBUTING.rst Build a source distribution of the package and upload it to the PIP repository. ```bash python setup.py sdist upload ``` -------------------------------- ### Manage Plugins Information and Licenses Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/bamboo.md Retrieve information about installed plugins, their licenses, and manage plugin status (enable/disable/uninstall). ```python get_plugins_info() ``` ```python get_plugin_info(plugin_key) ``` ```python get_plugin_license_info(plugin_key) ``` ```python disable_plugin(plugin_key) ``` ```python enable_plugin(plugin_key) ``` ```python delete_plugin(plugin_key) ``` ```python get_plugin_module_info(plugin_key, module_key) ``` ```python update_plugin_license(plugin_key, raw_license) ``` -------------------------------- ### Get All Groups Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/confluence.md Retrieves all groups from Confluence User management. ```APIDOC ## Get All Groups ### Description Retrieves all groups from Confluence User management. ### Method Signature `confluence.get_all_groups(start=0, limit=1000)` ### Parameters - **start** (integer) - Optional - The starting index for pagination. Defaults to 0. - **limit** (integer) - Optional - The maximum number of groups to return. Defaults to 1000. ``` -------------------------------- ### Tempo Events API: Events and Subscriptions Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/tempo.md Demonstrates interaction with the Tempo Events API for managing events and subscriptions. Includes fetching events, creating new events, retrieving subscriptions, and creating new subscriptions. Requires event and subscription details for creation. ```python from atlassian.tempo import TempoServerEvents events_client = TempoServerEvents( url="https://your-tempo-server.com", token="your-tempo-api-token" ) # Get all events events = events_client.get_events() # Create new event new_event = events_client.create_event({ "type": "worklog_created", "data": {"worklogId": 1} }) # Get event subscriptions subscriptions = events_client.get_event_subscriptions() # Create event subscription new_subscription = events_client.create_event_subscription({ "eventType": "worklog_created", "url": "https://webhook.url" }) ``` -------------------------------- ### Get Whiteboard Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/confluence.md Retrieves a whiteboard by its ID in Confluence Cloud. ```APIDOC ## Get Whiteboard ### Description Retrieves a whiteboard by its ID in Confluence Cloud. ### Method Signature `confluence.get_whiteboard(whiteboard_id)` ### Parameters - **whiteboard_id** (str) - The ID of the whiteboard to retrieve. ``` -------------------------------- ### Build and Upload Package using build and twine Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/CONTRIBUTING.rst An alternative method to build a package and upload it to PIP using the 'build' and 'twine' tools. ```bash python -m pip install build twine ``` ```bash python -m build ``` ```bash twine upload dist/* ``` -------------------------------- ### Get Tables from Page Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/confluence.md Fetches tables from a Confluence page. ```APIDOC ## Get Tables from Page ### Description Fetches tables from a Confluence page. ### Method Signature `confluence.get_tables_from_page(page_id)` ### Parameters - **page_id** (int/str) - The ID of the page. ``` -------------------------------- ### Get Attachment History Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/confluence.md Retrieves the version history of an attachment. ```APIDOC ## Get Attachment History ### Description Retrieves the version history of an attachment. ### Method Signature `confluence.get_attachment_history(attachment_id, limit=200, start=0)` ### Parameters - **attachment_id** (str) - The ID of the attachment. - **limit** (int, optional) - The maximum number of history items to return (default: 200). - **start** (int, optional) - The starting index for pagination (default: 0). ``` -------------------------------- ### Initialize Bitbucket Cloud Client with Username and Password Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/index.md Connect to Bitbucket Cloud using your email as the username and your regular password. This method is suitable for certain Bitbucket Cloud integrations. ```python # Log-in with E-Mail / Username and regular password # or with Username and App password. # Get App password from https://bitbucket.org/account/settings/app-passwords/. # Log-in with E-Mail and App password not possible. # Username can be found here: https://bitbucket.org/account/settings/ from atlassian.bitbucket import Cloud bitbucket = Cloud( username=bitbucket_email, password=bitbucket_password, cloud=True) ``` -------------------------------- ### Get Page Properties Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/confluence.md Retrieves all properties from a Confluence page. ```APIDOC ## Get Page Properties ### Description Retrieves all properties from a Confluence page. ### Method Signature `confluence.get_page_properties(page_id)` ### Parameters - **page_id** (int/str) - The ID of the page. ``` -------------------------------- ### Get Bitbucket Repositories Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/bitbucket.md Retrieves a list of repositories for a given project. Pagination can be controlled using 'limit'. ```python # Get repositories list from project bitbucket.repo_list(project_key, limit=25) ``` -------------------------------- ### Get Issues for Backlog Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves issues from the backlog of a specified board. ```APIDOC ## Get Issues for Backlog ### Description Retrieves issues from the backlog of a specified board. ### Method `jira.get_issues_for_board(board_id, start_at=0, max_results=50, jql=None, validate_query=True, fields=None, expand=None, override_screen_security=None, override_editable_flag=None)` ### Parameters * **board_id** (string) - Required - The ID of the board. * **start_at** (integer) - Optional - The starting index for pagination. Defaults to 0. * **max_results** (integer) - Optional - The maximum number of issues to return. Defaults to 50. * **jql** (string) - Optional - JQL query to filter issues. * **validate_query** (boolean) - Optional - Whether to validate the JQL query. Defaults to True. * **fields** (string) - Optional - Comma-separated list of fields to include. * **expand** (string) - Optional - Comma-separated list of fields to expand. * **override_screen_security** (boolean) - Optional - Override screen security. * **override_editable_flag** (boolean) - Optional - Override editable flag. ``` -------------------------------- ### Create Confluence Whiteboard (Cloud Only) Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/confluence.md Creates a new whiteboard in a specified space. This functionality is only available for Confluence Cloud instances. ```python confluence.create_whiteboard(spaceId, title=None, parentId=None) ``` -------------------------------- ### Get Issue Worklog Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves the worklog entries for a Jira issue. ```APIDOC ## Get Issue Worklog ### Description Retrieves the worklog entries for a Jira issue. ### Method `jira.issue_get_worklog(issue_key)` ### Parameters - **issue_key** (string) - Required - The key of the issue. ``` -------------------------------- ### Get Page History Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/confluence.md Retrieves the history of a specific Confluence page. ```APIDOC ## Get Page History ### Description Retrieves the history of a specific Confluence page. ### Method Signature `confluence.history(page_id)` ### Parameters - **page_id** (string) - Required - The ID of the page. ``` -------------------------------- ### Create a Confluence Page Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/README.rst Example of creating a Confluence page using the Confluence module. Supports HTML in the body. For Confluence Cloud, use a token instead of username/password. ```python from atlassian import Confluence import requests # If you want to use a session, you can create it like this: session = requests.Session() # and pass it to the Confluence constructor confluence = Confluence( url='http://localhost:8090', username='admin', password='admin', session=session,) status = confluence.create_page( space='DEMO', title='This is the title', body='This is the body. You can use HTML tags!') print(status) ``` -------------------------------- ### Get Issue Property Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves a specific property from a Jira issue. ```APIDOC ## Get Issue Property ### Description Retrieves a specific property from a Jira issue. ### Method `jira.get_issue_property(issue_key, property_key)` ### Parameters - **issue_key** (string) - Required - The key of the issue. - **property_key** (string) - Required - The key of the property. ``` -------------------------------- ### Get Issue Changelog Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves the change history for a Jira issue. ```APIDOC ## Get Issue Changelog ### Description Retrieves the change history for a Jira issue. ### Method `jira.get_issue_changelog(issue_key)` ### Parameters - **issue_key** (string) - Required - The key of the issue. ``` -------------------------------- ### Manage Xray Test Repository Folders Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/xray.md Retrieve and create test repository folders within a project. ```python # Retrieve test repository folders of a project. xray.get_test_repo_folders(project_key) # Retrieve test repository folder of a project. xray.get_test_repo_folder(project_key, folder_id) # Create test repository folder for a project. xray.create_test_repo_folder(project_key, folder_name, parent_folder_id=-1) ``` -------------------------------- ### Queue Information Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/bamboo.md Retrieve information about the build and deployment queues. ```APIDOC ## get_build_queue ### Description Retrieves the current build queue. ### Method Not specified (assumed to be a Python method call) ### Parameters - **expand** (string) - Optional - Specifies details to expand, e.g., 'queuedBuilds'. ## get_deployment_queue ### Description Retrieves the current deployment queue. ### Method Not specified (assumed to be a Python method call) ### Parameters - **expand** (string) - Optional - Specifies details to expand, e.g., 'queuedDeployments'. ``` -------------------------------- ### Get Watchers for Issue Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves the list of watchers for a Jira issue. ```APIDOC ## Get Watchers for Issue ### Description Retrieves the list of watchers for a Jira issue. ### Method `jira.issue_get_watchers(issue_key)` ### Parameters - **issue_key** (string) - Required - The key of the issue. ``` -------------------------------- ### Get Issue Link Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves information about a specific issue link. ```APIDOC ## Get Issue Link ### Description Retrieves information about a specific issue link. ### Method `jira.get_issue_link(link_id)` ### Parameters - **link_id** (string) - Required - The ID of the issue link. ``` -------------------------------- ### Create Repository Hook Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/bitbucket.md Creates a new webhook for a repository with a specified URL, description, active status, and events. The 'active' and 'events' parameters are required. ```python hook = repo.hooks.create(url="endpoint-url", description="description", active=True, events=["a-repository-event"]) ``` -------------------------------- ### Get Issue Status Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves the current status of a Jira issue. ```APIDOC ## Get Issue Status ### Description Retrieves the current status of a Jira issue. ### Method `jira.get_issue_status(issue_key)` ### Parameters - **issue_key** (string) - Required - The key of the issue to retrieve the status for. ``` -------------------------------- ### Create Bitbucket Repository Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/bitbucket.md Creates a new repository within an existing project. Requires 'PROJECT_ADMIN' permission for the project. Only 'name' and 'scmId' parameters are used. ```python # Create a new repository. # Requires an existing project in which this repository will be created. The only parameters which will be used # are name and scmId. # The authenticated user must have PROJECT_ADMIN permission for the context project to call this resource. bitbucket.create_repo(project_key, repository, forkable=False, is_private=True) ``` -------------------------------- ### Get Content Template Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/confluence.md Retrieves a specific content template by its ID. ```APIDOC ## Get Content Template ### Description Retrieves a specific content template by its ID. ### Method Signature `confluence.get_content_template(template_id)` ### Parameters - **template_id** (str) - The ID of the content template. ``` -------------------------------- ### Get Page Ancestors Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/confluence.md Retrieves the ancestors of a given Confluence page. ```APIDOC ## Get Page Ancestors ### Description Retrieves the ancestors of a given Confluence page. ### Method Signature `confluence.get_page_ancestors(page_id)` ### Parameters - **page_id** (int/str) - The ID of the page. ``` -------------------------------- ### Add Customers Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/service_desk.md Adds one or more existing customers to a specified service desk. Requires appropriate project administration permissions. ```APIDOC ## Add Customers ### Description Adds one or more existing customers to the given service desk. ### Method POST (implied) ### Endpoint `/rest/servicedeskapi/customers/{service_desk_id}` (implied) ### Parameters #### Path Parameters - **service_desk_id** (string) - Required - The ID of the service desk. #### Request Body - **list_of_usernames** (array of strings) - Required - A list of usernames of the customers to add. ### Permissions Administer project permission is required, or agents if public signups and invites are enabled for the Service Desk project. ``` -------------------------------- ### Get Page Property Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/confluence.md Retrieves a specific property from a Confluence page. ```APIDOC ## Get Page Property ### Description Retrieves a specific property from a Confluence page. ### Method Signature `confluence.get_page_property(page_id, page_property_key)` ### Parameters - **page_id** (int/str) - The ID of the page. - **page_property_key** (str) - The key of the property to retrieve. ``` -------------------------------- ### Transition Actions Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/service_desk.md Manage and perform transitions on customer requests. ```APIDOC ## Get Customer Transitions ### Description **EXPERIMENTAL** Retrieves a list of transitions that customers can perform on a request. This API may change without notice. ### Method `sd.get_customer_transitions(issue_id_or_key)` ### Parameters #### Path Parameters - **issue_id_or_key** (string) - Required - The ID or key of the customer request. ## Perform Transition ### Description **EXPERIMENTAL** Performs a specified transition on a customer request. This API may change without notice. ### Method `sd.perform_transition(issue_id_or_key, transition_id, comment=None)` ### Parameters #### Path Parameters - **issue_id_or_key** (string) - Required - The ID or key of the customer request. - **transition_id** (string) - Required - The ID of the transition to perform. - **comment** (string) - Optional - An optional comment to associate with the transition. ``` -------------------------------- ### Initialize Bitbucket Cloud Client with Username and App Password Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/index.md Authenticate with Bitbucket Cloud using your Bitbucket username and an App password. App passwords provide a more secure way to access Bitbucket resources programmatically. Ensure the App password has the necessary permissions. ```python bitbucket_app_pw = Cloud( username=bitbucket_username, password=bitbucket_app_password, cloud=True) ``` -------------------------------- ### CloudAdminOrgs - Get Organizations Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/cloud_admin.md Retrieves a list of all organizations associated with the account. ```APIDOC ## Get Organizations ### Description Returns a list of your organizations. ### Method GET ### Endpoint /organizations ### Parameters None ### Request Example None ### Response #### Success Response (200) - **organizations** (list) - A list of organization objects. #### Response Example ```json { "organizations": [ { "id": "org-id-1", "name": "Organization One" }, { "id": "org-id-2", "name": "Organization Two" } ] } ``` ``` -------------------------------- ### Configure Tempo Cloud Client for European Region Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/tempo.md Instantiate the TempoCloud client specifically for the European region using its dedicated URL. ```python # For European clients tempo_eu = TempoCloud( url="https://api.eu.tempo.io", token="your-tempo-api-token" ) ``` -------------------------------- ### Get Organizations Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/cloud_admin.md Retrieve a list of all organizations associated with your Atlassian account. ```python # Returns a list of your organizations cloud_admin_orgs.get_organizations() ``` -------------------------------- ### Add Cloud Admin Connection Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/index.md Initialize connections to Cloud Admin Orgs and Cloud Admin Users modules using an admin API key. Ensure the admin-api-key is correctly provided. ```python from atlassian import CloudAdminOrgs, CloudAdminUsers cloud_admin_orgs = CloudAdminOrgs( admin-api-key=admin-api-key) cloud_admin_users = CloudAdminUsers( admin-api-key=admin-api-key) ``` -------------------------------- ### Get Agile Board Property Source: https://github.com/atlassian-api/atlassian-python-api/blob/master/docs/jira.md Retrieves a specific property of an agile board. ```APIDOC ## Get Agile Board Property ### Description Retrieves a specific property of an agile board. ### Method `jira.get_agile_board_property(board_id, property_key)` ### Parameters * **board_id** (string) - Required - The ID of the board. * **property_key** (string) - Required - The key of the property to retrieve. ```