servicenow

Tip: Create Scripted REST API in servicenow and consume it in PowerShell

In this blog post let me walk through the simple steps to create a “Scripted REST API” which simply prints the hardcoded values.┬áThis is a beginners guide so let’s keep things easier! Navigate here to get some more information.

Step 1: Login to servicenow

Step 2: Search for Scripted REST API – in Filter Navigator.

Step 3: Click New

Step 4: Name your API (In our case it’s aboutme). All other fields remains same.

Step 5: Scroll down to add resources. Click New

Step 6: Name as you wish (aboutme Demo)

That’s it! Check out the skeleton code

Copy paste the code in resource area.

Submit and open REST API Explorer! TO TEST or PLAY WITH PowerShell!

Output

 

Leave a Reply

Your email address will not be published. Required fields are marked *