admin.forestForeignMasterGetClusterId( foreign-master as element(as.foreignMaster) ) as (Number|String)
This function returns the ID for the cluster from the foreign master forest configuration element.
xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; let $cfg := admin:get-configuration() let $fmforest := admin:forest-get-foreign-master($cfg, xdmp:forest("Documents")) return admin:forest-foreign-master-get-cluster-id($fmforest) (: Returns the id for the foreign master cluster. :)