Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,294,103
Community Members
 
Community Events
165
Community Groups

Update custom field using python script

Edited
Prashant I'm New Here May 17, 2022

I am trying to update customfield_12001 field and getting 400 response. What am I doing wrong?

import requests
from requests.auth import HTTPBasicAuth
import json

JiraApiUrl = "https://jira.vanguard.com/rest/api/2/issue/CSDSOSRE-2936"

auth = HTTPBasicAuth("UserId", "Password")


headers = {"Accept": "application/json", "Content-Type": "application/json"}

payload = json.dumps({"update": {"customfield_12001": [{"value": "XYZ"}]}})

response = requests.request("PUT", JiraApiUrl, data=payload, headers=headers, auth=auth)

print("Response: " + str(response))

Response is 400

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you