MIDServer - Global

  • Versão de lançamento: Zurich
  • Atualizado 31 de jul. de 2025
  • 20 min. de leitura
  • . MIDServer a inclusão de script fornece métodos para encapsular a noção de um MID Server.

    Use esses métodos em scripts de servidor para gerenciar um MID Server Usando Ajax.

    MIDServer - getByName (nome da cadeia de caracteres)

    Retorna o MID Server especificado.

    Tabela 1. Parâmetros
    Nome Tipo Descrição
    nome Cadeia de caracteres O nome do MID Server
    Tabela 2. Retornos
    Tipo Descrição
    GlideRecord O registro do MID Server solicitado.

    O exemplo a seguir mostra como acessar e exibir detalhes do MID Server.

    // Get a mid server object by name
    var ms = MIDServer.getByName("windows_mid");
    
    // Stringify the object for display purposes
    gs.info(JSON.stringify(ms, null, 2));
    
    // Show the value of each API property 
    gs.info('hostmane ' + ms.hostname);
    gs.info('hostOS ' + ms.hostOS);
    gs.info('ip ' + ms.ip);
    gs.info('name ' + ms.name);
    gs.info('routerIP ' + ms.routerIP);
    gs.info('status ' + ms.status);
    gs.info('sysID ' + ms.sysID);
    gs.info('url ' + ms.url);
    gs.info('version ' + ms.version);
    gs.info('windowsDomain ' + ms.windowsDomain);

    Saída:

    *** Script: {
      "valid": true,
      "sysID": "3cb25f0f874b3410c3a99999cebb35ba",
      "name": "windows_mid",
      "url": null,
      "hostname": "myHostname.service-now.com",
      "hostOS": "Windows",
      "version": "fixed",
      "ip": "10.11.128.184",
      "routerIP": "10.11.128.1",
      "network": "10.11.128.0/22",
      "windowsDomain": null,
      "status": "Up",
      "validated": "true",
      "userName": "MID_Profile"
    }
    *** Script: hostname myHostname.service-now.com
    *** Script: hostOS Windows
    *** Script: ip 10.11.128.184
    *** Script: name windows_mid
    *** Script: routerIP 10.11.128.1
    *** Script: status Up
    *** Script: sysID 3cb25f0f874b3410c3a99999cebb35ba
    *** Script: url null
    *** Script: version fixed
    *** Script: windowsDomain null
    

    MIDServer - getDefault (programação DiscoverySchedule)

    Retorna o MID Server associado à programação especificada (o MID Server com o mesmo nome). Se não houver nenhum MID Server associado, obtém o próximo MID Server na tabela ecc_agent.

    Tabela 3. Parâmetros
    Nome Tipo Descrição
    agendamento Descobrir Programação A programação da descoberta
    Tabela 4. Retornos
    Tipo Descrição
    GlideRecord MID Server

    MIDServer - getForPing (programação DiscoverySchedule, intervalo DiscoveryRange)

    Retorna o MID Server com a programação especificada e o conjunto de intervalos.

    Tabela 5. Parâmetros
    Nome Tipo Descrição
    agendamento Descobrir Programação A programação da descoberta
    intervalo Descoberta O conjunto de intervalos de descoberta
    Tabela 6. Retornos
    Tipo Descrição
    GlideRecord MID Server

    MIDServer - Nome do host

    O nome do host do MID Server.

    Tabela 7. Campo
    Nome Tipo Descrição
    nome do host Cadeia de caracteres O nome do host do MID Server.

    O exemplo a seguir mostra como executar e retornar todos os parâmetros de um MID Server disponível.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Saída:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null
    q

    MIDServer - Hostos

    O sistema operacional do host do MID Server.

    Tabela 8. Campo
    Nome Tipo Descrição
    Hostos Cadeia de caracteres O sistema operacional do host do MID Server.

    O exemplo a seguir mostra como executar e retornar todos os parâmetros de um MID Server disponível.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Saída:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer - ip

    O endereço IP do host do MID Server.

    Tabela 9. Campo
    Nome Tipo Descrição
    ip Cadeia de caracteres O endereço IP do host do MID Server.

    O exemplo a seguir mostra como executar e retornar todos os parâmetros de um MID Server disponível.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Saída:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer - nome

    Nome do MID Server.

    Tabela 10. Campo
    Nome Tipo Descrição
    nome Cadeia de caracteres Nome do MID Server

    O exemplo a seguir mostra como executar e retornar todos os parâmetros de um MID Server disponível.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Saída:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer - rede

    A rede que contém o host do MID Server.

    Tabela 11. Campo
    Nome Tipo Descrição
    rede Cadeia de caracteres A rede que contém o host do MID Server. Por exemplo, "10.10.10.0/24" ou "10.10.10.0/255.255.255.0".

    O exemplo a seguir mostra como executar e retornar todos os parâmetros de um MID Server disponível.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Saída:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer - RouterIP

    O endereço IP do roteador padrão do host do MID Server.

    Tabela 12. Campo
    Nome Tipo Descrição
    RouterIP Cadeia de caracteres O endereço IP do roteador padrão do host do MID Server.

    O exemplo a seguir mostra como executar e retornar todos os parâmetros de um MID Server disponível.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Saída:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer - status

    O status do MID server ("Ativo" ou "Inativo").

    Tabela 13. Campo
    Nome Tipo Descrição
    status Cadeia de caracteres O status do MID server ("Ativo" ou "Inativo").

    O exemplo a seguir mostra como executar e retornar todos os parâmetros de um MID Server disponível.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Saída:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MISID - SYSID

    O sys_id do registro do MID Server.

    Tabela 14. Campo
    Nome Tipo Descrição
    sysID Cadeia de caracteres O sys_id do registro do MID Server.

    O exemplo a seguir mostra como executar e retornar todos os parâmetros de um MID Server disponível.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Saída:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer - url

    O URL que o MID Server usa para entrar em contato com a instância.

    Tabela 15. Campo
    Nome Tipo Descrição
    URL Cadeia de caracteres O URL que o MID Server usa para entrar em contato com a instância.

    O exemplo a seguir mostra como executar e retornar todos os parâmetros de um MID Server disponível.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Saída:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer - versão

    Versão do MID server (nome WAR).

    Tabela 16. Campo
    Nome Tipo Descrição
    versão Cadeia de caracteres Versão do MID server (nome WAR).

    O exemplo a seguir mostra como executar e retornar todos os parâmetros de um MID Server disponível.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Saída:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer - Windows Domain

    Domínio do Windows do host do MID Server (se for uma máquina Windows).

    Tabela 17. Campo
    Nome Tipo Descrição
    Domínio do Windows Cadeia de caracteres O domínio do Windows do host do MID Server.

    O exemplo a seguir mostra como executar e retornar todos os parâmetros de um MID Server disponível.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Saída:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null