MIDServerSelector - Global

concept australia Updated Sep 10, 2026 1 min read c_MIDServerSelectorAPI.md
Raw file servicenow.com

The MIDServerSelector script include provides methods to find a MID Server based on capabilities and target IP address.

Use in server scripts to find a MID Server with specific capabilities.

Parent Topic:Server API reference

MIDServerSelector - MIDServerSelector()

Creates an instance of MIDServerSelector.

Name Type Description
None
Type Description
void

MIDServerSelector - findAgent(String target)

Finds the MID server based on the capabilities and target IP address.

Name Type Description
target String The target IP address
Type Description
void
JavaScript
var mss = new MIDServerSelector();var capab = ["ssh","wmi","snmp"];mss.setCapabilities(capab);mss.findAgent('100.101.10.10');

MIDServerSelector - getError()

Gets the error messages for the current MID server.

Name Type Description
None
Type Description
void
JavaScript
var mss = new MIDServerSelector();var capab = ["ssh","wmi","snmp"];mss.setCapabilities(capab);mss.findAgent('100.101.10.10');mss.getError();

MIDServerSelector - getWarning()

Gets the warning messages for the current MID server.

Name Type Description
None
Type Description
void
JavaScript
var mss = new MIDServerSelector();var capab = ["ssh","wmi","snmp"];mss.setCapabilities(capab);mss.findAgent('100.101.10.10');mss.getWarning();

MIDServerSelector - setCapabilities(Array capabilities)

Sets the technologies for which to look.

Name Type Description
capabilities Array A list of capabilities, for example - capabilities = ["ssh","wmi","snmp",{"os_domain":"disco"},{"phase":1}];
Type Description
void
JavaScript
var mss = new MIDServerSelector();var capab = ["ssh","wmi","snmp"];mss.setCapabilities(capab);
Search documentation
Search document titles and file paths on the australia branch