Forums

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

Endpoint to catch options for customfields

Banzhaf, Gregor [ BAHAG.COM ]
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 4, 2023

Hey,

 

in our JSM, there is a customfield "customfield_123". Clicking it opens a dropdown of elements, from which you can choose one.

 

By using the REST API I want to fetch those options / be able to set this customfield while creating an issue by using the REST API.

according to the documentation i have seen this endpoint:

https://your-domain.atlassian.net/rest/api/2/field/{fieldId}/context/{contextId}/option

 

--> doc: see https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-custom-field-options/#api-rest-api-2-field-fieldid-context-contextid-option-get

 

 

unfortunally i receive this answer:

 

{
    "errorMessages": [
        "Only Jira administrators can access custom field contexts."
    ],
    "errors": {}
}

 

Even our admins can't access it.

 

Is there a better way to get this data? Or am I doing sth wrong?

 

Thanks in advance

1 answer

1 vote
Mohamed Benziane
Community Champion
October 5, 2023

Hi,

Are you sure that the account used in the api call have the necessary permission ?

In my instance the following call works fine

/rest/api/2/field/customfield_10473/context/10947/option

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events