How to use REST API in Business Rule?

IG3
Tera Contributor

Hello,

i have created a Scripted REST API, it’s a POST Method to create Changes and when I open it with the REST API Explorer I can submit values und send request.

Now my question: Is it possible to give values with my Business Rule to the Rest API?

13 REPLIES 13

Chandu Telu
Tera Guru
Tera Guru

Hi IG,

Check the below link it have the steps

https://community.servicenow.com/community?id=community_question&sys_id=d357b366db3cdb402b6dfb651f961917

IG3
Tera Contributor
I will try it out. Thank you

suvro
Mega Sage
Mega Sage

What is the business requirement to do that. If you have created a Scripted REST API, that means  you are expecting values from outside ServiceNow. 

IG3
Tera Contributor
I try to explain on detail: So my Business Rule had a Condition „when task is closed“ and a Script: create Change Request with the type „whitelist change“. (Whitelist change is when you don’t need approve or something, it goes over the step „approve“ directly to „implement“ step. The Business Rule did also insert values to fields and choose template etc… but not all fields was correctly fill in. So someone of my company created a scripted REST API (POST). With the rest api explorer I give values like „date start“, „date end“, „template“, „CI“… and he create me a Change Request. Well but I want take the process by Business Rule and not on my self to insert the values in the explorer. The Business Rule should take the values of a record from a table and give it to the api where it insert the values.