How to query customField allowedValues field using Rest API?

I have customField created in Jira. I wish to query its allowed values.

Which REST API function should I use and how to do so? (I tried to several functions but I was confused with the url path I need to set to query customField value)

I am using Python 3 in my code.

Please advise,
Thank you,

GET /rest/api/2/issue/createmeta should return all allowed values for newly created issues, and GET /rest/api/2/issue/{issueIdOrKey}/editmeta should return allowed values for a given issue.

Thank you for your reply.
I used curl -u @ -H “Content-Type: application/json” https:///rest/api/2/issue/createmeta but could retrieve json response with a lot of data but no customfield_.
I don’t have any specific issue for query, I have some script running with using some data inside our jira and I want to query the values from specific customfield created in jira to set some list in my script.
I can create some dummy issue with all the allowed options (this is multi value option) but I am sure there is an elegant way to do it not to do this workaround.
Please advice,
Thank you

You need to use an expand to get all data:

GET /rest/api/2/issue/createmeta?expand=projects.issuetypes.fields.

Then the response should contain information for all fields, and for your custom field: all available values.

1 Like

Thank you! it worked getting all fields with /rest/api/2/issue/createmeta?expand=projects.issuetypes.fields. Can I add some path to that url to query the specific entry in json response I received for all fields. Meaning specifying the key and the index entry.
e.g. GET /rest/api/2/issue/createmeta?expand=projects.issuetypes.fields?key=CUST…
Tried that but it did not work. Also where can I find some information about building this url path (meaning the syntax).

Thanks again for your help,

You can find all the information in the documentation.

The only thing you can narrow down is project and issue type. You will always get all fields.

The good news is that we just recently started working on a new API specifically for reading custom field options, so stay tuned!

Great news!!!
Thank you, I will follow

I forgot to link an issue you can watch for updates:

is it possible to limit to a specific customfield? since we have a huge amount of data. i think its best to limit it to a specific field