VOOZH about

URL: https://www.geeksforgeeks.org/python/how-to-fetch-data-from-jira-in-python/

⇱ How to Fetch Data from Jira in Python - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to Fetch Data from Jira in Python

Last Updated : 27 Jan, 2026

Jira is an agile project management tool developed by Atlassian, primarily used for tracking project bugs and issues. Over time, it has evolved into a work management platform capable of handling all stages of the agile methodology. There are two ways to get data from Jira:

  • Using the Jira Python library.
  • Using the Jira REST API.

Prerequisites in Jira

  • Create a Jira user account.
  • Create a domain, add a project and record some issues or bugs. We will fetch these issue details using Python.
  • Obtain a valid API token from Atlassian API Tokens for authentication.
πŸ‘ Image
Issues recorded in JIRA tool for project "MedicineAppBugs"

JQL: Jira Query Language (JQL) is an efficient way to fetch Jira data. One can filter issues, projects, or bugs using keywords and operators. JQL works with both the Jira library and REST API.

Fetch Data Using Jira Python Library

The jira library is an easy-to-use Python library to connect with Jira. It requires Python 3.5+. To install Jira Library use below command in command prompt or terminal:

pip install jira

Example: Fetch All Issues from a Project

Output

πŸ‘ Image
Issues data output using JIRA library.

Explanation:

  • jiraOptions = {'server': "https://yourdomain.atlassian.net/"}: Specifies your Jira domain.
  • jira = JIRA(options=jiraOptions, basic_auth=(...)): Authenticates with Jira using your email and API token, and creates a Jira client instance.
  • jira.search_issues(jql_str='project = MedicineAppBugs'): Fetches all issues from the project MedicineAppBugs using JQL.
  • singleIssue.key: Unique identifier of the issue.
  • singleIssue.fields.summary: Short description of the issue.
  • singleIssue.fields.reporter.displayName: Name of the person who reported the issue.

Example: Fetch a Single Issue

Output

πŸ‘ Image
Details of one issue using the JIRA library

Explanation: jira.issue('MED-1') Retrieves a single issue from Jira using its unique key (MED-1).

Fetch Data Using Jira REST API

The Jira platform provides a REST API that allows you to interact with Jira programmatically. Using the API, you can perform CRUD operations on issues, projects, dashboards, users, and more.

Here, we focus on fetching all issues for a specific project (MedicineAppBugs) using the REST API. This approach gives you full control over the data and allows you to filter, sort or process issues according to your requirements.

Python Libraries Required

  • json - built into Python
  • requests - install with pip install requests
  • pandas - install with pip install pandas

Getting the API URL

To fetch issues, we will use Jira’s Issue Search API.

  • Go to the Jira Developer API.
  • Navigate to Issue Search -> Search for issues using JQL (GET).
  • The API endpoint is: GET /rest/api/2/search
  • Append your Jira domain to form the full URL: https://your-domain.atlassian.net/rest/api/2/search

This URL allows you to retrieve all issues for your project or filter them using JQL queries.

Output

πŸ‘ Image
Issues received from JIRA tool using JIRA REST API in python code

Explanation:

  • url: API endpoint used to search for Jira issues.
  • headers: Specifies that the response should be in JSON format.
  • query: Contains the JQL statement to fetch issues only from the MedicineAppBugs project.
  • requests.get(...): Sends a GET request to Jira with authentication, headers, and JQL query.
  • response.json(): Converts the JSON response into a Python dictionary.
  • iterateDictIssues(): A recursive function used to navigate the nested JSON structure and extract: Issue Key, Issue Summary and Reporter Name
  • The for loop checks for the "issues" key and processes each issue individually.
  • listAllIssues: Stores extracted details for all issues.
  • pd.DataFrame(...): Converts the collected data into a Pandas DataFrame for structured display.
Comment
Article Tags: