REST Integration Error - PUT method not supported for API

nancyhz
Mega Contributor

I am trying to use REST's PUT method to update ServieNow incident table, but I got the response error -{"error":{"message":"Method not Supported","detail":"PUT method not supported for API"},"status":"failure"}.     Can any expert give me the direction?

10 REPLIES 10

andersfigenscho
Kilo Expert
Kilo Expert

I just had this problem and managed to figure it out.


I first tried out the cURL request, which proved to work.   I then suspected that my third party software was locked in some security sandbox which returned my error message.



Then, after some serious debugging, it appeared it was as simple as this:   I had set the wrong URL in my call.



So, my suggestion to figure this thing out - check if your URL is in the correct format:


http://yourinstance.service-now.com/api/now/table/table_name/sys_id



(My previous URL had additionally some sysparm values from a previous version which is not needed here)



Good luck!



- Anders Figenschow


Symfoni Norway


Glad you were able to figure this out. When I run into problems like this the first thing I try to do is compare the HTTP request


URL, Parameters, Headers, Payload from my working environment with the being made from the environment that is not working. This can be difficult sometimes depending on the system making the request. With cURL you can use the -v --verbose flag to output the request and response to the command line. Other tools/systems are often not as easy. I've found tools like RunScope and RequestBin very helpful here in that they act as a proxy and allow me to view the request that I'm sending and then easily compare my requests.



Hope that helps,


-Bryan


Thank you, Bryan,   your feedback is very helpful.


bryanbarnard
ServiceNow Employee
ServiceNow Employee

glad it helped.


avinashmore
ServiceNow Employee
ServiceNow Employee

Hi,



I was facing the same issue, but I am able to resolve it now.
Only thing which I was doing wrong was, I was not adding the sys_id of the row which is to be updated in the http connection URL.



URL   format: https://{instance_url}/api/now/table/{table_name}/{sys_id}



Note: While using PUT or DELETE request, above URL format solves the issue.