Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA API GET all values for a custom field

I'm trying to get all possible values for a customfield on JIRA through the GET api.

Example:

I created the "Test API" custom field and gave it three values "API 1", "API 2" and "API 3". The id for this field is 18232.

I'm trying to do this with the following:

https://my-domain.atlassian.net/rest/api/2/customFieldOption/18232

I got this from here

The headers are one for basic authorization and one with Accept - application/json

No matter what I try to do I keep getting the error

{"errorMessages":["A custom field option with id '18232' does not exist"],"errors":{}}

Has anyone been sucessful with this?

1 answer

This is returning a specific option details and should work if the option id is correct.

If you want to get all the allowed values for a custom field, use the createmeta or editmeta methods. Here is an example resource:

/rest/api/2/issue/createmeta?projectKeys=YOURPROJECTKEY&issuetypeNames=Bug&expand=projects.issuetypes.fields

Thanks, you solved my issue :)

Like Max Makhrov likes this

Jobin Kuruvilla, thank you! 

This solved my issue partially:

/rest/api/2/issue/createmeta?projectKeys=YOURPROJECTKEY&expand=projects.issuetypes.fields

I've got all the possible values for my custom field.

My other field has a child:

type=option-with-child

The method showed above gives me all values for the main field — parent. I was not able to retrieve all values for the child. Could you please say if it possible?

Thank you! this works.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you