Forums

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

Can we update custom field Dropdown values by an API call??

Srikanth Vemuluri January 22, 2023

Hello All,

We want to Update dropdown values of a multi/single select custom field after certain time intervals by using an Web hook/Automation rule -"Send a Web request". Is it possible to update the particular field values?? If so please suggest how can we do it or using which tool in Jira cloud standard.

Regards,
Srikanth Vemuluri 

1 answer

1 accepted

2 votes
Answer accepted
Alex Koxaras -Relational-
Community Champion
January 22, 2023

Hi @Srikanth Vemuluri 

You can use a REST API call to update the values. Specifically this endpoint:

PUT /rest/api/3/field/{fieldId}/context/{contextId}/option

More info on the above endpoint can be found below:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-put

Let me know if the above helps.

Srikanth Vemuluri January 23, 2023

Hello @Alex Koxaras -Relational- 

Thanks for the quick response. Will check the API with this end code. 

Can you please tell me how can i get a context ID??

Alex Koxaras -Relational-
Community Champion
January 23, 2023

@Srikanth Vemuluri 

  • Go to cog wheel > Issues > Custom fields
  • Find you custom field > click ellipsis menu > context and default value
  • Click on "Edit Configuration" on your available context
  • Upon loading check your browser's address bar and locate the word "ConfigSchemeId=XXXXX"
  • That XXXXX is the context ID
Like Srikanth Vemuluri likes this
Srikanth Vemuluri February 15, 2023

Hello @Alex Koxaras -Relational- 

While using the Rest API above mentioned 
/rest/api/3/field/customfield_26683/context/32498/option"

I'm using config scheme ID in place of Context ID. But it's not working for me. Can you please suggest on this

Regards,
Srikanth

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events