admin.appserverGetHostIds( config as element(configuration), appserver-id as (Number|String) ) as Sequence
This function returns the ID(s) of the hosts the specified App Server's is currently running on.
http://marklogic.com/xdmp/privileges/admin/app-server
http://marklogic.com/xdmp/privileges/admin/app-server/{id}
const admin = require('/MarkLogic/admin.xqy'); var config = admin.getConfiguration() admin.appserverGetHostIds(config, admin.appserverGetId(config, (), "myAppServer"))