Rest Integration in ServiceNow

RimaJ
Tera Contributor

Hello community, I have a few questions regarding REST application integration in ServiceNow:

 

  1. How can I test these integrations without actually sending HTTP requests to the real application (without testing the actual HTTP method)?
  2. If there isn't a method to test them, can I test them with code?
  3. Does ServiceNow log the results of the HTTP requests anywhere?
  4. What is the proper method to know if an integration is working well or not?
1 REPLY 1

Marcos Kassak
Kilo Sage
Kilo Sage

Hi @RimaJ,

 

I suggest you test using Mock services, such as Postman, you can test the endpoint and payload that someone shared with you without creating entirely on the instance. That speeds up your development.

 

MarcosKassak_1-1702650076392.png

 

In the example above I'm testing an API from ServiceNow, but it could be any existing API.

 

As per your question regarding whether ServiceNow stores logs about integration, yes it does, you can find it below:

 

MarcosKassak_0-1702649891246.png

 

It is important to mention that you can also add gs.log(); in your Script Include code to log your payloads, and inbound HTTP calls to keep track of it. A side note is to comment them before go-live so you don't deploy with logs in Production.

 

If you found my answer helpful or correct in any way, please don't forget to mark it to help future readers! 👍

 

--

 

Kind regards,


Marcos Kassak
Solution Consultant  🎯