Loading TOC...

alert.ruleRemove

alert.ruleRemove(
   $config-uri as String,
   $id as String
) as null

Summary

This function removes the specified rule from the collection. A user must have the alert-user privilege to call this function. An exception is thrown if the rule does not exist. A user must have the alert-admin privilege to delete other users' rules.

Parameters
$config-uriThe URI passed to alert.makeConfig.
$idThe ID of the rule to be removed.

Example

  var alert = require("/MarkLogic/alert.xqy");

  declareUpdate();
  var id = alert.ruleGetId(
        alert.getAllRules("http://acme.com/alert/message-board", cts.wordQuery("dna"))[0]);
  alert.ruleRemove("http://acme.com/alert/message-board", id);
    

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy