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

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

Suggest an answer

Log in or Sign up to answer