admin:host-set-foreign-port( $config as element(configuration), $host-id as xs:unsignedLong, $value as xs:unsignedInt ) as element(configuration)
This function configures the specified domestic host to listen for communications from foreign hosts over the specified port.
http://marklogic.com/xdmp/privileges/admin/host
http://marklogic.com/xdmp/privileges/admin/host/{id}
xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; let $cfg := admin:get-configuration() let $hid := xdmp:host("master.marklogic.com") return admin:host-set-foreign-port($cfg, $hid, 7998) (: Configures the specified host to listen for foreign communications over port 7998. Use admin:save-configuration to save the changes to the configuration or pass the configuration to other Admin API functions to make other changes. :)