1) I did a GET to "https://xxxx.atlassian.net/rest/api/3/issue/{issue_key}/editmeta"
2) I made sure that the allowedValues for issueType, I can see the issueType I want to change to.
3) I did a PUT to https://xxxx.atlassian.net/rest/api/3/issue/{issue_key}
auth = HTTPBasicAuth("xxxx@xxxx.com", API_TOKEN)
headers = {"Accept": "application/json"}
payload= json.dumps({fields": {"issuetype":{"id": "0000" } }})
response = requests.request(
"PUT", url, headers=headers,
auth=auth,
data=payload
)
print(response)
BUT, this give me <Response [415]>
What is happening ?
So 415 indicates Unsupported Media Type. Could you try adding content type in your header, e.g Content-Type: application/json, and see if that changes anything.
My curl command would typically look like this:
curl --request POST \
--url 'https://<yourDomain>/rest/api/3/issue/<issueKey>/comment' \
--header 'Accept:application/json' \
--header 'Content-Type: application/json' \
--user '<atlassianAccountemail>:<APIToken>' \
--data '{
"body": "Charlie"
}'
Thanks, it work!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.