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", "ha-shared" .
|
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 .
|
- 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.
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.
The structure of the data in the response body is as shown below.
name
desc
user
group
host
platform
ts
version
params
This is a complex structure with the following children:
param
configs
This is a complex structure with the following children:
config
curl -X GET --anyauth --user username:password --header "Accept: application/json" http://localhost:8002/manage/v3 ==> Returns full cluster configuration in json format.
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.
curl -X GET --anyauth --user username:password http://localhost:8002/manage/v3?format=xml&include-properties=true ==> Returns all resources with properties.
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.
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.
curl -X GET --anyauth --user username:password http://localhost:8002/manage/v3?format=json&scenario=ha-local ==> Generates ha-local configuration.
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.
curl -X GET --anyauth --user username:password --header "Accept: application/xml" http://localhost:8002/manage/v3?scenario=ha-local&embed-tokens=true¶ms={"number-of-master-forests":2,"replica-same-zone-as-master":false,"prefix":"ha-local-"} ==> Creates configuration from ha-local scenario (xml).
curl -X GET --anyauth --user username:password --header "Accept: application/zip" http://localhost:8002/manage/v3?scenario=ha-local&embed-tokens=true¶ms={"number-of-forests-per-host":2,"replica-same-zone-as-master":true,"prefix":"ha-local-"} ==> Creates configuration from ha-local scenario (zip).
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.