Hi all,
I need to get all jira customfield attributes via REST API.
Eg. I have SelectList(single choice) with 2 available options. I need to get JSON with all the attributes. Something like this
Hi Maksym,
Could you please let me know more about these particular fields and how you are trying to access them? I ask this because in Jira Cloud, some custom fields can be accessed on different endpoints depending on whether these custom fields are created by app or whether they are created by a user.
More detail about this is explained in the Apps version of the endpoint Get all issue field options GET /rest/api/3/field/{fieldKey}/option :
Note that this operation only works for issue field select list options added by Connect apps, it cannot be used with issue field select list options created in Jira or using operations from the Issue custom field options resource.
and conversely in the other endpoint of GET /rest/api/3/customFieldOption/{id}
Note that this operation only works for issue field select list options created in Jira or using operations from the Issue custom field options resource, it cannot be used with issue field select list options created by Connect apps.
I'm not clear in understanding if you are building a connect or forge app here, or how this custom field is being created. However I believe the answer here will depend upon those answers in your environment here.
Interested to learn more here so we can help.
Andy
Hi Andy,
thanks for your response.
I need to focus on custom fields created by user.
I do not use forge. My application works on Scala code. My intention is to retrieve not just customfield options but other related information as well like id, self, etc. Something like this:
Thanks for the additional info here. While those endpoints are useful to finding this info when you know the ID of the custom field, I can understand why this might not be helpful for seeing all the field values.
Instead check out How to retrieve available options for a multi-select customfield via Jira REST API I know this KB is a bit older, and written from a Jira Server point of view, but the information in it is still largely applicable to Jira Cloud.
You can look into the endpoint GET /rest/api/3/issue/createmeta. Calling this endpoint will return to you all the fields that appear on an issue create screen, but it too can return to you the custom fields and their allowed values. And if the create screen doesn't have the particular field on it, it won't appear in those results, so you might also want to investigate the endpoint GET /rest/api/3/issue/{issueIdOrKey}/editmeta Try that and let me know if this helps.
Thanks, Andy!
It looks like you're new here. Sign in or register to get started.