how to call rest message through br?

Servicenow10
Kilo Guru

hi 

i have to call rest api through br can anyone tell me how can i do it and i also have to send variables.

 

thanks 

5 REPLIES 5

Ct111
Tera Sage

Hello,

First you might have set up the REST message for testing purpose , so once it is tested successfully you can just take the script by clicking on script option under Testing connection and get the code that you will use in business rule.

 

Now create a business rule and copy paste the same script , select the appropriate table and select appropriate condition as per your need like insert or update, and also don't forget the user who will be triggering this REST message because you don't want other people to trigger this br only the rest user.

 

As you said you are sending variables that means POST method , so see sample script of POST method in below link

https://docs.servicenow.com/bundle/orlando-application-development/page/integrate/custom-web-service...

 

Mark my ANSWER as CORRECT and HELPFUL if it helps