JiraCloud

The JiraCloud class facilitates interaction with the Jira Cloud REST API to external Jira instances, allowing you to connect as much instances as you can.

It provides methods for performing HTTP GET, POST, and PUT requests to various API endpoints, enabling actions such as retrieving projects, editing issues, and searching for issues using Jira Query Language (JQL).

Additionally, it includes a nested Project class for handling project-specific operations, such as retrieving issues within a project.

This class also allows setting the base URL and authentication credentials for accessing the Jira Cloud API.

Usage

Below you can check how to use this context variable.

# Instantiate JiraCloud object test_jira = JiraCloud() # Set base URL for Jira Cloud API test_jira.set_url('https://testjira.atlassian.net') # Set authentication credentials (email and token) test_jira.set_credentials('email', 'token') # Retrieve a list of projects projects = test_jira.projects # Retrieve a specific project by key ('ABC') project_abc = test_jira.project('ABC') # Retrieve issues from the project 'ABC' issues_from_abc = project_abc.issues() # Search for issues using JQL # Example: Retrieve all issues with status = 'In Progress' and priority = 'High' issues_in_progress = test_jira.search_issues('status = "In Progress" AND priority = "High"')

 

Easy for Jira - Python Automations, 2023