This page was generated
August  8,  2011
2:23  AM
XQuery Built-In and Modules Function Reference

Module: Admin Library - Appserver Functions

The Admin module is an XQuery library module that allows you to script administrative tasks that you otherwise would need the Admin Interface to perform. Most functions in this library perform adminstrative tasks and therefore require the user who runs the XQuery program to have the Admin role.

Many of these functions provide new configuration information. In most cases, you must save the configuration (with admin:save-configuration, for example) in the same statement that you use the functions in order for them to take effect.

To use the Admin module as part of your own XQuery module, include the following line in your XQuery prolog:

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

The library namespace prefix admin is not predefined in the server.

Function Summary
admin:appserver-add-namespace Add one or more namespaces to an App Server configuration, which will predefine the namespace(s) for all requests evaluated against the App Server.
admin:appserver-add-request-blackout This function adds a request blackout specification for a appserver to a configuration.
admin:appserver-add-schema This function adds a schema binding definition to the existing schema binding definitions in the configuration for the specified App Server.
admin:appserver-copy This function creates a new App Server specification with the same settings as the App Server with the specified ID.
admin:appserver-delete This function deletes one or more App Servers in the configuration.
admin:appserver-delete-namespace This function deletes a namespace configuration from the configuration for the specified App Server.
admin:appserver-delete-request-blackout This function deletes a request blackout specification for a appserver from a configuration.
admin:appserver-delete-schema This function deletes a schema definition in the configuration for the specified App Server.
admin:appserver-get-address This function returns the IP address of the App Server configuration.
admin:appserver-get-authentication This function returns the authentication scheme (basic, digest, digestbasic, or application-level) configured for the specified App Server.
admin:appserver-get-backlog This function returns the socket listen backlog setting for the specified App Server.
admin:appserver-get-collation This function returns the collation URI set in the configuration for the specified App Server.
admin:appserver-get-compute-content-length This function returns the value of whether the WebDAV server computes content length.
admin:appserver-get-concurrent-request-limit This function returns the concurrent request limit for any user for the specified App Server.
admin:appserver-get-database This function returns the ID of the database to which the App Server is set to execute queries against for the specified database.
admin:appserver-get-debug-allow This function returns the value of debug allow setting configured for this App Server, where true indicates that the App Server will allow queries to be debugged, and false indicates that it will not.
admin:appserver-get-default-time-limit This function returns the default time limit value configured for the specified App Server.
admin:appserver-get-default-user This function returns the default user value configured for the specified App Server.
admin:appserver-get-default-xquery-version This function returns the value of the default xquery version configured for the specified App Server.
admin:appserver-get-display-last-login This function returns the value of the whether or not the appserver should display users' last login information.
admin:appserver-get-enabled This function returns the enabled state for the specified App Server.
admin:appserver-get-error-handler This function returns the path to the error handler configured for this App Server.
admin:appserver-get-group-id This function returns the ID of the specified App Server's group.
admin:appserver-get-host-ids This function returns the ID(s) of the hosts the specified App Server's is currently running on.
admin:appserver-get-id This function returns the ID of the specified App Server.
admin:appserver-get-keep-alive-timeout This function returns the keep alive timeout value configured for the specified App Server.
admin:appserver-get-last-login This function returns the ID of the database to which the App Server stores users' last login information.
admin:appserver-get-log-errors This function returns the value of the log errors setting configured for this App Server, where true indicates that the App Server will send uncaught exceptions to the ErrorLog.txt file, and false indicates that it will not.
admin:appserver-get-max-time-limit This function returns the max time limit value configured for the specified App Server.
admin:appserver-get-modules-database This function returns the ID of the database set as the modules database for the specified database.
admin:appserver-get-name This function returns the name of the appserver with the specified ID.
admin:appserver-get-namespaces This function returns the value of any namespace definitions predefined for the specified App Server.
admin:appserver-get-output-encoding This function returns the value for the output encoding setting for the specified App Server.
admin:appserver-get-output-sgml-character-entities This function returns the value for the output sgml character entities setting for the specified App Server.
admin:appserver-get-port This function returns the port for the specified App Server.
admin:appserver-get-pre-commit-trigger-depth This function returns the pre commit trigger depth value configured for the specified App Server.
admin:appserver-get-pre-commit-trigger-limit This function returns the pre commit trigger limit value configured for the specified App Server.
admin:appserver-get-privilege This function returns the privilege ID for the specified App Server.
admin:appserver-get-profile-allow This function returns the value of the profile allow setting configured for this App Server, where true indicates that the App Server will allow queries to be profiled, and false indicates that it will not.
admin:appserver-get-request-blackouts This function returns the request blackouts specification for the specified appserver from the configuration.
admin:appserver-get-request-timeout This function returns the request timeout value configured for the specified App Server.
admin:appserver-get-root This function returns the root for the specified App Server.
admin:appserver-get-schemas This function returns the value of any schemas definitions predefined for the specified App Server.
admin:appserver-get-session-timeout This function returns the session timeout value configured for the specified App Server.
admin:appserver-get-ssl-allow-sslv3 This function returns true if the SSL v3 protocol is enabled for the specified App Server, or false if SSL v3 is disabled.
admin:appserver-get-ssl-allow-tls This function returns true if the TLS protocol is enabled for the specified App Server, or false if TLS is disabled.
admin:appserver-get-ssl-certificate-template This function returns the id of the SSL certificate template used by the specified App Server.
admin:appserver-get-ssl-ciphers This function returns the SSL ciphers set for the App Server.
admin:appserver-get-ssl-client-certificate-authorities This function returns the id(s) of the client certificate authority for the specified App Server.
admin:appserver-get-ssl-hostname This function returns the SSL hostname for the specified App Server.
admin:appserver-get-ssl-require-client-certificate This function returns true if a client certificate is required for the specified App Server.
admin:appserver-get-static-expires This function returns the value of the "expires" HTTP header for static content to expire after this many seconds port for the specified App Server.
admin:appserver-get-threads This function returns the maximum number of threads configured for the specified App Server.
admin:appserver-get-type This function returns the type of appserver with the specified ID.
admin:appserver-get-url-rewriter This function returns the path to the URL rewriter configured for this App Server.
admin:appserver-one-time-request-blackout This function constructs a one-time request-blackout specification.
admin:appserver-recurring-request-blackout This function constructs a request-blackout specification.
admin:appserver-set-address This function changes the IP Address in the configuration for the specified App Server to the specified address.
admin:appserver-set-authentication This function sets the authentication scheme in the configuration for the specified App Server.
admin:appserver-set-backlog This function sets the value in the configuration of the backlog (the maximum number of pending connections allowed on the HTTP socket) for the specified App Server.
admin:appserver-set-collation This function sets the default collation in the configuration for the specified App Server.
admin:appserver-set-compute-content-length This function changes the value whether a WebDAV server computes content length.
admin:appserver-set-concurrent-request-limit This function sets the limit on concurrent requests that any user may have on a particular appserver.
admin:appserver-set-database This function sets the value in the configuration of the database for the specified App Server.
admin:appserver-set-debug-allow This function sets the debug allow setting in the configuration for the specified App Server.
admin:appserver-set-default-time-limit This function sets the default time limit (the maximum total amount of time to service a request before the App Server throws a timeout exception) in the configuration for the specified App Server.
admin:appserver-set-default-user This function sets the default user (for use with application-level authentication) in the configuration for the specified App Server.
admin:appserver-set-default-xquery-version This function sets the default XQuery version setting in the configuration for this App Server.
admin:appserver-set-display-last-login This function sets the display last login setting in the configuration for the specified App Server.
admin:appserver-set-enabled This function sets the enabled state in the configuration for the specified App Server.
admin:appserver-set-error-handler This function sets the value of the path to the error handler in the configuration for the specified App Server.
admin:appserver-set-keep-alive-timeout This function sets the keep-alive timeout (the maximum number of second for subsequent socket requests to time out) in the configuration for the specified App Server.
admin:appserver-set-last-login This function sets the value in the configuration of the last login database for the specified App Server.
admin:appserver-set-log-errors This function sets the log errors setting in the configuration for the specified App Server.
admin:appserver-set-max-time-limit This function sets the max time limit (the maximum total amount of time to service a request before the App Server throws a timeout exception) in the configuration for the specified App Server.
admin:appserver-set-modules-database This function sets the value in the configuration of modules database for the specified App Server to the specified database ID.
admin:appserver-set-name This function changes the name of an existing App Server to the newly specified value.
admin:appserver-set-output-encoding This function sets the value for the default output encoding in the configuration for the specified App Server.
admin:appserver-set-output-sgml-character-entities This function sets the SGML character entity output setting in the configuration for the specified App Server.
admin:appserver-set-port This function changes the port in the configuration for the specified App Server to the specified number.
admin:appserver-set-pre-commit-trigger-depth This function sets the maximum depth (how many triggers can cause other triggers to fire, which in turn cause others to fire, and so on) in the configuration for the specifed App Server.
admin:appserver-set-pre-commit-trigger-limit This function sets the value in the configuration for the maximum number of pre-commit triggers a single statement can invoke for the specified App Server.
admin:appserver-set-privilege This function sets an execute privilege in the configuration for the specified App Server.
admin:appserver-set-profile-allow This function sets the profile allow setting in the configuration for the specified App Server.
admin:appserver-set-request-timeout This function sets the value of the socket request timeout (the number of seconds before the socket times out) in the configuration for the specified App Server.
admin:appserver-set-root This function changes the root for a specified App Server to the newly specified value.
admin:appserver-set-session-timeout This function sets the session timeout value (in seconds) in the configuration for the specified App Server.
admin:appserver-set-ssl-allow-sslv3 This function enables or disables the SSL v3 protocol for the specified App Server.
admin:appserver-set-ssl-allow-tls This function enables or disables the TLS protocol for the specified App Server.
admin:appserver-set-ssl-certificate-template This function sets an SSL certificate template for the specified App Server.
admin:appserver-set-ssl-ciphers This function sets SSL ciphers for the specified App Server.
admin:appserver-set-ssl-client-certificate-authorities This function sets one or more client certificate authorities that sign client certificates for the specified App Server.
admin:appserver-set-ssl-hostname This function sets an SSL hostname for the specified App Server.
admin:appserver-set-ssl-require-client-certificate This function determines whether or not a client certificate is required for the specified App Server.
admin:appserver-set-static-expires This function changes the value of the "expires" HTTP header for a specified App Server to the newly specified value.
admin:appserver-set-threads This function sets the value in the configuration of the maximum number of threads for the specified App Server.
admin:appserver-set-url-rewriter This function sets the value of the path to the URL rewriter in the configuration for the specified App Server.
admin:get-appserver-ids This function returns all the appserver IDs from the configuration.
admin:http-server-create This function creates a new HTTP App Server with the specified name, root, and port in the configuration.
admin:taskserver-get-debug-allow This function returns the value for the debug-allow setting configured on the task server for the specified group.
admin:taskserver-get-debug-threads This function returns the number of debug threads configured on the task server for the specified group.
admin:taskserver-get-default-time-limit This function returns the default time limit configured on the task server for the specified group.
admin:taskserver-get-log-errors This function returns the value for the log-errors setting configured on the task server for the specified group.
admin:taskserver-get-max-time-limit This function returns the maximum time limit configured on the task server for the specified group.
admin:taskserver-get-name This function returns the name of the task server for the specified group from the configuration.
admin:taskserver-get-post-commit-trigger-depth This function returns the maximum post-commit trigger depth configured on the task server for the specified group.
admin:taskserver-get-pre-commit-trigger-depth This function returns the maximum pre-commit trigger depth configured on the task server for the specified group.
admin:taskserver-get-pre-commit-trigger-limit This function returns the pre-commit trigger limit configured on the task server for the specified group.
admin:taskserver-get-profile-allow This function returns the value for the profile-allow setting configured on the task server for the specified group.
admin:taskserver-get-queue-size This function returns the number queue size configured on the task server for the specified group.
admin:taskserver-get-threads This function returns the number of threads configured on the task server for the specified group.
admin:taskserver-set-debug-allow This function sets the value for the debug allow setting for the task server in the configuration.
admin:taskserver-set-debug-threads This function sets the value in the configuration of the maximum number of debug threads for the specified task server.
admin:taskserver-set-default-time-limit This function sets the task server default time limit in the configuration.
admin:taskserver-set-log-errors This function sets the value for the log errors setting for the task server in the configuration.
admin:taskserver-set-max-time-limit This function sets the task server max time limit in the configuration.
admin:taskserver-set-post-commit-trigger-depth This function sets the value for the task server post-commit trigger depth in the configuration.
admin:taskserver-set-pre-commit-trigger-depth This function sets the value for the task server pre-commit trigger depth in the configuration.
admin:taskserver-set-pre-commit-trigger-limit This function sets the value for the task server pre-commit trigger depth in the configuration.
admin:taskserver-set-profile-allow This function sets the value for the profile allow setting for the task server in the configuration.
admin:taskserver-set-queue-size This function sets the value in the configuration of the maximum queue size for the specified task server.
admin:taskserver-set-threads This function sets the value in the configuration of the maximum number of threads for the specified task server.
admin:webdav-server-create This function creates a new WebDAV App Server with the specified name, library, and port in the configuration.
admin:xdbc-server-create This function creates a new XDBC App Server with the specified name, root, and port in the configuration.
Function Detail
admin:appserver-add-namespace(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$namespaces as element(gr:namespace)*
)  as   element(configuration)
Summary:

Add one or more namespaces to an App Server configuration, which will predefine the namespace(s) for all requests evaluated against the App Server.

Parameters:
$config : The configuration for the cluster, typically the result of admin:get-configuration() call.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$namespaces :

A list of namespaces to add. Each namespace specification has the following form:

  <namespace xmlns="http://marklogic.com/xdmp/group">
    <prefix>myprefix</prefix>
    <namespace-uri>http://myuri/forthisprefix</namespace-uri>		    
  </namespace>
	 
Typically the result of an admin:group-namespace call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:appserver-add-namespace($config, 
    admin:appserver-get-id($config,(), "Docs"), 
    <namespace xmlns="http://marklogic.com/xdmp/group">
      <prefix>myprefix</prefix>
      <namespace-uri>http://myuri/forthisprefix</namespace-uri>		    
    </namespace>)

  => The XML for new configuration with this namespace added.  Use 
     this as the argument to admin:save-configuration to change 
     the configuration.
  

admin:appserver-add-request-blackout(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$request-blackouts as element(gr:request-blackout)*
)  as   element(configuration)
Summary:

This function adds a request blackout specification for a appserver to a configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The id of the appserver (for example, xdmp:server("myAppserver")).
$request-blackouts : The request blackout specification(s), typically the result of an admin:appserver-one-time-request-blackout or an admin:appserver-recurring-request-blackout call

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $app-id := xdmp:server("myAppserver")
  let $requestspec := admin:appserver-one-time-request-blackout((),(),500,  
        xs:dateTime("2008-02-14T09:45:00"), 
        (), xs:dayTimeDuration("PT3H") )
  return
  admin:appserver-add-request-blackout($config, $app-id, $requestspec)
  (: 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.  :)  

  

admin:appserver-add-schema(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$schemas as element(gr:schema)*
)  as   element(configuration)
Summary:

This function adds a schema binding definition to the existing schema binding definitions in the configuration for the specified App Server. Schemas with a schema binding definition are automatically imported into queries run against the App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$schemas : A list of schema specification elements of the form:
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns="http://marklogic.com/xdmp/group">
  <namespace-uri>foo</namespace-uri>
  <schema-location>/foo.xsd</schema-location>
</schema>
Typically the result of an admin:group-schema call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-add-schema($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
  <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns="http://marklogic.com/xdmp/group">
     <namespace-uri>foo</namespace-uri>
     <schema-location>/foo.xsd</schema-location>
  </schema>)
  (: 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.  :)

  

admin:appserver-copy(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$target-group-id as xs:unsignedLong?,
$appserver-name as xs:string,
$port as xs:unsignedLong
)  as   element(configuration)
Summary:

This function creates a new App Server specification with the same settings as the App Server with the specified ID. The new App Server configuration will have the specified name. You can copy the App Server to a new one either in the same group (by specifying $old-group-id and $new-group-id with the same group ID) or in a different group.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$target-group-id : The optional group ID of the new group to which the App Server is copied. If no ID is provided, the appserver will be copied to the same group it exists in. Typically, this is the result of an admin:group-get-id call.
$appserver-name : The new name for the App Server.
$port : The port number for the new App Server.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $group-id := admin:group-get-id($config, "Default")
  let $appserver-id := admin:appserver-get-id($config, $group-id, 
                       "myAppServer")
  return
  admin:appserver-copy($config, $appserver-id, $group-id,
                       "myNewAppServer", 8012)

  (: 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.  :)

  

admin:appserver-delete(
$config as element(configuration),
$appserver-ids as xs:unsignedLong*
)  as   element(configuration)
Summary:

This function deletes one or more App Servers in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-ids : The ID(s) of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "myGroup")
  return
  admin:appserver-delete($config,
        admin:appserver-get-id($config, $groupid, "myAppServer") )
  (: 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.  :)  
  

admin:appserver-delete-namespace(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$namespaces as element(gr:namespace)*
)  as   element(configuration)
Summary:

This function deletes a namespace configuration from the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$namespaces :

A list of namespaces to add. Each namespace specification has the following form:

  <namespace xmlns="http://marklogic.com/xdmp/group">
    <prefix>myprefix</prefix>
    <namespace-uri>http://myuri/forthisprefix</namespace-uri>		    
  </namespace>
	 
Typically the result of an admin:group-namespace call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-delete-namespace($config,
       admin:appserver-get-id($config, $groupid, "myAppServer"),
   <namespace xmlns="http://marklogic.com/xdmp/group">
     <prefix>myprefix</prefix>
     <namespace-uri>http://myuri/forthisprefix</namespace-uri>		    
   </namespace>)
  (: 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.  :)  

  

admin:appserver-delete-request-blackout(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$blackouts as element(gr:request-blackout)*
)  as   element(configuration)
Summary:

This function deletes a request blackout specification for a appserver from a configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The id of the appserver (for example, xdmp:server("myAppserver")).
$blackouts : The request blackout(s) to delete. Typically, the result of an admin:appserver-get-request-blackouts call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $app-id := xdmp:server("myAppserver")
  let $requestspec := admin:appserver-get-request-blackouts($config, 
        $app-id )
  return
  admin:appserver-delete-request-blackout($config, $app-id, $requestspec)
  (: 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.  :)  

  

admin:appserver-delete-schema(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$schemas as element(gr:schema)*
)  as   element(configuration)
Summary:

This function deletes a schema definition in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$schemas : A list of schema specification elements of the form:
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns="http://marklogic.com/xdmp/group">
  <namespace-uri>foo</namespace-uri>
  <schema-location>/foo.xsd</schema-location>
</schema>
Typically the result of an admin:group-schema call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-delete-schema($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
  <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns="http://marklogic.com/xdmp/group">
     <namespace-uri>foo</namespace-uri>
     <schema-location>/foo.xsd</schema-location>
  </schema>)
  (: 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.  :)

  

admin:appserver-get-address(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the IP address of the App Server configuration. The default is 0.0.0.0.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-address($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-authentication(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the authentication scheme (basic, digest, digestbasic, or application-level) configured for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-authentication($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-backlog(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the socket listen backlog setting for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-backlog($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-collation(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the collation URI set in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-collation($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-compute-content-length(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns the value of whether the WebDAV server computes content length.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-compute-content-length($config,
             admin:appserver-get-id($config, $groupid, "myWebDAVServer"))

  

admin:appserver-get-concurrent-request-limit(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the concurrent request limit for any user for the specified App Server. 0 indicates no bound on the number of concurrent requests.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml"

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-concurrent-request-limit($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-database(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedLong
Summary:

This function returns the ID of the database to which the App Server is set to execute queries against for the specified database.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-database($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-debug-allow(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns the value of debug allow setting configured for this App Server, where true indicates that the App Server will allow queries to be debugged, and false indicates that it will not.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-debug-allow($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-default-time-limit(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the default time limit value configured for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-default-time-limit($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  

admin:appserver-get-default-user(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedLong
Summary:

This function returns the default user value configured for the specified App Server. The default user only is used with application-level authentication.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-default-user($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-default-xquery-version(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the value of the default xquery version configured for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-default-xquery-version($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-display-last-login(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns the value of the whether or not the appserver should display users' last login information.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-display-last-login($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  

admin:appserver-get-enabled(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns the enabled state for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-enabled($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-error-handler(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the path to the error handler configured for this App Server. If no error handler is configured, returns the empty string.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-error-handler($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  

admin:appserver-get-group-id(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedLong
Summary:

This function returns the ID of the specified App Server's group.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:appserver-get-group-id($config, admin:appserver-get-id($config, (), 
    "myAppServer"))

  

admin:appserver-get-host-ids(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedLong*
Summary:

This function returns the ID(s) of the hosts the specified App Server's is currently running on.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:appserver-get-host-ids($config, admin:appserver-get-id($config, (), 
    "myAppServer"))

  

admin:appserver-get-id(
$config as element(configuration),
$group-ids as xs:unsignedLong*,
$appserver-name as xs:string
)  as   xs:unsignedLong*
Summary:

This function returns the ID of the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-ids : The optional group-ids in which to restrict the appserver ids returned. If no group-id is specified, this function will return all matching appservers across all groups.
$appserver-name : The name of the App Server.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:appserver-get-id($config, admin:group-get-id($config, "Default"),
         "myAppServer")

  

admin:appserver-get-keep-alive-timeout(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the keep alive timeout value configured for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-keep-alive-timeout($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  

admin:appserver-get-last-login(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedLong
Summary:

This function returns the ID of the database to which the App Server stores users' last login information.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-last-login($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-log-errors(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns the value of the log errors setting configured for this App Server, where true indicates that the App Server will send uncaught exceptions to the ErrorLog.txt file, and false indicates that it will not.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-log-errors($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  

admin:appserver-get-max-time-limit(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the max time limit value configured for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-max-time-limit($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  

admin:appserver-get-modules-database(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedLong
Summary:

This function returns the ID of the database set as the modules database for the specified database.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-modules-database($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-name(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the name of the appserver with the specified ID.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-name($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  

admin:appserver-get-namespaces(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   element(gr:namespace)*
Summary:

This function returns the value of any namespace definitions predefined for the specified App Server. If none are defined, returns the empty sequence.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-namespaces($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))


  

admin:appserver-get-output-encoding(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the value for the output encoding setting for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-output-encoding($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-output-sgml-character-entities(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the value for the output sgml character entities setting for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-output-sgml-character-entities($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-port(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the port for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-port($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-pre-commit-trigger-depth(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the pre commit trigger depth value configured for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-pre-commit-trigger-depth($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-pre-commit-trigger-limit(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the pre commit trigger limit value configured for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-pre-commit-trigger-limit($config,  
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  

admin:appserver-get-privilege(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedLong
Summary:

This function returns the privilege ID for the specified App Server. If no privilege is configured, It returns 0.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-privilege($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-profile-allow(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns the value of the profile allow setting configured for this App Server, where true indicates that the App Server will allow queries to be profiled, and false indicates that it will not.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-profile-allow($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-request-blackouts(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   element(gr:request-blackout)*
Summary:

This function returns the request blackouts specification for the specified appserver from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The id of the appserver (for example, xdmp:server("myAppserver")).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  return
  admin:appserver-get-request-blackouts($config, xdmp:server("myAppserver") )
  (: returns the request-blackouts specification for the appserver :)

  

admin:appserver-get-request-timeout(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the request timeout value configured for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-request-timeout($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-root(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the root for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-root($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-schemas(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   element(gr:schema)*
Summary:

This function returns the value of any schemas definitions predefined for the specified App Server. If none are defined, returns the empty sequence.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-schemas($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-session-timeout(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the session timeout value configured for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-session-timeout($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-ssl-allow-sslv3(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns true if the SSL v3 protocol is enabled for the specified App Server, or false if SSL v3 is disabled.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $appServer := admin:appserver-get-id($config, 
          admin:group-get-id($config, "Default"),
          "Docs")

  return
      admin:appserver-get-ssl-allow-sslv3($config, $appServer)

   (: Returns true if SSL v3 is enabled for the "Docs" App Server.  Otherwise false. :)
     

admin:appserver-get-ssl-allow-tls(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns true if the TLS protocol is enabled for the specified App Server, or false if TLS is disabled.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $appServer := admin:appserver-get-id($config, 
          admin:group-get-id($config, "Default"),
          "Docs")

  return
      admin:appserver-get-ssl-allow-tls($config, $appServer)
  
   (: Returns true if TLS is enabled for the "Docs" App Server.  Otherwise false. :)
     

admin:appserver-get-ssl-certificate-template(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedLong
Summary:

This function returns the id of the SSL certificate template used by the specified App Server. If no template is set for the App Server, 0 is returned.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $appServer := admin:appserver-get-id($config, 
          admin:group-get-id($config, "Default"),
          "Docs")

  return
     admin:appserver-get-ssl-certificate-template($config, $appServer)

    (: returns the id of the SSL certificate template. :)
   

admin:appserver-get-ssl-ciphers(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the SSL ciphers set for the App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $appServer := admin:appserver-get-id($config, 
          admin:group-get-id($config, "Default"),
          "Docs")

  return
     admin:appserver-get-ssl-ciphers($config, $appServer)

  (: returns the SSL ciphers set for the App Server. :)
   

admin:appserver-get-ssl-client-certificate-authorities(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedLong*
Summary:

This function returns the id(s) of the client certificate authority for the specified App Server. If no client certificate authority is set, this function returns an empty sequence.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $appServer := admin:appserver-get-id($config, 
          admin:group-get-id($config, "Default"),
          "Docs")

  return 
     admin:appserver-get-ssl-client-certificate-authorities($config, $appServer)
  
  (: Returns the id(s) of the client certificate authority for the "Docs" App Server, if set.  
  Otherwise returns an empty sequence. :)
     

admin:appserver-get-ssl-hostname(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:string?
Summary:

This function returns the SSL hostname for the specified App Server. If no hostname is set, nothing is returned.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $appServer := admin:appserver-get-id($config, 
          admin:group-get-id($config, "Default"),
          "Docs")

  return
     admin:appserver-get-ssl-hostname($config, $appServer)

  (: returns the SSL hostname for the App Server, if set. :)
   

admin:appserver-get-ssl-require-client-certificate(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns true if a client certificate is required for the specified App Server. Otherwise, it returns false.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml"; 

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

  let $config := admin:get-configuration()

  return
     admin:appserver-get-ssl-require-client-certificate($config, 
         admin:appserver-get-id($config,(), "Docs"))

  (: Returns true if a client certificate is required for the "Docs" App Server.  Otherwise, false.  :)
      

admin:appserver-get-static-expires(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the value of the "expires" HTTP header for static content to expire after this many seconds port for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-static-expires($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-threads(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the maximum number of threads configured for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-threads($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  

admin:appserver-get-type(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the type of appserver with the specified ID. It will be either "http", "xdbc", or "WebDAV".

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-type($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  (: returns "http", "xdbc", or "WebDAV" :)            
  

admin:appserver-get-url-rewriter(
$config as element(configuration),
$appserver-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the path to the URL rewriter configured for this App Server. If no URL rewriter is configured, returns the empty string.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-get-url-rewriter($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  

admin:appserver-one-time-request-blackout(
$users as xs:unsignedLong*,
$roles as xs:unsignedLong*,
$start as xs:dateTime,
$end as xs:dateTime?,
$duration as xs:duration?
)  as   element(gr:request-blackout)
Summary:

This function constructs a one-time request-blackout specification.

Parameters:
$users : A sequence of user ID(s) that the request blackout applies too.
$roles : A sequence of role ID(s) that the request blackout applies too.
$start : The starting dateTime of the request blackout.
$end : The ending dateTime of the request blackout.
$duration : The amount of time for the blackout to last.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  admin:appserver-one-time-request-blackout((),(),500,  
        xs:dateTime("2008-02-14T09:45:00"), 
        (), xs:dayTimeDuration("PT3H") )
  (: returns the one-time request-blackout specification :)
  

  

admin:appserver-recurring-request-blackout(
$users as xs:unsignedLong*,
$roles as xs:unsignedLong*,
$days as xs:string*,
$start-time as xs:time?,
$end-time as xs:time?,
$duration as xs:duration?
)  as   element(gr:request-blackout)
Summary:

This function constructs a request-blackout specification.

Parameters:
$users : A sequence of user ID(s) that the request blackout applies too.
$roles : A sequence of role ID(s) that the request blackout applies too.
$days : The day(s) of the week. Must be a sequence of zero or more of monday, tuesday, wednesday, thusday, friday, saturday, sunday.
$start-time : A time for the request blackout to start.
$end-time : A time for the request blackout to end.
$duration : The amount of time for the blackout to last.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  admin:appserver-recurring-request-blackout((),(),500, "monday", 
        xs:time("09:45:00"), xs:time("11:45:00"), () )
  (: returns the request-blackout specification :)

  

admin:appserver-set-address(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:string
)  as   element(configuration)
Summary:

This function changes the IP Address in the configuration for the specified App Server to the specified address. Changing the address is a "cold" operation; when you use admin:save-configuration to save the configuration, it will automatically restart MarkLogic Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The new value for the IP address for the specified App Server.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-address(
         $config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         "127.0.0.1")
  (: 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.  :)  

  

admin:appserver-set-authentication(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:string
)  as   element(configuration)
Summary:

This function sets the authentication scheme in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The authentication scheme (basic, digest, digestbasic, or application-level).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-authentication($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         "digest")
  (: 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.  :)

  

admin:appserver-set-backlog(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the value in the configuration of the backlog (the maximum number of pending connections allowed on the HTTP socket) for the specified App Server. This is a "cold" operation; when you use admin:save-configuration to save the configuration, it will automatically restart MarkLogic Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The new integer value for the backlog.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-backlog($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         64)
  (: 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.  :)  

  

admin:appserver-set-collation(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:string
)  as   element(configuration)
Summary:

This function sets the default collation in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : A valid collation URI (for example, http://marklogic.com/collation/).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-collation($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
	 "http://marklogic.com/collation/")
  (: 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.  :)

  

admin:appserver-set-compute-content-length(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:boolean
)  as   element(configuration)
Summary:

This function changes the value whether a WebDAV server computes content length.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The new value for compute content length.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-compute-content-length($config, 
         admin:appserver-get-id($config, $groupid, "myWebDAVServer"),
         fn:true())
  (: 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.  :)  
  

admin:appserver-set-concurrent-request-limit(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the limit on concurrent requests that any user may have on a particular appserver. Setting the limit to 0 indicates there is no bound on the number of concurrent requests.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The limit of concurrent requests.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-concurrent-request-limit($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         15)
  (: 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.  :)

  

admin:appserver-set-database(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$database-id as xs:unsignedLong
)  as   element(configuration)
Summary:

This function sets the value in the configuration of the database for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$database-id : The database ID for the database to set as the database for the specified App Server.

Usage Notes:

Any database whose ID you pass into this function must exist when the transaction begins, otherwise an exception is thrown. If you need to create the database, do so in a separate transaction before using them in in this function.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-database($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         xdmp:database("myDatabase"))
  (: 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.  :)  

  

admin:appserver-set-debug-allow(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:boolean
)  as   element(configuration)
Summary:

This function sets the debug allow setting in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : A boolean value specifying whether to allow debugging on this App Server (true) or not (false).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-debug-allow($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         fn:true())
  (: 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.  :)

  

admin:appserver-set-default-time-limit(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the default time limit (the maximum total amount of time to service a request before the App Server throws a timeout exception) in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The new integer timeout value (specifies the number of seconds).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-default-time-limit($config,  
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         10000)
  (: 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.  :)  

  

admin:appserver-set-default-user(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedLong
)  as   element(configuration)
Summary:

This function sets the default user (for use with application-level authentication) in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The user ID of the user to set as the default user.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-default-user($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
	 xdmp:eval('
                  xquery version "1.0-ml";
                  import module "http://marklogic.com/xdmp/security" 
		    at "/MarkLogic/security.xqy"; 
	          sec:uid-for-name("annabelle")', (),  
	   <options xmlns="xdmp:eval">
		 <database>{xdmp:security-database()}</database>
	   </options>))
  (: 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.  :)

  

admin:appserver-set-default-xquery-version(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:string
)  as   element(configuration)
Summary:

This function sets the default XQuery version setting in the configuration for this App Server. This setting determines the XQuery dialect used in queries against this App Server when one is not explicitly specified in the XQuery version declaration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The default XQuery version value, one of 1.0-ml, 1.0, or 0.9-ml.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-default-xquery-version($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         "1.0-ml")
  (: 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.  :)

  

admin:appserver-set-display-last-login(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:boolean
)  as   element(configuration)
Summary:

This function sets the display last login setting in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : A boolean value specifying whether to indicate if the appserver should display last login information.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-display-last-login($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         fn:true())
  (: 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.  :)

  

admin:appserver-set-enabled(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:boolean
)  as   element(configuration)
Summary:

This function sets the enabled state in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The enabled state of the App Server to set, true for enabled and false for disabled.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-enabled($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         fn:true())
  (: 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.  :)
  

admin:appserver-set-error-handler(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:string
)  as   element(configuration)
Summary:

This function sets the value of the path to the error handler in the configuration for the specified App Server. The path should specify a relative or absolute path to an XQuery module that is executed in the event of any 400 or 500 series HTTP errors (sometime known as a "sorry" server to give the user a clean error page).

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The path to the XQuery main module to execute when 400 or 500 series errors occur on the App Server.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-error-handler($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         "sorry.xqy")
  (: 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.  :);

  

admin:appserver-set-keep-alive-timeout(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the keep-alive timeout (the maximum number of second for subsequent socket requests to time out) in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The new integer timeout value (specifies the number of seconds).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-keep-alive-timeout($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         10)
  (: 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.  :)  

  

admin:appserver-set-last-login(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedLong?
)  as   element(configuration)
Summary:

This function sets the value in the configuration of the last login database for the specified App Server. If the value is equal to 0, then the last-login feature is disabled for this appserver.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The database ID for the database to set as the database for the specified App Server. To disable the last-login feature, use the empty sequence or 0 for this value

Usage Notes:

Any database whose ID you pass into this function must exist when the transaction begins, otherwise an exception is thrown. If you need to create the database, do so in a separate transaction before using them in in this function.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-last-login($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         xdmp:database("Last-Login"))
  (: 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.  :)  

  

admin:appserver-set-log-errors(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:boolean
)  as   element(configuration)
Summary:

This function sets the log errors setting in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : A boolean value specifying whether to allow send uncaught exceptions on this App Server to the ErrorLog.txt file (true) or not (false).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-log-errors($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         fn:true())
  (: 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.  :)

  

admin:appserver-set-max-time-limit(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the max time limit (the maximum total amount of time to service a request before the App Server throws a timeout exception) in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The new integer timeout value (specifies the number of seconds).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-max-time-limit($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         10000)
  (: 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.  :)  

  

admin:appserver-set-modules-database(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$database-id as item()
)  as   element(configuration)
Summary:

This function sets the value in the configuration of modules database for the specified App Server to the specified database ID.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$database-id : The database ID for the database to set as the modules database. To specify the filesystem, use 0 or "file-system"

Usage Notes:

Any database whose ID you pass into this function must exist when the transaction begins, otherwise an exception is thrown. If you need to create the database, do so in a separate transaction before using them in in this function.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-modules-database($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         xdmp:database("Modules"))
  (: 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.  :)  


  

admin:appserver-set-name(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:string
)  as   element(configuration)
Summary:

This function changes the name of an existing App Server to the newly specified value.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The new name for the specified App Server.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-name($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         "myNewAppServerName")
  (: 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.  :)  

  

admin:appserver-set-output-encoding(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:string
)  as   element(configuration)
Summary:

This function sets the value for the default output encoding in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The default value for outputting characters. The value must be the name of a valid character set (for example, UTF-8, ASCII, and so on.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-output-encoding($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         "ascii")
  (: 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.  :)

  

admin:appserver-set-output-sgml-character-entities(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:string
)  as   element(configuration)
Summary:

This function sets the SGML character entity output setting in the configuration for the specified App Server. The SGML setting determines how characters that can be represented as SGML entites are serialized upon output by default in a query against the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The default value for outputting SGML entities, one of none, default, math, or pub.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-output-sgml-character-entities($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         "default")
  (: 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.  :)

  

admin:appserver-set-port(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function changes the port in the configuration for the specified App Server to the specified number. Changing the port is a "cold" operation; when you use admin:save-configuration to save the configuration, it will automatically restart MarkLogic Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The new port number.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-port($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         1234)
  (: 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.  :)  

  

admin:appserver-set-pre-commit-trigger-depth(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the maximum depth (how many triggers can cause other triggers to fire, which in turn cause others to fire, and so on) in the configuration for the specifed App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The maximum depth (how many triggers can cause other triggers to fire, which in turn cause others to fire, and so on) for pre-commit triggers.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-pre-commit-trigger-depth($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         10000)
  (: 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.  :)  


  

admin:appserver-set-pre-commit-trigger-limit(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the value in the configuration for the maximum number of pre-commit triggers a single statement can invoke for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The limit for the number of pre-commit triggers a single statement can invoke.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-pre-commit-trigger-limit($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         1000)
  (: 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.  :)
  

admin:appserver-set-privilege(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedLong
)  as   element(configuration)
Summary:

This function sets an execute privilege in the configuration for the specified App Server. When a privilege is set, the user who makes a request to the App Server must have been granted (via a role, either directly or indirectly) the specified privilege.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The privilege ID of an execute privilege needed to access this App Server.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-privilege($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
	 xdmp:eval('
                xquery version "1.0-ml";
                import module "http://marklogic.com/xdmp/security" 
      at "/MarkLogic/security.xqy"; 
      sec:get-privilege("http://marklogic.com/my.uri", 
         "execute")/sec:privilege-id',
      (),  
     <options xmlns="xdmp:eval">
     <database>{xdmp:security-database()}</database>
     </options>))
  (: 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.  :)

  

admin:appserver-set-profile-allow(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:boolean
)  as   element(configuration)
Summary:

This function sets the profile allow setting in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : A boolean value specifying whether to allow profiling on this App Server (true) or not (false).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-profile-allow($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         fn:true())
  (: 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.  :)

  

admin:appserver-set-request-timeout(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the value of the socket request timeout (the number of seconds before the socket times out) in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : An integer specifying the number of seconds before a socket request times out.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-request-timeout($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         10)
  (: 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.  :)  

  

admin:appserver-set-root(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:string
)  as   element(configuration)
Summary:

This function changes the root for a specified App Server to the newly specified value.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The new value for the root. The root must be either a fully qualified path (for example, /space/myRoot or c:/space/myRoot) or a relative path (for example, myRoot); relative paths are resolved relative to the directory in which MarkLogic Server is installed.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-root($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         "myNewRoot")
  (: 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.  :)  
  

admin:appserver-set-session-timeout(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the session timeout value (in seconds) in the configuration for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The new integer timeout value (specifies the number of seconds).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-session-timeout($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         10000)
  (: 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.  :)  

  

admin:appserver-set-ssl-allow-sslv3(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:boolean
)  as   element(configuration)
Summary:

This function enables or disables the SSL v3 protocol for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : A boolean value, fn:true() to enable, fn:false() to disable.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $appServer := admin:appserver-get-id($config, 
          admin:group-get-id($config, "Default"),
          "Docs")

  return 
      admin:appserver-set-ssl-allow-sslv3($config, $appServer, fn:false())
  
   (: Disables SSL v3 for the "Docs" App Server. :)
     

admin:appserver-set-ssl-allow-tls(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:boolean
)  as   element(configuration)
Summary:

This function enables or disables the TLS protocol for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : A boolean value, fn:true() to enable, fn:false() to disable.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $appServer := admin:appserver-get-id($config, 
          admin:group-get-id($config, "Default"),
          "Docs")

  return 
       admin:appserver-set-ssl-allow-tls($config, $appServer, fn:true())

   (: Enables TLS for the "Docs" App Server. :)
     

admin:appserver-set-ssl-certificate-template(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedLong
)  as   element(configuration)
Summary:

This function sets an SSL certificate template for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The id of the certificate template. This would typically be the result of a pki:insert-template(pki:create-template()) call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $appServer := admin:appserver-get-id($config, 
          admin:group-get-id($config, "Default"),
          "myAppServer")
  let $tid := pki:template-get-id(pki:get-template-by-name("mycert"))

  return
     admin:appserver-set-ssl-certificate-template(
                          $config, 
                          $appServer, 
                          $tid)

  (: Sets the certificate template, "mycert," for the "myAppServer" App Server. :)
   

admin:appserver-set-ssl-ciphers(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:string
)  as   element(configuration)
Summary:

This function sets SSL ciphers for the specified App Server. This is the standard cipher specification string for OpenSSL.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The SSL ciphers to set.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $appServer := admin:appserver-get-id($config, 
          admin:group-get-id($config, "Default"),
          "Docs")

  return
     admin:appserver-set-ssl-ciphers($config, $appServer, "All")

  (: Sets the ciphers for the "Docs" App Server to "All".  :)
   

admin:appserver-set-ssl-client-certificate-authorities(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedLong*
)  as   element(configuration)
Summary:

This function sets one or more client certificate authorities that sign client certificates for the specified App Server. This function is typically used along with the pki:insert-trusted-certificates and pki:get-trusted-certificate-ids functions to import trusted Certificate Authorities for client certificates.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : One or more ids for trusted certificates generated by the certificate authority to be set.

Example:
 
  xquery version "1.0-ml";

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

  declare namespace x509 = "http://marklogic.com/xdmp/x509";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  let $appservid := admin:appserver-get-id($config, $groupid, "myAppServer")

  let $cert-id :=
    for $cert in pki:get-certificates(pki:get-trusted-certificate-ids())
      where $cert/x509:cert/x509:subject/x509:commonName eq "Acme Certificate Authority" and
            $cert/x509:cert/x509:subject/x509:organizationName eq "Acme Corporation"
    return
      fn:data($cert/pki:certificate-id) 
 
  return 
    admin:appserver-set-ssl-client-certificate-authorities(
	$config, 
        $appservid,
	$cert-id)
 
  (: Locates the trusted certificates from the Certificate Authority, "Acme 
     Corporation," with the common name of "Acme Certificate Authority" and 
     adds the Certificate Authority to the list of Client Certificate Authorities 
     for the App Server, "myAppServer." :)
     

admin:appserver-set-ssl-hostname(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:string
)  as   element(configuration)
Summary:

This function sets an SSL hostname for the specified App Server.

The SSL hostname should only be set when a proxy or load balancer is used to represent multiple servers. In this case, you can specify an SSL hostname with this function and all instances of the application server will identify themselves as that host.


Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The SSL hostname.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $appServer := admin:appserver-get-id($config, 
          admin:group-get-id($config, "Default"),
          "Docs")

  return
     admin:appserver-set-ssl-hostname($config, $appServer, "AllHost")
 
  (: Sets the SSL hostname for the "Docs" App Server to "AllHost".  :)
   

admin:appserver-set-ssl-require-client-certificate(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:boolean
)  as   element(configuration)
Summary:

This function determines whether or not a client certificate is required for the specified App Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : A boolean value, fn:true() to enable, fn:false() to disable.

Example:
  xquery version "1.0-ml"; 

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

  let $config := admin:get-configuration()
  let $appServer := admin:appserver-get-id($config, 
          admin:group-get-id($config, "Default"),
          "Docs")

  return
      admin:appserver-set-ssl-require-client-certificate($config, $appServer, fn:false())

  (: Specifies that the "Docs" App Server does not require a client certificate. :)
      

admin:appserver-set-static-expires(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function changes the value of the "expires" HTTP header for a specified App Server to the newly specified value.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The new value for the "expires" header.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-static-expires($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         3600)
  (: 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.  :)  
  

admin:appserver-set-threads(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the value in the configuration of the maximum number of threads for the specified App Server. This is a "cold" operation; when you use admin:save-configuration to save the configuration, it will automatically restart MarkLogic Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The new integer value for the number of threads.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-threads($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         10)
  (: 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.  :)  

  

admin:appserver-set-url-rewriter(
$config as element(configuration),
$appserver-id as xs:unsignedLong,
$value as xs:string
)  as   element(configuration)
Summary:

This function sets the value of the path to the URL rewriter in the configuration for the specified App Server. The path should specify a relative or absolute path to an XQuery module that is executed to rewrite incoming URLs.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$appserver-id : The ID of the App Server. Typically, this is the result of an admin:appserver-get-id call.
$value : The path to the XQuery main module to execute to rewrite URLs.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy"  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:appserver-set-url-rewriter($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         "rewriter.xqy")
  (: 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.  :);

  

admin:get-appserver-ids(
$config as element(configuration)
)  as   xs:unsignedLong*
Summary:

This function returns all the appserver IDs from the configuration.

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

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:get-appserver-ids($config)
  (: returns the IDs of all the appservers :)
  

admin:http-server-create(
$config as element(configuration),
$group-id as xs:unsignedLong,
$appserver-name as xs:string,
$root as xs:string,
$port as xs:unsignedLong,
$modules-id as item(),
$database-id as xs:unsignedLong
)  as   element(configuration)
Summary:

This function creates a new HTTP App Server with the specified name, root, and port in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.
$appserver-name : The name of the App Server. The name must be unique among the App Server names for the group.
$root : The root of the App Server.
$port : The port on which the App Server listens. The port must be available on the host.
$modules-id : The id of the modules database (for example, xdmp:database("Modules")). To specify the filesystem, use 0 or "file-system"
$database-id : The id of the database (for example, xdmp:database("myDatabase")).

Usage Notes:

Any group or database whose ID you pass into this function must exist when the transaction begins, otherwise an exception is thrown. If you need to create the group and/or database, do so in a separate transaction before using them in in this function.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "myGroup")
  return
  admin:http-server-create($config, $groupid, "myNewAppServer", 
        "/space/mycode", 8005, 0, xdmp:database("myDatabase") )
  (: 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.  :)  
  

admin:taskserver-get-debug-allow(
$config as element(configuration),
$group-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns the value for the debug-allow setting configured on the task server for the specified group.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $group-id := admin:group-get-id($config, "Default")
  return
  admin:taskserver-get-debug-allow($config, $group-id)
  (: returns the debug-allow setting configured on the task server :)

  

admin:taskserver-get-debug-threads(
$config as element(configuration),
$group-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the number of debug threads configured on the task server for the specified group.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $group-id := admin:group-get-id($config, "Default")
  return
  admin:taskserver-get-debug-threads($config, $group-id)
  (: returns the number of debug threads configured on the task server :)


  

admin:taskserver-get-default-time-limit(
$config as element(configuration),
$group-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the default time limit configured on the task server for the specified group.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $group-id := admin:group-get-id($config, "Default")
  return
  admin:taskserver-get-default-time-limit($config, $group-id)
  (: returns the default time limit configured on the task server :)


  

admin:taskserver-get-log-errors(
$config as element(configuration),
$group-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns the value for the log-errors setting configured on the task server for the specified group.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $group-id := admin:group-get-id($config, "Default")
  return
  admin:taskserver-get-log-errors($config, $group-id)
  (: returns the log-errors setting configured on the task server :)

  

admin:taskserver-get-max-time-limit(
$config as element(configuration),
$group-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the maximum time limit configured on the task server for the specified group.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $group-id := admin:group-get-id($config, "Default")
  return
  admin:taskserver-get-max-time-limit($config, $group-id)
  (: returns the maximum time limit configured on the task server :)


  

admin:taskserver-get-name(
$config as element(configuration),
$group-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the name of the task server for the specified group from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $group-id := admin:group-get-id($config, "Default")
  return
  admin:taskserver-get-name($config, $group-id)
  (: returns the name of the task server :)

  

admin:taskserver-get-post-commit-trigger-depth(
$config as element(configuration),
$group-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the maximum post-commit trigger depth configured on the task server for the specified group.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $group-id := admin:group-get-id($config, "Default")
  return
  admin:taskserver-get-post-commit-trigger-depth($config, $group-id)
  (: returns the post-commit trigger depth configured on the task server :)

  

admin:taskserver-get-pre-commit-trigger-depth(
$config as element(configuration),
$group-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the maximum pre-commit trigger depth configured on the task server for the specified group.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $group-id := admin:group-get-id($config, "Default")
  return
  admin:taskserver-get-pre-commit-trigger-depth($config, $group-id)
  (: returns the pre-commit trigger depth configured on the task server :)

  

admin:taskserver-get-pre-commit-trigger-limit(
$config as element(configuration),
$group-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the pre-commit trigger limit configured on the task server for the specified group.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $group-id := admin:group-get-id($config, "Default")
  return
  admin:taskserver-get-pre-commit-trigger-limit($config, $group-id)
  (: returns the pre-commit trigger limit configured on the task server :)

  

admin:taskserver-get-profile-allow(
$config as element(configuration),
$group-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns the value for the profile-allow setting configured on the task server for the specified group.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $group-id := admin:group-get-id($config, "Default")
  return
  admin:taskserver-get-profile-allow($config, $group-id)
  (: returns the profile-allow setting configured on the task server :)

  

admin:taskserver-get-queue-size(
$config as element(configuration),
$group-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the number queue size configured on the task server for the specified group.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $group-id := admin:group-get-id($config, "Default")
  return
  admin:taskserver-get-queue-size($config, $group-id)
  (: returns the queue size configured on the task server :)

  

admin:taskserver-get-threads(
$config as element(configuration),
$group-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the number of threads configured on the task server for the specified group.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $group-id := admin:group-get-id($config, "Default")
  return
  admin:taskserver-get-threads($config, $group-id)
  (: returns the number of threads configured on the task server :)

  

admin:taskserver-set-debug-allow(
$config as element(configuration),
$group-id as xs:unsignedLong,
$value as xs:boolean
)  as   element(configuration)
Summary:

This function sets the value for the debug allow setting for the task server in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.
$value : The new boolean value.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:taskserver-set-debug-allow($config, $groupid, fn:true())
  (: 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.  :)  

  

admin:taskserver-set-debug-threads(
$config as element(configuration),
$group-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the value in the configuration of the maximum number of debug threads for the specified task server. This is a "cold" operation; when you use admin:save-configuration to save the configuration, it will automatically restart MarkLogic Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.
$value : The new threads value.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:taskserver-set-debug-threads($config, $groupid, 10)
  (: 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.  :)  

  

admin:taskserver-set-default-time-limit(
$config as element(configuration),
$group-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the task server default time limit in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.
$value : The new value for the time limit (specified the number of seconds).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:taskserver-set-default-time-limit($config, $groupid, 10000)
  (: 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.  :)  

  

admin:taskserver-set-log-errors(
$config as element(configuration),
$group-id as xs:unsignedLong,
$value as xs:boolean
)  as   element(configuration)
Summary:

This function sets the value for the log errors setting for the task server in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.
$value : The new boolean value.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:taskserver-set-log-errors($config, $groupid, 1000)
  (: 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.  :)  

  

admin:taskserver-set-max-time-limit(
$config as element(configuration),
$group-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the task server max time limit in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.
$value : The new value for the max time limit (specified the number of seconds).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:taskserver-set-max-time-limit($config, $groupid, 10000)
  (: 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.  :)  

  

admin:taskserver-set-post-commit-trigger-depth(
$config as element(configuration),
$group-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the value for the task server post-commit trigger depth in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.
$value : The new post-commit trigger depth.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:taskserver-set-post-commit-trigger-depth($config, $groupid, 1000)
  (: 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.  :)  

  

admin:taskserver-set-pre-commit-trigger-depth(
$config as element(configuration),
$group-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the value for the task server pre-commit trigger depth in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.
$value : The new value.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:taskserver-set-pre-commit-trigger-depth($config, $groupid, 1000)
  (: 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.  :)  

  

admin:taskserver-set-pre-commit-trigger-limit(
$config as element(configuration),
$group-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the value for the task server pre-commit trigger depth in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.
$value : The new value.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:taskserver-set-pre-commit-trigger-depth($config, $groupid, 1000)
  (: 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.  :)  

  

admin:taskserver-set-profile-allow(
$config as element(configuration),
$group-id as xs:unsignedLong,
$value as xs:boolean
)  as   element(configuration)
Summary:

This function sets the value for the profile allow setting for the task server in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.
$value : The new boolean value.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:taskserver-set-profile-allow($config, $groupid, fn:true())
  (: 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.  :)  

  

admin:taskserver-set-queue-size(
$config as element(configuration),
$group-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the value in the configuration of the maximum queue size for the specified task server. This is a "cold" operation; when you use admin:save-configuration to save the configuration, it will automatically restart MarkLogic Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.
$value : The new value for the queue size.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:taskserver-set-queue-size($config, $groupid, 100000)
  (: 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.  :)  

  

admin:taskserver-set-threads(
$config as element(configuration),
$group-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the value in the configuration of the maximum number of threads for the specified task server. This is a "cold" operation; when you use admin:save-configuration to save the configuration, it will automatically restart MarkLogic Server.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.
$value : The new threads value.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:taskserver-set-threads($config, $groupid, 10)
  (: 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.  :)  
   
  

admin:webdav-server-create(
$config as element(configuration),
$group-id as xs:unsignedLong,
$appserver-name as xs:string,
$root as xs:string,
$port as xs:unsignedLong,
$database-id as xs:unsignedLong
)  as   element(configuration)
Summary:

This function creates a new WebDAV App Server with the specified name, library, and port in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.
$appserver-name : The name of the App Server. The name must be unique among the App Server names for the group.
$root : The root of the App Server.
$port : The port on which the App Server listens. The port must be available on the host.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).

Usage Notes:

Any group or database whose ID you pass into this function must exist when the transaction begins, otherwise an exception is thrown. If you need to create the group and/or database, do so in a separate transaction before using them in in this function.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "myGroup")
  return
  admin:webdav-server-create($config, $groupid, "myNewAppServer", 
        "/space/mycode", 8005, xdmp:database("myDatabase") )
  (: 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.  :)  

  

admin:xdbc-server-create(
$config as element(configuration),
$group-id as xs:unsignedLong,
$appserver-name as xs:string,
$root as xs:string,
$port as xs:unsignedLong,
$modules-id as item(),
$database-id as xs:unsignedLong
)  as   element(configuration)
Summary:

This function creates a new XDBC App Server with the specified name, root, and port in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$group-id : The ID of the group to which the App Server belongs. Typically, this is the result of an admin:group-get-id call.
$appserver-name : The name of the App Server. The name must be unique among the App Server names for the group.
$root : The path to the module directory root of this XDBC server.
$port : The port on which the App Server listens. The port must be available on the host.
$modules-id : The id of the modules database (for example, xdmp:database("Modules")). To specify the filesystem, use 0 or "file-system"
$database-id : The id of the database (for example, xdmp:database("myDatabase")).

Usage Notes:

Any group or database whose ID you pass into this function must exist when the transaction begins, otherwise an exception is thrown. If you need to create the group and/or database, do so in a separate transaction before using them in in this function.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "myGroup")
  return
  admin:xdbc-server-create($config, $groupid, "myNewAppServer", 
        "/space/mycode", 8005, 0, xdmp:database("myDatabase") )
  (: 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.  :)