
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');
  const config = admin.getConfiguration()
  admin.appserverGetHostIds(config, admin.appserverGetId(config, (),
    "myAppServer"))
  
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.