MarkLogic 12 EA 1 Product Documentation
admin.hostExists

admin.hostExists(
   config as element(configuration),
   host-name as String
) as Boolean

Summary

This function determines whether or not the specified Host exists. Returns true if the Host exists, otherwise false is returned.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.
host-name The name of the host to check.

Example

  
  const admin = require('/MarkLogic/admin.xqy');
  const config = admin.getConfiguration()
  admin.hostExists(config, "hp6910624v64b.marklogic.com")

   //Returns true, if the specified host exists. 
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy