Powered by Zoomin Software. For more details please contactZoomin

Script Administrative Tasks

Scripting Administrative Tasks in MarkLogic Server

Scripting Administrative Tasks in MarkLogic Server

  • Last Updated: April 14, 2026
  • 2 minute read
    • MarkLogic Server
    • Version 12.0
    • Documentation

This guide describes how to use the administration APIs to create scripts that configure and manage the operation of MarkLogic Server on your system. This guide is intended for a technical audience, specifically the system administrator in charge of MarkLogic Server.

These are the topics in this section:

The Administration APIs

The APIs most often used to automate administrative operations are summarized in the tables below.

Built-in Functions

Admin (xdmp:) This API provides functions for database and forest maintenance and file system access.
Security (xdmp:) This API provides functions for getting information on users, roles, and document access permissions.

Library Module Functions

Admin (xdmp:) This API provides functions for creating, configuring, and deleting forests, databases, hosts, groups, and App Servers. Specific usage information for this API is provided in the next section, Using the Admin API.
Security (xdmp:) This API provides functions for creating, configuring, and deleting users, roles, amps, and privileges.
PKI (pki:) This API provides functions for creating, configuring, and deleting the SSL objects used for secure access to App Servers.

Common Use Cases

The MarkLogic Server Admin APIs provide a flexible toolkit for creating new and managing existing configurations of MarkLogic Server.

The common use cases of the Admin APIs include.

  • Configuring multiple, identical instances of MarkLogic Server (across a cluster or multiple clusters and/or to maintain consistency between dev/cert/test/prod environments).
  • Automating Server Maintenance. For example, backups based on criteria other than a schedule.
  • Managing server resources. For example, delete-only forest rotation.
  • Making Bulk Updates to Server Configuration. For example, changing roles across a large subgroup of users.
  • Generating notifications (log and/or email) for specific server events.

The sections Server Configuration Scripts and Server Maintenance Operations provide code samples that demonstrate the various uses of the MarkLogic Server Administration APIs.

Chapter Summary

The Using the Admin API section describes the fundamentals of using the Admin and other APIs that allow you to perform administrative operations on MarkLogic Server.

The Server Configuration Scripts section demonstrates how to write simple scripts that create and configure MarkLogic Server objects.

The Server Maintenance Operations section describes how to write scripts to monitor and manage an existing MarkLogic Server configuration.

TitleResults for “How to create a CRG?”Also Available inAlert