flexrep.domainStatus( domain-id as (Number|String), [with-targets as Boolean], [terse as Boolean] ) as element(flexrep.domainStatus)
This function returns the replication status for the specified replicated CPF domain.
const flexrep = require('/MarkLogic/flexrep'); // Obtain the domain ID from the database used by the Master to enable CPF. const domain = xdmp.eval( 'const dom = require("/MarkLogic/cpf/domains");' + 'fn.data(dom.get("Default Master").xpath("//dom:domain-id"));', null, { 'database' : xdmp.database('Triggers') }); const cfg = flexrep.configurationGet(domain, true); const targetId = flexrep.configurationTargetGetId(cfg, 'Replica'); flexrep.domainStatus(domain, true, false); // Returns the status of the domain and its targets.
http://marklogic.com/xdmp/privileges/flexrep-user