Hi all. I am looking for some working examples of custom form field updates via REST.
I can't use custom Jira fields to map, as my forms use data connections, so must go direct through the forms API.
The Atlassian Doc falls JUST short of being useful, here:
https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-issue/\#api-issue-issueidorkey-form-formid-put
This provides the endpoint and request structure but no examples of the field data itself, which is the operative bit.
--data '{
"answers": {}
}'
This document appears to show the valid structure, but I can't get it to work. If I send this as a payload (the long string is the field's dcId, I've also tried the numeric field number),
{
"answers": {
"68f27692-5a3c-4943-b7d4-b11d80e3f44b": { "choices": ["3441468"] }
}
}
I get the following response:
"errors":[{"status":400,"code":"BAD_REQUEST","title":"There was an issue with your request","detail":"1 error found in JSON: (1) should be a JSON object"}]}
Any example of drop-down, text and numeric field updates that you have working on your instances would be super helpful, thank you!