not able to update incident using REST API

maheshchaudhary
Kilo Expert

I have a RET API for an Service NOw instance. with that i am able to get/create records in incident table but I am not able to update incident using sysid.

any ideas ????

I have tried both put and patch method but none is working.. getting below errors :- 

{"error":{"message":"Method not Supported","detail":"PATCH method not supported for API"},"status":"failure"}

{"error":{"detail":"PUT method not supported for API","message":"Method not Supported"},"status":"failure"}

find_real_file.png

1 ACCEPTED SOLUTION

maheshchaudhary
Kilo Expert

Finally it worked. Thanks Everyone.

find_real_file.png

find_real_file.png

View solution in original post

7 REPLIES 7

Abhishek Pidwa
Kilo Guru

Hey Mahesh,

 

The only part which was missing in your case was that you were not passing the sys_id in the Endpoint URL itself. I have tried this in my local instance and it works perfectly fine:

 

find_real_file.png

 

Now , typically REST Message would be used just for testing purpose . If you want to do it dynamically then try the REST API Explorer and it will provide you various ways of code:

 

find_real_file.png

 

Hope that makes sense.

 

Please mark this answer as correct/helpful if this solves your problem. Happy coding

maheshchaudhary
Kilo Expert

Finally it worked. Thanks Everyone.

find_real_file.png

find_real_file.png

Great!

Please close the thread by marking the answer correct or helpful.

Thanks,

Nithish