Loading TOC...


admin:get-configuration() as element(configuration)


Loads the admin configuration into memory for use by other functions in the Admin module.

Required Privileges


Usage Notes

The configuration is loaded into memory only as it is needed, so it might not contain the entire configuration at any given moment. It loads only the parts of the configuration that are needed at the time they are needed to perform other Admin module operations that specified in the XQuery request. Therefore, if you execute the function without calling any other Admin module functions, it will return the empty sequence (because it never needed any of the config information to perform any of the Admin module operations).


  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin"
		  at "/MarkLogic/admin.xqy";

   let $config := admin:get-configuration()
                           xdmp:database("Documents") )

  => The xml for any element range indexes in the "Documents"
     database, for example:
   <range-element-index xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

   (: returns the new configuration element -- use admin:save-configuration
      to save the changes to the configuration or pass the configuration
      to other Admin API functions to make other changes.  :)

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