Loading TOC...

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');
  var config = admin.getConfiguration()
  var spec = admin.forestSetEnabled(config,
    xdmp.forest("myForest"), fn.true() )
  admin.saveConfiguration(spec)

  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.