Is there a way to use the JIRA REST api to update a value in the customfield



So what I want to do is use the customId 15061 to update/delete/modify the string value since from whta I read the string value is attached to that ID


Also I want to do this using curl commands if possible so using POST or PUT along with passing the data with the --data flag.


Is this even possible or would I have to use something else to modify the value.


1 answer

1 accepted

0 votes
Accepted answer

You can try with this:


def issueKey = 'KEY-01'

def resultUpdate = put('/rest/api/2/issue/' + issueKey + '?overrideScreenSecurity=true')
.header('Content-Type', 'application/json')
("customfield_15061"): "NEW VALUE"

if (resultUpdate.status == 204)
return 'OK'
return "${resultUpdate.status}: ${resultUpdate}"

curl -k -D- -u user:password -X PUT --data "{data here}" -H "Content-Type: application/json" mywebsiteBaseURL/rest/api/2/issue/currentIssue?overrideScreenSecurity=true


Would this be how the curl command would look like

and the data would look as follows:




    [{"customfield_15061":"NEW VALUE"}]



where "NEW VALUE" is the string i want to input?

okay thanks for the code it was a good reference and
I managed to do the proper curl command which is as follows:

curl -k -D- -u user:password -X PUT --data "{"fields":{"customfield_15061":"Your New String Here"}}" -H "Content-Type: application/json" mywebsiteBaseURL/rest/api/2/issue/currentIssue?overrideScreenSecurity=true


Gaston Valente Community Champion Jul 18, 2017


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,124 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you