|
|
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-copy(
|
|
$config as element(configuration),
|
|
$target-group-id as xs:unsignedLong+,
|
|
$appserver-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.
|
$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-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-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,
"myNewAppServer", 8010)
(: 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-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-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-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"),
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-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-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-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-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-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-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-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-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")',
(),
<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-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"),
"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-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: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: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. :)
|
|
|