The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Getting a list of custom field names via API?

Randall_Helms
May 12, 2020

I am working with the API and when I pull out lists of issues I get a bunch of fields like customfield_123, customfield_456, etc. Is there a way to get the list of what these names correspond to from the API? I can see that there is a 'Fields' section in Project Settings in the Jira UI, but I have no idea how I can connect say a custom field called 'Project Team' to customfield_123 in the API; ideally I would make a call to an API that would allow me to get these as a key-value pair so I could map correctly.

Does such a service exist?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Tuncay Senturk _Snapbytes_
Community Champion
May 12, 2020

Hi @Randall_Helms 

As far as I know there is neither Java nor REST API for that,

But you can easily fetch all customfields by their names by using customFieldManager.getCustomFieldObject method within the loop of customfieldKeys. Then you can get custom field's details (id, name, context, ..)

https://docs.atlassian.com/software/jira/docs/api/latest/com/atlassian/jira/issue/CustomFieldManager.html#getCustomFieldObject-java.lang.String-

I hope it helps

Tuncay