Skip to content

Modify Mute Rule



POST /api/v1/monitor/mute/{obj_uuid}/modify

Overview

Modify the scope, time, notification configuration, and custom declaration of an existing mute rule.

Before Calling and Usage Steps

Read the list first to save the original configuration, then construct a complete request. Omitting muteRanges and tags clears the original values; for the omission rules of other conditionally updated fields, see the parameter table. This endpoint is not a general-purpose partial patch.

For a one-time rule, omitting the start/end time retains the value, but an empty string for endTime currently cannot reliably clear the end; if you need a rule without an end, verify the existing rule first or adjust it in the console. Switching the repeat mode requires the complete start, Cron, duration in seconds, and expiration configuration; pass "0" for permanent repetition.

Modifying notification targets is a full replacement; [] removes them. Unlike creation, modification does not check whether the notification body matches the targets, so verify this yourself. An existing muteIncident is retained as-is; the current public request does not support changing it.

The rule controls muting of notifications for matching events; events and monitoring data are still processed as usual. muteIncident is an extended capability for incident notifications and is not currently included in the public write parameters; adjust it in the console if needed. Do not submit internal parameters as public request fields.

After saving, an asynchronous task updates the execution cache and rule notifications; success does not mean synchronization or message delivery completed immediately. Modifying an active rule may send notifications to the configured targets again and is not guaranteed to notify only newly added targets. If it fails, check the rule and its effective status first.

A successful response does not always provide repeatCrontabSet; read the list again if you need that structure. The response contains crontab, time, and the complete saved fields, and does not include workStatus.

Route Parameters

Parameter Name Type Required Description
obj_uuid string Y UUID of the mute rule in the path; it must belong to the current workspace and not be deleted.
Example: mute_example
How to obtain or fill in: Obtain it from content.data[].uuid in the Mute Rule List.

Request Headers

Parameter Name Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the workspace.
Example: <DF-API-KEY>
How to obtain or fill in: Obtain an OpenAPI key with this operation permission from API Key Management in the target workspace.

Body Request Parameters

Parameter Name Type Required Description
muteRanges[*] json A single scope object; matching is determined by the UUID field, while name/type are display information. Usually an item contains only one resource key.
Example: {"checkerUUID": "rul_example", "name": "Production API monitoring"}
How to obtain or fill in: Obtain the corresponding UUIDs from Monitor/SLO, Alert Policy, or Monitor tag management in the same workspace; do not use display names in place of stable identifiers.
muteRanges[*].checkerUUID string Monitor UUID, commonly used for checker scopes.
Example: rul_example
How to obtain or fill in: Obtain the rul_ UUID from Monitor, Smart Monitoring, or Intelligent Inspection configuration in this workspace.
muteRanges[*].sloUUID string SLO identifier; at execution it maps to the corresponding SLO detection monitor; it is not guaranteed to take effect when there is no valid detection relation.
Example: monitor_example
How to obtain or fill in: Obtain the monitor_ UUID from the SLO list in this workspace.
muteRanges[*].alertPolicyUUID string Alert policy identifier, used for alertPolicy scopes.
Example: altpl_example
How to obtain or fill in: Obtain it from content.data[].uuid in the Alert Policy List.
muteRanges[*].tagUUID string Monitor tag identifier; at execution it matches the event df_label by tag name.
Example: tag_example
How to obtain or fill in: Obtain the tag UUID from Monitor tag management; it is not an arbitrary event field value.
muteRanges[*].name string Client display name; does not replace the UUID.
Example: Production API monitoring
How to obtain or fill in: Use the display name of the corresponding resource; optional.
muteRanges[*].type string Type for display; the actual scope semantics are determined by the top-level type and the UUID field.
Example: Monitor
How to obtain or fill in: Retain the resource display type as required by the client; optional.
tags.field array Array of actual values that this field must match.
Example: ["production"]
How to obtain or fill in: Use a real event field as the key, such as env; values are recommended as an array.
tags.field[*] string A single match value; choose according to the actual data type.
Example: production
How to obtain or fill in: Take the value of the same field in the event.
notifyTargets[*] json A single notification target group, using type and to.
Example: {"type": "mail", "to": ["acnt_example"]}
How to obtain or fill in: Obtain acnt_ UUIDs for accounts from Workspace Members, group_ UUIDs for teams from team management in this workspace, and notify_ UUIDs for notification targets from the Notification Target List.
notifyTargets[*].type string Notification target type; choose mail/notifyObject/memberGroup supported by the execution task; unknown types may be saved but produce no valid notification.
Example: mail
How to obtain or fill in: Use mail for email accounts, notifyObject for notification targets, and memberGroup for team email.
notifyTargets[*].to array mail holds account UUIDs, notifyObject holds notification target UUIDs, and memberGroup holds team UUIDs; submit only valid resources in the same workspace.
Example: ["acnt_example"]
How to obtain or fill in: Obtain acnt_ UUIDs for accounts from Workspace Members, group_ UUIDs for teams from team management in this workspace, and notify_ UUIDs for notification targets from the Notification Target List.
notifyTargets[*].to[*] string A single UUID of the corresponding type; do not use an email address directly as an account UUID.
Example: acnt_example
How to obtain or fill in: Obtain acnt_ UUIDs for accounts from Workspace Members, group_ UUIDs for teams from team management in this workspace, and notify_ UUIDs for notification targets from the Notification Target List.
declaration.custom field JSON Custom declaration content; does not change rule matching or authorization.
Example: MAINT-EXAMPLE
How to obtain or fill in: Define field names and values according to your own business requirements.
name string Rule name; explicitly providing it is recommended for both create and modify. When omitted on create, a short name may be generated from the scope/tags/conditions; when omitted on modify, the original name is retained.
Allow null: False
Example: Production maintenance mute
How to obtain or fill in: Name the maintenance window from the business side; 64 characters or fewer is recommended.
description string Optional description; 512 characters or fewer is recommended. When omitted on modify it is retained; an empty string clears it.
Allow null: False
Allow empty string: True
Example: Production service maintenance window.
How to obtain or fill in: Explain the maintenance reason and impact scope.
tags json Optional field value conditions; omitting them on modify clears the original tags. A non-empty filterString takes precedence over tags but is still combined with muteRanges.
Allow null: False
Example: {"env": ["production"]}
How to obtain or fill in: Organize them from the raw event field names and values, such as env, host, and service.
filterString string Optional event attribute conditions; the declaration allows up to 2048 characters, but the current storage capacity is shorter, so 1024 characters or fewer is recommended. When non-empty it takes precedence over tags; when omitted on modify it is retained, and an empty string clears it.
Allow null: False
Allow empty string: True
Maximum length: 2048
Example: service:checkout-api
How to obtain or fill in: Fill it in according to FilterString syntax; you can copy it from the event filter in the console.
muteRanges array Complete scope array; when omitted on create it is []; when omitted on modify the original scopes are also cleared. For each item, fill in the corresponding UUID according to its type. When the custom scope, tags, and filterString are all empty, event notifications for the entire workspace may be muted; confirm the actual scope before sending.
Allow null: False
Example: []
How to obtain or fill in: Obtain the corresponding UUIDs from Monitor/SLO, Alert Policy, or Monitor tag management in the same workspace; do not use display names in place of stable identifiers.
notifyTargets array Optional notification targets configured on the rule; they apply to notifications about the mute rule itself, not to the recipients of the muted alerts. On modify, passing them replaces the whole set, [] removes them, and omitting them retains them.
Allow null: False
Example: []
How to obtain or fill in: Obtain acnt_ UUIDs for accounts from Workspace Members, group_ UUIDs for teams from team management in this workspace, and notify_ UUIDs for notification targets from the Notification Target List.
notifyMessage string Optional notification body, up to 3000 characters. On create, if any notifyTargets item has a non-empty to, non-empty content must be provided; on modify, you should ensure the targets and content are complete yourself.
Allow null: False
Maximum length: 3000
Example: The production maintenance mute window has been configured.
How to obtain or fill in: Fill in the notification content of the mute rule; do not include sensitive credentials.
notifyTimeStr string Optional notification time; on create, omitting it or passing an empty string is treated as immediate notification intent; on modify, omitting it retains the value and an empty string changes it to immediate intent. Actual sending depends on valid targets, rule status, and time; this is not a switch to cancel notifications. Repeat rules can notify in each cycle with the same lead time relative to the start time.
Allow null: False
Allow empty string: True
Example:
How to obtain or fill in: Fill in YYYY/MM/DD HH:MM:SS according to the rule timezone.
startTime string Start time, YYYY/MM/DD HH:MM:SS. When omitted on create, the current time is used; when omitted on modify for a one-time rule it is retained; when modifying to a repeat rule, it should be provided explicitly.
Allow null: False
Example: 2026/11/20 09:00:00
How to obtain or fill in: Fill in a local time string according to the maintenance window start time and the selected timezone.
endTime string One-time end time. When omitted or an empty string on create, end=-1 is saved, meaning no end is set; when omitted on modify it is retained, but passing an empty string may currently return an internal error. For one-time rules, explicitly providing a finite end time is recommended.
Allow null: False
Allow empty string: True
Example: 2026/11/20 10:00:00
How to obtain or fill in: For one-time rules, fill in the actual end time, later than startTime.
repeatTimeSet int Y Required repeat mode. The actual storage is expressed through repeatExpire/crontab, and the response does not always return repeatTimeSet.
Allow null: False
Example: 0
How to obtain or fill in: Fill in 0 for one-time only and 1 for periodic repetition; use only these two conventional values.
repeatCrontabSet object Five-field Cron object that is conditionally required for repeat mode; omitted for one-time mode. The public declaration does not give the object type, so this document interprets it as the actual object; missing fields may produce an invalid Cron.
Allow null: False
Example: {"min": "0", "hour": "9", "day": "*", "month": "*", "week": "1-5"}
How to obtain or fill in: For repeat mode, select the start cycle according to the rule timezone and submit the following 5 string fields completely.
repeatCrontabSet.min string Submit this field as a string when repeating: minutes, 0-59. The five fields are concatenated directly and validated for whether a runnable time point exists.
Allow null: False
Example: 0
How to obtain or fill in: Choose according to Cron syntax, for example * for all, and commas/ranges for multiple time points.
repeatCrontabSet.hour string Submit this field as a string when repeating: hours, 0-23. The five fields are concatenated directly and validated for whether a runnable time point exists.
Allow null: False
Example: 9
How to obtain or fill in: Choose according to Cron syntax, for example * for all, and commas/ranges for multiple time points.
repeatCrontabSet.day string Submit this field as a string when repeating: day of month, 1-31 or *. The five fields are concatenated directly and validated for whether a runnable time point exists.
Allow null: False
Example: *
How to obtain or fill in: Choose according to Cron syntax, for example * for all, and commas/ranges for multiple time points.
repeatCrontabSet.month string Submit this field as a string when repeating: month, 1-12 or *. The five fields are concatenated directly and validated for whether a runnable time point exists.
Allow null: False
Example: *
How to obtain or fill in: Choose according to Cron syntax, for example * for all, and commas/ranges for multiple time points.
repeatCrontabSet.week string Submit this field as a string when repeating: day of week, according to the Cron week field or *. The five fields are concatenated directly and validated for whether a runnable time point exists.
Allow null: False
Example: 1-5
How to obtain or fill in: Choose according to Cron syntax, for example * for all, and commas/ranges for multiple time points.
crontabDuration int Conditionally required for repeat mode; must be greater than 0. It does not control endTime in one-time mode.
Allow null: False
Example: 3600
How to obtain or fill in: Fill in a positive integer number of seconds for the duration of each mute window, for example 3600 for 1 hour.
repeatExpireTime string For repeat mode, explicitly provide 0 or a valid expiration date; omission or an empty string is not equal to permanent repetition; -1 is an internal marker for one-time. Creating a repeat rule while omitting this may be handled as one-time, and modifying a repeat rule while omitting it may cause an internal error.
Allow null: False
Allow empty string: True
Example: 0
How to obtain or fill in: Fill in the string 0 for permanent periodic repetition; for finite periodic repetition, fill in YYYY/MM/DD HH:MM:SS in the timezone and ensure it is later than the start time.
timezone str Y Timezone required for create/modify; controls local time parsing and Cron execution. An invalid timezone or time string may return a generic internal error.
Allow null: False
Example: Asia/Shanghai
How to obtain or fill in: Use an IANA timezone, such as Asia/Shanghai or UTC; time text is interpreted in that timezone.
type str Y Required type. custom is a custom event scope, checker is monitor/SLO, alertPolicy is alert policy, and tag is monitor tag. Historical lists may contain monitor, but current public writes do not accept that enum.
Allow null: False
Allowed values: ['checker', 'alertPolicy', 'tag', 'custom']
Example: custom
How to obtain or fill in: Choose custom/checker/alertPolicy/tag according to the mute scope.
declaration json Optional custom declaration object for the rule. When omitted on modify it is retained; {} clears it. content.declaration in the single-rule response is this field and is no longer overridden by the workspace public declaration.
Allow null: False
Example: {"ticket": "MAINT-EXAMPLE"}
How to obtain or fill in: The caller fills in the rule custom notes or business tracking identifiers to retain.

Supplementary Parameter Notes

Data notes.*

  • Request parameter descriptions
Parameter Name type Description
muteRanges list Mute scope, including monitors, Intelligent Inspection, self-hosted inspection, SLO, and alert policies
name str Rule name
description str Description
tags dict Tags
filterString str Event attributes (passed as an expression)
notifyTargets list to: the list contains notification targets, type is their notification type
repeatTimeSet int Whether to repeat the mute; 1 means enable repeated mute, 0 means one-time only
repeatCrontabSet dict Time configuration of the repeated mute rule
crontabDuration int Duration of the mute after this scheduled task starts
notifyTargets list to: the list contains notification targets, type is their notification type
notifyTimeStr str Notification time, %Y/%m/%d %H:%M:%S
startTime str Mute start time, %Y/%m/%d %H:%M:%S
endTime str Mute end time, %Y/%m/%d %H:%M:%S
repeatExpireTime str Expiration time of the repeated mute, %Y/%m/%d %H:%M:%S
timezone str Timezone of the corresponding task; defaults to Asia/Shanghai
type str Type of the mute rule: checker:monitor:tag:custom
repeatExpire int Expiration time of the repeated mute (removed on 2023-08-24)
start int Mute start time (removed on 2023-08-24)
end int Mute end time (removed on 2023-08-24)
notifyTime int Notification time, the second-level timestamp of the time point; -1 means notify immediately (removed on 2023-08-24)
declaration dict Custom declaration information

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/monitor/mute/mute_example/modify' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":"Production maintenance mute","description":"Production service maintenance window.","type":"custom","muteRanges":[],"tags":{},"filterString":"service:checkout-api","notifyTargets":[],"repeatTimeSet":0,"timezone":"Asia/Shanghai","startTime":"2026/11/20 09:00:00","endTime":"2026/11/20 10:00:00"}'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content object The complete saved rule entity and formatted times; the existing rule declaration is used and no public declaration is inserted additionally.
content.id integer Rule record number; operations use uuid.
content.uuid string mute_ rule UUID.
content.workspaceUUID string Owning workspace.
content.name string Rule name.
content.description string Description.
content.type string custom/checker/alertPolicy/tag; historical records may also contain monitor.
content.tags object Saved field value conditions.
content.tags.field JSON Match values of the corresponding event field.
content.filterString string Event attribute conditions; when non-empty they take precedence over tags.
content.muteRanges array<object> Saved scope array; see the request parameters for the meaning of each UUID.
content.muteRanges[].checkerUUID string or array Monitor identifier; historical records may store an array.
content.muteRanges[].sloUUID string or array SLO identifier; historical records may store an array.
content.muteRanges[].alertPolicyUUID string Alert policy UUID.
content.muteRanges[].tagUUID string or array Monitor tag UUID.
content.muteRanges[].name string Display name; optional.
content.muteRanges[].type string Display type; optional.
content.notifyTargets array<object> Notification targets of the mute rule.
content.notifyTargets[].type string mail/notifyObject/memberGroup.
content.notifyTargets[].to array<string> Array of UUIDs of the corresponding type.
content.notifyTargets[].to[] string A single target UUID.
content.notifyMessage string Notification body of the mute rule.
content.notifyTime integer Notification time in Unix seconds; -1 indicates immediate intent, and whether to send is still determined by the task.
content.notifyTimeStr string Notification time formatted according to timezone; an empty string for immediate intent.
content.start integer Start time in Unix seconds.
content.end integer One-time end time in Unix seconds; -1 means no end.
content.startTime string YYYY/MM/DD HH:MM:SS in the timezone.
content.endTime string End time in the same format; an empty string when end=-1.
content.repeatExpire integer -1 for one-time, 0 for permanent repetition, and a positive value for the periodic expiration in Unix seconds.
content.repeatExpireTime string -1/0 or the formatted expiration time in the timezone.
content.crontab string Five-field Cron string when repeating; usually empty for one-time.
content.crontabDuration integer Duration in seconds of each repeat window.
content.cycleNotifyAt integer Unix seconds of the most recent scheduled notification; -1 if not yet notified.
content.timezone string Rule timezone.
content.declaration object Rule custom declaration, not the public declaration of this workspace.
content.declaration.custom field JSON Custom value saved by the caller.
content.muteIncident boolean Whether to mute incident notifications as well. The current OpenAPI does not declare this write parameter; it defaults to false on create, and existing rules may reflect the console setting. alertPolicy scopes do not support this incident matching.
content.status integer 0 enabled, 2 disabled, 3 deleted. Enabled does not mean the current time window is in effect.
content.creator string Creating identity.
content.updator string Most recent updating identity.
content.createAt integer Creation time in Unix seconds.
content.updateAt integer Update time in Unix seconds; -1 initially.
content.deleteAt integer Deletion time in Unix seconds; -1 if not deleted.
{
  "code": 200,
  "content": {
    "id": 42,
    "uuid": "mute_example",
    "workspaceUUID": "wksp_example",
    "name": "Production maintenance mute",
    "description": "Production service maintenance window.",
    "type": "custom",
    "tags": {},
    "filterString": "service:checkout-api",
    "muteRanges": [],
    "notifyTargets": [],
    "notifyMessage": "",
    "notifyTime": -1,
    "start": 1795136400,
    "end": 1795140000,
    "repeatExpire": -1,
    "cycleNotifyAt": -1,
    "crontab": "",
    "crontabDuration": 0,
    "declaration": {},
    "muteIncident": false,
    "timezone": "Asia/Shanghai",
    "status": 0,
    "creator": "wsak_example",
    "updator": "wsak_example",
    "createAt": 1785430800,
    "updateAt": 1785430860,
    "deleteAt": -1,
    "startTime": "2026/11/20 09:00:00",
    "endTime": "2026/11/20 10:00:00",
    "notifyTimeStr": "",
    "repeatExpireTime": "-1"
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Handling
406 ft.ParameterValidationFailed A request field is missing, or a field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError The request JSON syntax is invalid Request JSON format error Fix the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The top level of the JSON is not an object Some json file format error Submit a JSON object.
400 ft.muteStartEndError The one-time end is not later than the start, or the repeat crontabDuration is not greater than 0 The mute start time must be earlier than the mute end time Adjust the order and provide a positive number of seconds for repeat windows.
406 ft.InvalidCrontabFormat The Cron cannot be parsed, has no runnable time point, or the timezone causes the schedule check to fail Invalid crontab format Submit all five Cron string fields and the correct timezone.
400 ft.ErrorFilterString The event attribute conditions cannot be parsed filterString parsing failed: {} Use a valid FilterString generated by the console or fix it according to the example.
406 ft.ExceedTimestampLimit The mute start/end/repeat expiration Unix seconds exceed 2147483647 Time exceeds the 2038-01-19 limit Keep these time points before the 2038-01-19 upper limit; avoid treating milliseconds as seconds.
500 ft.InternalServerError A required field for repeat mode is missing, the time/timezone format is incorrect, the array element shape is incorrect, or saving/task processing failed Internal error Self-check against the complete conditions for one-time/repeat; check the saved rule first, then decide whether to retry, and provide the traceId if it keeps failing.
404 ft.NotFound The specified rule does not exist, has been deleted, or does not belong to the current workspace Business route not found Reselect a valid UUID from the current workspace list.

Feedback

Is this page helpful?