You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am currently trying to upload a JUnit xml document via the
https://api.zephyrscale.smartbear.com/v2/automations/executions/junit
endpoint and get back a 415 for Unsupported Media Type.
I am making the post request with the requests module using Python 3.8. I have tried passing the binary file contents in with the files argument or as part of the body, but both are returning the same error. I have tried both zip and xml files and have the content type set to application/json.
The documentation shows what the response looks like, but an example of the request would be greatly appreciated.
I was able to resolve the issue by fixing the header key value from the documentation.
I am currently able to upload the xml file by using the files parameter for the post function and having the body just contain the testCycle value, but the testCycle seems to be ignored.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Was able to resolve the issue by placing the file and testCycle keys in the files parameter and specifying the Content-Type for the testCycle portion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Neelin,
I am also having this same issue, but I'm not sure that I understand your resolution.
The json body should be passed on the data= or the json= parm of the request? I've tried both. What did you specify for the body values: (id, utl, key)?
Body = json.dumps ( {
"testCycle": {
"id": 1,
"url": "string",
"key": "string"
}
} )
They do not make any sense as this request creates a new execution and test cases
thanks for posting!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Neelin, I searched a lot and couldn't fix this problem, and still receive error 415!!
can you please kindly send me your request script? I would be grateful if you could help me fix this issue.
here is my email: mahshad.dezhsetan@gmail.com.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was also not able to resolve. I ended up calling curl (from python) to get around the problem. Please also let me know if you are able to figure it out "the right way".
thanks, jonathan.silver@terminix.com
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.