Scripted REST API vs Listener Transform Script for Event Management

MWC2
Tera Contributor

Hi all,

I like to ask what is the difference between Scripted REST API vs Listener Transform Script for receiving events into ITOM Event management and when would you use one over the other?

Thanks,

MC.

 

4 REPLIES 4

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

Scripted REST API : This is used for sending a data from for ex: AWS,Azure event collectors to servicenow in JSON format. Now you can also create your own Scripted rest api and share it with this third party vendors and have your own JSON format.

But when it comes to Listerner scripts then there is a generic JSON and Generic API.

https:/<<INSTANCE>>/api/global/em/inbound_event?source=genericJson.

Now this totally depends on how you want to integrate.


Thanks,
Ashutosh

vNick
ServiceNow Employee
ServiceNow Employee

Another difference is that a transform script can be run on a MID server if you want to collect and transform data prior to sending to the ServiceNow instance (versus processing on the instance with a script REST API).

MWC2
Tera Contributor

Thanks, my use case is this.  What I have is an external event sources that will be using Webhooks to forward a JSON payload to us.  Preference is not use MID if possible.  The payload does not conform to https://docs.servicenow.com/bundle/orlando-it-operations-management/page/product/event-management/ta... format.  What I want to do is receive the event once it reach the instance, massage it by extraction or manipulate it and assign the info to the event fields and then write it into the event table.

Is this possible and are both methods suited to do this using a script.

Cheers,

Michael.

HI,

Then i would say create your own scripted rest api and refine the raw data and put it in that event table.

Second option would be to use import set table and then refine data and put to event table.

Thanks,
Ashutosh