Loading TOC...

GET /v1/config/properties

Summary

Retrieve a list of all MarkLogic REST API instance configuration properties names and settings.

URL Parameters
format? Specifies the content type of the response, as an alternative to using the Accept header. Accepted values: json and xml (default). This value takes precedence over the Accept headers.
Request Headers
Accept* The expected MIME type of the information in the response. Accepted types: application/json or application/xml. Ignored if the request includes a format parameter value.
Response Headers
Content-Type The MIME type of the content returned in the response body, one of application/xml or application/json, depending on the type requested by the format value or Accept header.

Response

Upon success, MarkLogic Server returns a 200 status and provides the requested information in the response body.

Required Privileges

This operation requires the rest-reader role, or the following privilege:

http://marklogic.com/xdmp/privileges/rest-reader

Usage Notes

The expected response type can be specified using either the format parameter or Accept header. One or the other must be supplied. If both are supplied and are different, the format parameter takes precedence.

For more details, see Retrieving Configuration Information in the REST Application Developer's Guide.

Example

$ curl --anyauth --user user:password -X GET -H "Accept: application/xml" -i \
    http://localhost:8000/v1/config/properties

==> The instance configuration properties in the response body, as XML.
    For example:

HTTP/1.1 200 OK
Server: MarkLogic
Content-Type: text/xml; charset=UTF-8
Content-Length: 87
Connection: close

<rapi:properties xmlns:rapi="http://marklogic.com/rest-api">
  <rapi:content-versions>none</rapi:content-versions>
  <rapi:debug>false</rapi:debug>
  <rapi:document-transform-all>true</rapi:document-transform-all>
  <rapi:document-transform-out/>
  <rapi:update-policy>merge-metadata</rapi:update-policy>
  <rapi:validate-options>true</rapi:validate-options>
  <rapi:validate-queries>false</rapi:validate-queries>
</rapi:properties>
  

Example

$ curl --anyauth --user user:password -X GET -H "Accept: application/json" -i \
    http://localhost:8000/v1/config/properties?format=json

==> The instance configuration properties in the response body, as JSON.
    For example:

HTTP/1.1 200 OK
Server: MarkLogic
Content-Type: text/plain; charset=UTF-8
Content-Length: 43
Connection: close

{
  "content-version":"none",
  "debug":false, 
  "document-transform-all":true, 
  "document-transform-out":"", 
  "update-policy":"merge-metadata", 
  "validate-options":true, 
  "validate-queries":false 
}
  

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