Jira Get Issue API

Nishant Sharma April 25, 2021

Hi Team,

I was peforming the get issue Operation as below:

GET /rest/api/3/issue/{issueIdOrKey}

And there is note for this operation 

Note: All fields are returned by default. This differs from Search for issues using JQL (GET) and Search for issues using JQL (POST) where the default is all navigable fields.

 

My query for this operation is, is there a way how I some knows what will be the fields in response to this API.

It talk about all available fields. Is there any doc where all this Fields and their types are being mentioned ? or any JSON payload which describe the almost all fields to this API?

2 answers

0 votes
Suhas P
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.
April 25, 2021

The usual practice is that you retrieve the required fields by iterating through JSON objects recursively. In groovy, if your JSON object returned is say result. then you iterate like result.fields.customfield_id

Basically, you have to retrieve the required values programatically.

Nishant Sharma April 26, 2021

Hi Suhas,

 

I agree with your explanation. Just wanted to confirm on one thing. Is there any metadata API call in v2  to get the list of all fields avaiable in jira?

Suhas P
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.
April 27, 2021

@Nishant Sharma  Didn't get your question. What is the requirement? And I believe, if its Jira cloud, its api3, api2 is for jira server. isnt it?

Suhas P
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.
April 27, 2021

with GET /issue, you get all available fields both CF and system fields, i believe.

0 votes
Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 25, 2021

Hi! 

You need to use the next query to read exist custom fields:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/

Nishant Sharma April 25, 2021

Thanks Gonchik,

Do we have anything in v2 API version to get the list of all fields.

I need to know all the fields whether they are custom or the defualt fields. in other words,

 

I need  a response to this API which includes all possible values for all fields whether they are fefault or custom.

Suggest an answer

Log in or Sign up to answer