Forums

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

Updating custom Jira field does not work using Jira Rest API. What am I doing wrong?

Lily Tran August 18, 2020

Hello;
I am trying to update a custom field in the Jira issue using Rest API.  Below is my command line for updating the "Problem ID" field for my Jira Issue:

curl -D- -u userID:PW -X POST --data '{"fields":{"Problem ID":"dummydummy"}}' -H "Content-Type: application/json" https://jira.corp.adobe.com/rest/api/2/issue/DCMAF-1

The above command did not generate any error, but it also did not update the "Problem ID" field for DCMAF-1 Jira issue with "dummydummy" string.  Can someone help me check to see what I am doing wrong?  I verified that the User account that I am using has privilege to update the Problem ID field via Jira UI.

1 answer

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 19, 2020

Hello @Lily Tran

Thank you for reaching out.

By the URL logged for your user, I believe you are using a Jira Cloud site at this moment. Is that correct?

If that's true, your REST API call is wrongly referencing to a Server format. Try the following format:

yourdomain.atlassian.net/rest/api/3/issue/{issueIdOrKey}

If you are properly using Jira Server, can you please provide us with the type of custom field you are trying to update?

Additionally, since you are asking a question about REST API, I believe the best place to ask for help is in the Atlassian Developer Community:

https://community.developer.atlassian.com/ 

The mentioned portal was specifically created for development questions, where you will find articles and suggestions from other third-party partners and Atlassian developers. Feel free to open a new topic about your question there.

Let us know if you have any other questions.

Lily Tran August 19, 2020

I am using Jira Server and the custom field is a single string field.

Lily Tran August 19, 2020

I got the above command working by using the customfield ID vs. value.

Like Petter Gonçalves likes this
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 20, 2020

Glad to know you were able to solve your issue, @Lily Tran

Let us know if you have any other questions.

Suggest an answer

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

Atlassian Community Events