Loading TOC...

GET /v1/config/properties/{property-name}

Summary

Retrieve the value of the MarkLogic REST API instance configuration property named by {property-name}.

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, with the requested data in the response body. If the requested property does not exist, MarkLogic Server returns status 404 (Not Found).

Required Privileges

This operation requires the rest-admin role, or the following privileges:

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

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

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

Usage Notes

The expected response content 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.

The following properties are available for configuration:

Propety Name Description
content-versions Deprecated. Use update-policy instead.
debug Controls debugging output. Allowed values: true, false. Default: false.
document-transform-all Whether or not to apply a default read transform to every document read, regardless of user. When false, a default transform does not modify documents read by a user with rest-writer or rest-admin role (or equivalent privileges. Use document-transform-out to specify a default read transformation. Default: true.
document-transform-out The name of a default content transformation to apply when retrieving documents from the database using /documents. Default: no transformation.
update-policy Determines the behavior of conditional GET, PUT, POST, and DELETE on /documents and metadata handling on updates. Allowed Values: merge-metadata (default), version-required, version-optional, overwrite-metadata. For details, see Understanding Optimistic Locking in the REST Application Developer's Guide and Client-Side Cache Management Using Content Versioning in the REST Application Developer's Guide.
validate-options Whether or not to validate query options when they are created or updated. Allowed values: true, false. Default: true.
validate-queries Whether or not to validate a query before searching. Allowed values: true, false. Default: false.

For more details, see Configuring Instance Properties in the REST Application Developer's Guide.

Example

$ curl --anyauth --user user:password -X GET -i \
    http://localhost:8000/v1/config/properties/debug

==> MarkLogic Server returns the setting of the configuration property 
    "debug", as XML. For example:

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

<rapi:debug xmlns:rapi="http://marklogic.com/rest-api">
  false
</rapi:debug>
  

Example

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

==> MarkLogic Server returns the setting of the configuration property 
    "debug", as JSON. For example:

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

{"debug":false}
  

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

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.