MarkLogic 12 EA 1 Product Documentation
admin.saveConfiguration

admin.saveConfiguration(
   config as element(configuration)
) as null

Summary

This function saves a configuration specification to the cluster configuration files. It restarts MarkLogic Server for "cold" administrative tasks only (for example, for App Server port assignment changes). If you do not want those "cold" administrative tasks to automatically restart MarkLogic Server, use admin:save-configuration-without-restart instead.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.

Required Privileges

This operation requires at least one of the following privileges:

http://marklogic.com/xdmp/privileges/admin-module-write

http://marklogic.com/xdmp/privileges/xdmp-write-cluster-config-file

http://marklogic.com/xdmp/privileges/xdmp-write-cluster-config-file/{filename}

Example

  
  const admin = require('/MarkLogic/admin.xqy');
  const config = admin.getConfiguration()
  const spec = admin.forestSetEnabled(config,
    xdmp.forest("myForest"), fn.true() )
  admin.saveConfiguration(spec)

  
Powered by MarkLogic Server | Terms of Use | Privacy Policy