This resource address modifies the properties of the named database. The list of modifiable properties can be returned by the GET version of this endpoint. The database can be identified either by id or name. For an example, see Preliminary Configuration Procedures in the Scripting Administrative Tasks Guide.
URL Parameters | |
---|---|
format | The format of the returned data. Can be either
json or xml (default). This parameter overrides the Accept
header if both are present. |
Request Headers | |
---|---|
Accept | The expected MIME type of the returned data. If
the format parameter is present, it takes precedence over the Accept header. |
Upon success, MarkLogic Server returns status code 204 (No content). If the payload is malformed or the group does not exist, a status code of 400 (Bad Request) is returned. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges.
manage-user
rolehttp://marklogic.com/xdmp/privileges/manage
manage
role plus one of the following granular privileges:
http://marklogic.com/xdmp/privileges/admin/database/database-ID
http://marklogic.com/xdmp/privileges/admin/database/activity/database-ID
where activity is one of the following:
Database-level replication can be changed with the database-replication
properties
of the database. Specify foreign-replica(s) on the replica database(s) and foreign-master on
the master database.
If a forest is specified in the retired-forest
property, it will be marked as retired.
Note: The properties described here are for XML payloads. In general they are the same for
JSON, with the exception that, in JSON, forests
, word-lexicons
,
merge-blackouts
, days
, database-backups
,
backup-days
, fragment-roots
, fragment-parents
,
element-word-query-throughs
, phrase-throughs
,
phrase-arounds
, range-element-indexes
,
range-element-attribute-indexes
, element-word-lexicons
,
element-attribute-word-lexicons
, path-namespaces
,
range-path-indexes
, fields
, field-paths
,
included-elements
, excluded-elements
,
tokenizer-overrides
, range-field-indexes
,
geospatial-element-indexes
, geospatial-element-child-indexes
,
geospatial-element-pair-indexes
,
geospatial-element-attribute-pair-indexes
,
geospatial-path-indexes
, default-rulesets
,
foreign-replicas
, and database-reference
are expressed in
singular form. For example, in JSON, forests
is instead forest
and
the format is: "forest":["forest-id"]
.
database-name
enabled
security-database
schema-database
triggers-database
data-encryption
backup-encryption-key
encryption-key-id
forests
This is a complex structure with the following children:
forest
subdatabases
This is a complex structure with the following children:
subdatabase
This is a complex structure with the following children:
cluster-name
database-name
retired-forests
This is a complex structure with the following children:
retired-forest
retired-forest-count
language
stemmed-searches
word-searches
word-positions
fast-phrase-searches
fast-reverse-searches
triple-index
triple-positions
fast-case-sensitive-searches
fast-diacritic-sensitive-searches
fast-element-word-searches
element-word-positions
fast-element-phrase-searches
element-value-positions
attribute-value-positions
field-value-searches
field-value-positions
three-character-searches
three-character-word-positions
fast-element-character-searches
trailing-wildcard-searches
trailing-wildcard-word-positions
fast-element-trailing-wildcard-searches
word-lexicons
This is a complex structure with the following children:
word-lexicon
two-character-searches
one-character-searches
uri-lexicon
collection-lexicon
reindexer-enable
reindexer-throttle
reindexer-timestamp
directory-creation
maintain-last-modified
maintain-directory-last-modified
inherit-permissions
inherit-collections
inherit-quality
in-memory-limit
in-memory-list-size
in-memory-tree-size
in-memory-range-index-size
in-memory-reverse-index-size
in-memory-triple-index-size
in-memory-geospatial-region-index-size
triple-index-geohash-precision
large-size-threshold
locking
journaling
journal-size
journal-count
preallocate-journals
preload-mapped-data
preload-replica-mapped-data
range-index-optimize
positions-list-max-size
format-compatibility
index-detection
expunge-locks
tf-normalization
merge-priority
merge-max-size
merge-min-size
merge-min-ratio
merge-timestamp
retain-until-backup
merge-blackouts
This is a complex structure with the following children:
merge-blackout
This is a complex structure with the following children:
blackout-type
limit
merge-priority
days
This is a complex structure with the following children:
day
period
This is a complex structure with the following children:
start-date
start-time
end-date
end-time
duration
database-backups
This is a complex structure with the following children:
database-backup
This is a complex structure with the following children:
backup-id
backup-enabled
backup-directory
backup-kek-id
backup-type
backup-period
backup-month-day
backup-days
This is a complex structure with the following children:
backup-day
backup-start-date
backup-start-time
backup-timestamp
max-backups
backup-schemas-database
backup-security-database
backup-triggers-database
include-replicas
journal-archiving
journal-archive-path
journal-archive-lag-limit
incremental-backup
incremental-dir
purge-journal-archive
fragment-roots
This is a complex structure with the following children:
fragment-root
This is a complex structure with the following children:
namespace-uri
localname
fragment-parents
This is a complex structure with the following children:
fragment-parent
This is a complex structure with the following children:
namespace-uri
localname
element-word-query-throughs
This is a complex structure with the following children:
element-word-query-through
This is a complex structure with the following children:
namespace-uri
localname
phrase-throughs
This is a complex structure with the following children:
phrase-through
This is a complex structure with the following children:
namespace-uri
localname
phrase-arounds
This is a complex structure with the following children:
phrase-around
This is a complex structure with the following children:
namespace-uri
localname
range-element-indexes
This is a complex structure with the following children:
range-element-index
This is a complex structure with the following children:
scalar-type
namespace-uri
localname
collation
range-value-positions
invalid-values
range-element-attribute-indexes
This is a complex structure with the following children:
range-element-attribute-index
This is a complex structure with the following children:
scalar-type
parent-namespace-uri
parent-localname
namespace-uri
localname
collation
range-value-positions
invalid-values
element-word-lexicons
This is a complex structure with the following children:
element-word-lexicon
This is a complex structure with the following children:
namespace-uri
localname
collation
element-attribute-word-lexicons
This is a complex structure with the following children:
element-attribute-word-lexicon
This is a complex structure with the following children:
parent-namespace-uri
parent-localname
namespace-uri
localname
collation
path-namespaces
This is a complex structure with the following children:
path-namespace
This is a complex structure with the following children:
prefix
namespace-uri
range-path-indexes
This is a complex structure with the following children:
range-path-index
This is a complex structure with the following children:
scalar-type
path-expression
collation
range-value-positions
invalid-values
fields
This is a complex structure with the following children:
field
This is a complex structure with the following children:
field-name
include-root
field-path
This is a complex structure with the following children:
path
weight
metadata
stemmed-searches
word-searches
field-value-searches
field-value-positions
fast-phrase-searches
fast-case-sensitive-searches
fast-diacritic-sensitive-searches
trailing-wildcard-searches
trailing-wildcard-word-positions
three-character-searches
three-character-word-positions
two-character-searches
one-character-searches
word-lexicons
This is a complex structure with the following children:
word-lexicon
included-elements
This is a complex structure with the following children:
included-element
This is a complex structure with the following children:
namespace-uri
localname
weight
attribute-namespace-uri
attribute-localname
attribute-value
excluded-elements
This is a complex structure with the following children:
excluded-element
This is a complex structure with the following children:
namespace-uri
localname
attribute-namespace-uri
attribute-localname
attribute-value
tokenizer-overrides
This is a complex structure with the following children:
tokenizer-override
This is a complex structure with the following children:
character
tokenizer-class
range-field-indexes
This is a complex structure with the following children:
range-field-index
This is a complex structure with the following children:
scalar-type
field-name
collation
range-value-positions
invalid-values
geospatial-element-indexes
This is a complex structure with the following children:
geospatial-element-index
This is a complex structure with the following children:
namespace-uri
localname
coordinate-system
point-format
range-value-positions
invalid-values
geospatial-element-child-indexes
This is a complex structure with the following children:
geospatial-element-child-index
This is a complex structure with the following children:
parent-namespace-uri
parent-localname
namespace-uri
localname
coordinate-system
point-format
range-value-positions
invalid-values
geospatial-element-pair-indexes
This is a complex structure with the following children:
geospatial-element-pair-index
This is a complex structure with the following children:
parent-namespace-uri
parent-localname
latitude-namespace-uri
latitude-localname
longitude-namespace-uri
longitude-localname
coordinate-system
range-value-positions
invalid-values
geospatial-element-attribute-pair-indexes
This is a complex structure with the following children:
geospatial-element-attribute-pair-index
This is a complex structure with the following children:
parent-namespace-uri
parent-localname
latitude-namespace-uri
latitude-localname
longitude-namespace-uri
longitude-localname
coordinate-system
range-value-positions
invalid-values
geospatial-path-indexes
This is a complex structure with the following children:
geospatial-path-index
This is a complex structure with the following children:
path-expression
coordinate-system
point-format
range-value-positions
invalid-values
geospatial-region-path-indexes
This is a complex structure with the following children:
geospatial-region-path-index
This is a complex structure with the following children:
path-expression
coordinate-system
units
geohash-precision
invalid-values
default-rulesets
This is a complex structure with the following children:
default-ruleset
This is a complex structure with the following children:
location
database-replication
This is a complex structure with the following children:
foreign-replicas
This is a complex structure with the following children:
foreign-replica
This is a complex structure with the following children:
foreign-cluster-name
foreign-database-name
connect-forests-by-name
lag-limit
replication-enabled
queue-size
foreign-master
This is a complex structure with the following children:
foreign-cluster-name
foreign-database-name
connect-forests-by-name
database-references
This is a complex structure with the following children:
database-reference
This is a complex structure with the following children:
reference-cluster-name
reference-database-name
rebalancer-enable
rebalancer-throttle
assignment-policy
This is a complex structure with the following children:
assignment-policy-name
partition-key
This is a complex structure with the following children:
cts:base-reference
lower-bound-included
default-partition
shutdown-on-storage-failure
storage-failure-timeout
curl -X PUT --anyauth -u admin:admin --header "Content-Type:application/json" \ -d '{"fast-element-phrase-searches":false}' \ http://localhost:8002/manage/v2/databases/Documents/properties ==> Sets the "fast-element-phrase-searches" property to false on the Documents database.
curl -X PUT --anyauth -u admin:admin --header "Content-Type:application/xml" -d '<database-properties xmlns="http://marklogic.com/manage"><fast-phrase-searches>true</fast-phrase-searches></database-properties>' http://localhost:8002/manage/v2/databases/MyNewDatabase/properties curl -X PUT --anyauth -u admin:admin --header "Content-Type:application/xml" -d '<database-properties xmlns="http://marklogic.com/manage"><database-backups><database-backup><backup-enabled>true</backup-enabled><backup-directory>/home/backups/Documents</backup-directory><backup-type>weekly</backup-type><backup-period>1</backup-period><backup-days><backup-day>sunday</backup-day></backup-days><backup-start-time>00:00:00</backup-start-time><backup-timestamp>2021-05-31T15:05:42.8254819+08:00</backup-timestamp><max-backups>2</max-backups><backup-security-database>true</backup-security-database><backup-schemas-database>true</backup-schemas-database><backup-triggers-database>true</backup-triggers-database><include-replicas>true</include-replicas><incremental-backup>false</incremental-backup><journal-archiving>false</journal-archiving><journal-archive-path/><journal-archive-lag-limit>15</journal-archive-lag-limit></database-backup></database-backups></database-properties>' http://localhost:8002/manage/v2/databases/MyNewDatabase/properties ==> Sets the "fast-element-phrase-searches" property to false on the Documents database.
curl -X PUT --digest -u admin:admin -H "Content-type: application/json" \ -d '{ "database-backup":[ {"backup-id":"2889081595792328957", "backup-enabled":true, "backup-directory":"/home/backups/Documents", "backup-type":"weekly", "backup-period":1, "backup-day":["sunday"], "backup-start-time":"00:00:00-08:00", "backup-timestamp":"2015-12-22T11:01:25.081669-08:00", "max-backups":2, "backup-security-database":true, "backup-schemas-database":true, "backup-triggers-database":true, "include-replicas":true, "incremental-backup":false, "journal-archiving":false, "journal-archive-path":"", "journal-archive-lag-limit":15} ] }' \ http://localhost:8002/manage/v2/databases/Documents/properties ==> Sets the Documents database to be backed up every week on Sunday at 12:00am.