I'm trying to update the description field using the API but I keep getting a 400 error. The auth is correct as I can use GET for projects, issues, comments, etc. Here's the function where I make the PUT call:
def updateTicket(dictData):
strKey = dictData["key"]
dictFields = {"fields": {"description": "test"}}
strURL = "https://kargo1.atlassian.net/rest/api/3/issue/" + strKey
response = requests.put(strURL, json="{'fields': {'description': 'test'}}", headers=myHeader)
print(response.reason)
And the output is:
Bad Request
I'm not new to programming but fairly new to Python. I did see some other questions in here with similar issues where the culprit was the Requests module. It automatically does a json.dumps() call on json data passed and the OP was already doing that in his code so the JSON was malformed.
I don't believe that is my issue as I am hardcoding the JSON string in the request call.
Any help would be appreciated