Loading TOC...

MarkLogic Server 11.0 Product Documentation
PUT /manage/v2/databases/{id|name}/triggers/{id|name}/properties

Summary

This resource address updates the configuration properties of the specified alert trigger for the specified database.

URL Parameters
format The format of the posted data. Can be either json or xml (default). This value overrides the Accept header if both are present.
Request Headers
Accept The expected MIME type of the request body. If the format? parameter is present, it takes precedence over the Accept header.
Content-type The MIME type of the data in the request body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json, or text/html.
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, one of application/xml, application/json, or text/html.

Response

Upon success, MarkLogic Server returns a status code 200 (OK). If the payload is malformed or the trigger 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.

Required Privileges

This operation requires one of the following:

Usage Notes

The properties that can be modified are listed below.

id

The trigger ID.

name

The trigger name.

description

The trigger description.

event

The description of event.

This is a complex structure with the following children:

data-event

The description of triggering events.

This is a complex structure with the following children:

document-scope

The scope of a single document for a trigger.

This is a complex structure with the following children:

uri

The URI.

collection-scope

The scope of all documents in a collection for a trigger.

This is a complex structure with the following children:

uri

The URI.

directory-scope

The scope of descendant documents of a directory for a trigger.

This is a complex structure with the following children:

uri

The URI.

depth

The depth.

document-content

The document content.

This is a complex structure with the following children:

update-kind

The kind of update.

any-property-content

The document properties.

any-custom-property-content

The custom document properties.

property-content

The specific document property.

This is a complex structure with the following children:

property-name

The QName of a property.

This is a complex structure with the following children:

namespace-uri

The namespace URI.

localname

The localname.

when

The timing of the event.

database-online-event

The description of a database coming online.

This is a complex structure with the following children:

user

The user unique ID.

user-id

The user unique ID.

user-name

The user unique name.

module

The module path

module-db

The module database

module-root

The module root

enabled

Whether the trigger is enabled or not.

recursive

Whether the trigger is recursive or not.

task-priority

The post-commit task priority.

permissions

The default set of permissions used in document creation.

This is a complex structure with the following children:

permission

Permission representation.

This is a complex structure with the following children:

role-name

The Role name (unique)

capability

The action/task permitted by a permission

Example


curl -X PUT --digest -u admin:admin -H "Content-type: application/json" \
-d '{  
    "description": "New Description"
   }' \
http://localhost:8002/manage/v2/databases/myTriggers/triggers/my-trigger/properties

==>  Updates the "description" of the "my-trigger" alert trigger. 
    

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