Forum Discussion

samuelc's avatar
samuelc
Occasional Visitor
6 months ago

REST API: Getting Error 500 When Sending PUT Request

Just trying to update a test case using the REST API but keep running into Error 500: Internal Server Error for URL when doing so.

I am using Python Requests package to send requests. My understanding of the documentation is that any fields that are left blank will be erased. Therefore, I first used a GET request to grab all of the test case information, converted it from JSON to a dict, edited the fields that I needed to edit, and then converted back to JSON for the PUT request. 

I can confirm that the format of the JSON from the GET and the PUT requests does not change, only the value of the custom field I changed. Furthermore, the GET requests work perfectly fine. Only PUT has issues. My request header also includes " "Content-Type": "application/json" ". I have tried to set the field to both a string as well as an array of strings.

Wondering if anyone else was running into this issue and if they had a solution.

No RepliesBe the first to reply