Loading TOC...

MarkLogic Server 11.0 Product Documentation
GET /manage/v3

Summary

This endpoint enables retrieving configuration of an individual resource, a set of resources, or a full cluster. It also enables generating new configurations from scenarios.

URL Parameters
name The configuration profile name, for example "myClusterTestConfig".
desc The configuration description, for example "Test configuration for my cluster".
embed-tokens Embed replacement tokens (ex. %%sometoken%%) in configuration. The allowed values are true or false. The default value is false for xml|json format and true for zip format.
include-properties Include resource properties in the configuration. By default, all resource properties are provided. If set false - only resource name and identifier are provided. The allowed values are true or false. The default value is true.
format The response format. The allowed values are xml | json | zip. The default value is xml.
scenario The scenario to generate configuration from. The allowed values are: "ha-local".
installer The type of the installer script to include (with a configuration in zip format). Currently the only supported value is "ml-gradle".
resource-type The resource type - for selecting/filtering resources by type. The allowed values are: "forest", "database", "server", "group", "user", "role".
resource-id The list of resources' identifiers to select specific resources. The value is string array, for example: ["resource-id1", "resource-id2", ...].
resource-name The regular expression to select specific resources by their names, for example "ha-*".
params The serialized JSON object with scenario-specific default values for parameters to be embedded into the configuration. For more details and the list of available parameters, see Usage Notes in cma:generate-config.
Request Headers
Accept The expected MIME type of the response. If the format parameter is present, it takes precedence over the Accept header. The allowed values are application/xml, application/json, application/zip. The default value is application/xml.
Content-type The MIME type of the data in the request body. Depending upon the value of the format parameter or Accept header, can be application/xml, application/json, or application/zip.
Response Headers
Content-type The MIME type of the data in the response body. Depending upon the value of the format parameter or Accept header, can be application/xml, application/json, or application/zip.

Response

200 (OK)
Returned upon successful completion of the operation. The response body contains the requested data.
401 (Unauthorized)
Returned if the user does not have the necessary privileges to perform the operation.

Required Privileges

This operation requires the manage-user role, or the following privilege:

http://marklogic.com/xdmp/privileges/manage

The user username in Example sections below shall have the above role and/or privilege.

Usage Notes

The structure of the data in the response body is as shown below.

name

Configuration profile name.

desc

Configuration description.

user

Configuration was generated by this user.

group

Configuration was generated by host in this group.

host

Configuration was generated by this host.

platform

Configuration was generated by host running on this platform.

ts

Configuration was generated at this timestamp.

version

Configuration was generated by host running this version of MarkLogic.

params

Configuration params contains sequence of param elements.

This is a complex structure with the following children:

param

Configuration param contains name-value pairs.

configs

Configuration configs contains sequence of config elements.

This is a complex structure with the following children:

config

Configuration config contains resource properties.

Example


   curl -X GET --anyauth --user username:password --header "Accept: application/json" http://localhost:8002/manage/v3

   ==> Returns full cluster configuration in json format. 
    

Example


   curl -X GET --anyauth --user username:password --header "Accept: application/json" http://localhost:8002/manage/v3?format=xml

   ==> Returns full cluster configuration in xml format. 
    

Example


   curl -X GET --anyauth --user username:password 'http://localhost:8002/manage/v3?format=xml&include-properties=true'

   ==> Returns all resources with properties. 
    

Example


   curl -X GET --anyauth --user username:password 'http://localhost:8002/manage/v3?format=xml&include-properties=true&resource-type=database,forest'

   ==> Returns resources with properties, where resources are filtered by type. 
    

Example


   curl -X GET --anyauth --user username:password --header "Accept: application/xml" 'http://localhost:8002/manage/v3?format=xml&include-properties=true&resource-id=123123123123'

   ==> Returns resources with properties, where resources are filtered by id. 
    

Example


   curl -X GET --anyauth --user username:password 'http://localhost:8002/manage/v3?format=json&scenario=ha-local'

   ==> Generates ha-local configuration. 
    

Example


   curl -X GET --anyauth --user username:password 'http://localhost:8002/manage/v3?format=zip&scenario=ha-local'

   ==> Generates ha-local configuration and retrieves standalone installable zip. 
    

Example


   curl -X GET --anyauth --user username:password --header "Accept: application/xml" 'http://localhost:8002/manage/v3?scenario=ha-local&embed-tokens=true&params={"number-of-master-forests":2,"replica-same-zone-as-master":false,"prefix":"ha-local-"}'

   ==> Creates configuration from ha-local scenario (xml). 
    

Example


   curl -X GET --anyauth --user username:password --header "Accept: application/zip" 'http://localhost:8002/manage/v3?scenario=ha-local&embed-tokens=true&params={"number-of-forests-per-host":2,"replica-same-zone-as-master":true,"prefix":"ha-local-"}'

   ==> Creates configuration from ha-local scenario (zip). 
    

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