How to Run a Quick discovery from run script in workflow

Haviesh
Tera Expert

I'm trying to Take IP address as input from user in Service catalog and pass it into back end workflow to run a quick discovery.

3 REPLIES 3

Dave Ainsworth
ServiceNow Employee
ServiceNow Employee

Hi Haviesh,

Have a look at the discovery API where you can trigger a discovery on an IP address:

Discovery API - Developer Portal

Discovery API - Docs

Regards,

Dave

Is there a way to mention the specific MID for running quick discovery from a script?

I am trying the below piece of code from a background script and it returns error.

var ip = "10.11.12.13";
var mid = '8dDDDDDDDDDDDDDDDDDDca96195a';
var statusId = new Discovery().discoveryFromIP(ip + '', mid + '', '');

 

ERROR:

 

*** Script: Invalid MID server sys_id 8dDDDDDDDDDDDDDDDDDDca96195a

JF Muller
ServiceNow Employee
ServiceNow Employee

Hi,

I would suggest you to read this blog post.

Regards

Jef