How to create and update ticket using REST API?

rajeshparthasar
Tera Contributor

Hi All,

                            i'm trying to create a ticket and update the ticket using REST API.

 

i'm able to create a ticket in incident table using HttpPost class.

when i try to update the ticket using HttpPut class.

it throws an error saying that "PUT Method not supported for API".

 

How to update the ticket in incident table?

Please help me.

Thanks in advance,

 

Regards,

 

Rajesh

@

13 REPLIES 13

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

Just want to confirm you have seen these examples:


Table API - ServiceNow Wiki


ayan_hc
Giga Contributor

Hi,



Please take a look at these if you haven't:


REST API - ServiceNow Wiki


Running a REST query to populate a table


Re: Using REST Message



If these could help please let us know.



Regards,


Ayan


rajeshparthasar
Tera Contributor

Hi,


              I have seen Table API examples.


                  i'm using latest apache httpclient-4.3.6.jar in my project.


                  i cannot use any other httpclient.jar in my project.


                  The latest apache httpclient.jar doesn't have PUT,PATCH,Delete Classes.


                  so, i'm using HttpPost class to create a ticket and i'm trying to update ticket using HttpPut class.


                  when i try to update the ticket using HttpPut Class.im getting error like "PUT Method not supported for API"



                  will it be possible to integrate service now with latest apache httpclient-4.3.6.jar?


                  Please help me.



Regards,



Rajesh


Hello Rajesh,


I want to do the same think, create and update ticket with REST API. Can you help me please if it work for you?