Need help with the Scripted REST API

Priya Singh9
Tera Contributor

Hi All,

 

We have a requirement to create the business rule from another third party application. For that I created a scripted REST API in service-now with the below code and sending the authorization, header and query parameters from the Postman to test this API. Its creating the business rule in ServiceNow when I send the request from postman, however the filter condition and script shows empty on the business rule that got created from the postman. Can anyone please help me with this. Note that I am getting the parameter values properly in the log statement.

 

PriyaSingh9_0-1721156400970.pngPriyaSingh9_1-1721156499159.png

 

 

2 REPLIES 2

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Whats the need to create a business rule in such a way? Can you explain that a bit? Without any background in this, my first thought to this is overengineering.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hi Mark,

 

We have a requirement to validate and automate the code through CICD pipeline. For that we need to deploy the code from azure devops by creating a business rule in servicenow.