How to insert the data into the table using "REST Message" get Method()?

jenny32
Tera Guru

Hi,

I have the API which return "JSON" object, configured the API with Rest Message. It's responding properly, But i need to insert the "Json" object response into one table.

Can anyone suggest how to do it?

Regards,

Jennifer

8 REPLIES 8

Hi Rushit,



Where I need to use the code which you have posted? I tried the code in UI page client script part and its not working.




Regards,


Jennifer


hi,



it wont work from client side. you need to execute it from server side. can you explain more like when do u want to insert data? like on button click or something? Api is from other instance or thirdparty API..... so that I can give you better answer.


Hi Rushit,

I have some same requirement. I am writing the code in a Scheduled Job Script.
I tried referring to your code, please refer to the screenshot below:

I am able to get the response. But after parsing the response body and storing the value is result variable is not working. 

Please let me know in case you find I missed out anything.

 

Regards,
Narayan Saha

Deepak107
Kilo Contributor

Hi,

 

I want to insert the Rest Message Response from a 3rd party monitoring tool into ServiceNow Events table.

Can anyone please help me with this.

 

Thanks

Anirudh