Forums

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

Update single select custom field with Automation rule & REST API

yaron
Contributor
April 10, 2024

Hello,
I'm trying to update single select custom field with new option each time new sprint is created in a selected scrum board.
My reference is Atlassian developers guide at:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-post

 

My web request URL:
https://XXXXX.atlassian.net/rest/api/3/field/10559/context/10803/option

In the custom data I tried both, to send the new option together with the current existing option or only the new one I want to add.

Both times I'm getting:

Error publishing web request. Response HTTP status:
400
Error response HTTP body:
{"errorMessages":["Invalid request payload. Refer to the REST API documentation and try again."]}
See attached the reference I'm looking at and my automation rule.
Thanks,
Yaron
Screenshot 2024-04-10 103735.pngScreenshot 2024-04-10 102908.png

1 answer

1 accepted

2 votes
Answer accepted
Thomas Opiolka - codefortynine
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 10, 2024

Hi,

I believe you are writing option instead of options in your root level array of the POST body. Hopefully this already helps.

Cheers!

Thomas

yaron
Contributor
April 10, 2024

WOW - Thank you very much for that 🙏🙏🙏🙏🙏

Suggest an answer

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

Atlassian Community Events