Forums

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

REST API search return custom fields

Robert Egan
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.
March 7, 2022

Is it possible to ask for custom fields by name, instead of "customfield_"?

1 answer

1 accepted

0 votes
Answer accepted
Tuncay Senturk
Community Champion
March 7, 2022

Hi @Robert Egan 

 

You can use search query parameter. Try this out please:

/rest/api/latest/customFields?search=cfbyname

Robert Egan
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.
March 7, 2022

Yes, that will return the id: which can be massaged into customfield_id for the next call.

I'd like to know why Atlassian couldn't do that for /search. Because clearly the code is there.

Tuncay Senturk
Community Champion
March 7, 2022

Do you need a second call? Can't you get customfield details using aformentioned rest method?

Robert Egan
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.
March 7, 2022

The /customFields end point only returns metadata about the custom fields. The /search end point is required to get issue values of those custom fields.

Tuncay Senturk
Community Champion
March 7, 2022

Oh, I see, that's correct.

Suggest an answer

Log in or Sign up to answer