Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using the Jira API to access ticket metadata: python

transreductionist
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 17, 2025

I look at a my Jira ticket in the cloud. It has a tab called Metadata on it. How can I access this data using python.

Some context. The code uses the following to successfully access the issue and its fields:

from jira import JIRA

jira = JIRA(options=options, basic_auth=(...))

Issue = jira.issue("issue_number")

I cannot find the data on the "metadata" tab on the ticket. Is there a way to access this data. Maybe I need to use curl?

 

1 answer

1 accepted

1 vote
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 17, 2025

Hi @transreductionist -- Welcome to the Atlassian Community!

Which REST API endpoint are you using when you "look at my Jira ticket in the Cloud" and observe a "tab called Metadata"?

https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/

And, I recommend reviewing the documentation for the Jira python library you are using as that may indicate which endpoint(s) are used, which may reveal it is using deprecated ones.

Kind regards,
Bill

transreductionist
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 18, 2025

Hi Bill,

Thank you for the reply. Apologize for not getting back sooner.

I need to retrieve and use Jira issue data that has been persisted in the cloud to build an excel workbook. As mentioned, in Python, I access the tickets using:

jira = JIRA(options=options, basic_auth=(...))
Issue = jira.issue("issue_number")

The returned issue does not have certain data, or the data is "hidden" in custom fields with no annotations. A custom field might look something like: 

customfield = 6

No documentation is available that tells me what that field represents. Originally, I needed to get a value I saw on the UI called "Story Points". That did not appear to be on ticket. Additionally, as I worked further on the task, I found that at times other fields did not have values on the issue although I could see them on the UI. 

I did not think the API would give me different results from jira, but on your suggestion, I thought I would give it a try. Unfortunately, the data returned was the same as what was retrieved by jira.

I finally worked around my problem by using a web scraping library and pulling what I needed from the UI itself. I did this only when the ticket did not have the data.

I used Google developer tools on the UI to search for the UI text "Story Points". Looking at the HTML I saw the customfield associated with it. For the other data that was sometimes not on the issue I started scraping the UI for it.

transreductionist
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 18, 2025

@Bill Sheboy See above.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events