Skip to content

Modify (This API was retired on 2025-12-30; the v2 API is recommended)



POST /api/v1/alert_policy/{alert_policy_uuid}/modify

Overview

Modify the notification configuration and operation permissions of an Alert Policy.

Before Calling and Usage Steps

First read the details and replace them with the complete target alertOpt. Omitting alertOpt preserves the original configuration. When provided, aggInterval is required, and {} cannot be used to clear it. To disable aggregation and clear notification targets, submit a valid complete object, for example {"aggInterval":0,"alertTarget":[]}, and fill other mode fields according to the current parameter descriptions. We recommend also submitting the existing name, required ruleTimezone, and complete alertOpt to trigger deep validation. In the current code, modifications to only notification configuration may skip deep validation, and success does not mean the target structure is necessarily executable. This v1 API only saves the notification policy and does not modify Monitor/SLO/security rule bindings. Use v2 to adjust bindings. In the current version, the top-level ruleTimezone is saved and displayed, but execution cache reads the historical alertOpt.ruleTimezone, defaulting to Asia/Shanghai. For other timezones, do not assume they have taken effect solely because saving succeeded; integrators must verify against the actual execution timezone. Do not use extra undeclared fields to bypass public parameters. Saving and cache refresh do not mean notification delivery; actual sending depends on valid targets, event severities, time windows, filters, duplicate suppression, and the alert execution service. After a failure or timeout, first read the policy and binding status, verify the saved configuration and bindings, and then handle only the incomplete modifications to avoid misjudging partial updates.

Route Parameters

Parameter Type Required Description
alert_policy_uuid string Y UUID of the Alert Policy in the current workspace.
Example: altpl_example
How to obtain or enter: Obtain from content.data[].uuid in the Alert Policy List; before modifying, verify with Alert Policy Details.

Request Headers

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

Body Request Parameters

Parameter Type Required Description
permissionSet[*] string Identifier of a single operable principal; whether it takes effect also depends on the identity and the current resource status.
Example: wsAdmin
How to obtain or enter: Use a role UUID (such as wsAdmin/general/readOnly/role_), an acnt_ account, or a group_ team; accounts/teams are subject to the actual resources in this Workspace.
alertOpt.silentTimeoutByStatus[*] json Level-specific interval object.
Example: {"status": "critical,error", "silentTimeout": 600}
How to obtain or enter: Each item defines a group of severities and their seconds.
alertOpt.silentTimeoutByStatus[*].status string For non-security, use fatal/critical/error/warning/nodata/info/ALL; for security, use security_critical/security_high/security_medium/security_low/security_info/security_ALL. Separate multiple values with English commas without spaces.
Example: critical,error
How to obtain or enter: Select from event severities; security severities use the security_ prefix, such as security_high.
alertOpt.silentTimeoutByStatus[*].silentTimeout integer Required repeat interval for each group, in seconds. Invalid severities may trigger internal errors; validate before sending.
Example: 600
How to obtain or enter: Enter a non-negative integer number of seconds for the severity; 0 means no further periodic repetition.
alertOpt.aggFields[*] string A single aggregation field. For byCustom, select based on actual event fields; do not guess fields from display names alone.
Example: df_monitor_checker_id
How to obtain or enter: For event Monitor, use df_monitor_checker_id; for detection dimensions, use df_dimension_tags; for tags, use df_label; for legacy intelligent aggregation, use CLUSTER.
alertOpt.aggLabels[*] string A single tag value.
Example: production
How to obtain or enter: Use the tag value from the actual event.
alertOpt.aggClusterFields[*] string A single text field.
Example: df_title
How to obtain or enter: Use df_title for title and df_message for content.
alertOpt.alertTarget[*] json Rule object. When a fallback is needed, explicitly add a rule without a time configuration; do not assume the system fills one in automatically.
Example: {"name": "默认通知", "targets": [{"status": "critical", "to": ["notify_example"]}]}
How to obtain or enter: Configure each item as a time window or a fallback rule with no time restriction.
alertOpt.alertTarget[*].name string Optional rule name, up to 256 characters.
Example: 默认通知
How to obtain or enter: Name it according to its business purpose.
alertOpt.alertTarget[*].crontab string Recurring start time expression; must be paired with crontabDuration. Choose either this or the custom date option.
Example: 0 9 * * 1-5
How to obtain or enter: Enter a Cron expression for the recurring start time, such as 9:00 on weekdays; also provide crontabDuration.
alertOpt.alertTarget[*].crontabDuration integer Duration of the recurring window in seconds; required when crontab is provided; if no recurring period is configured, omit both.
Example: 28800
How to obtain or enter: Convert the time window length to a positive integer number of seconds, for example 28800 for 8 hours.
alertOpt.alertTarget[*].customDateUUIDs array Reference to a custom date set, up to 366 items; provide together with customStartTime and customDuration; do not substitute crontabDuration.
Example: ["ndate_example"]
How to obtain or enter: Obtain the date set from content.data[].uuid in Custom Notification Dates; each item is a date configuration UUID, not a date string.
alertOpt.alertTarget[*].customDateUUIDs[*] string A single date configuration UUID.
Example: ndate_example
How to obtain or enter: Copy a valid date configuration UUID from the same Workspace in Custom Notification Dates.
alertOpt.alertTarget[*].customStartTime string Start time on the custom date; used together with customDateUUIDs/customDuration.
Example: 09:30:00
How to obtain or enter: Enter HH:MM:SS in local time on the selected date; interpreted in the actual execution timezone.
alertOpt.alertTarget[*].customDuration integer Duration of the custom date window in seconds; must be provided together with the date set and start time.
Example: 3600
How to obtain or enter: Enter a positive integer number of seconds for the window length, for example 3600 for 1 hour.
alertOpt.alertTarget[*].targets array Array of severity-mode actions.
Example: [{"status": "critical", "to": ["notify_example"]}]
How to obtain or enter: For accounts, obtain content.data[].uuid from Workspace Members; for teams, obtain the group_ UUID from the member's member_group or Team Management; for Notification Targets, obtain the UUID from the Notification Target List. Use actual resources in the current Workspace for all of these.
alertOpt.alertTarget[*].targets[*] json A single severity action.
Example: {"status": "critical", "to": ["notify_example"]}
How to obtain or enter: Set one action for each event source and severity.
alertOpt.alertTarget[*].targets[*].status string Required severity selection: fatal, critical, error, warning, nodata, info; use uppercase ALL for all. Separate multiple values with English commas without spaces. For the security source, use critical, high, medium, low, info, or ALL instead.
Example: critical
How to obtain or enter: Use df_status from the actual event; for security events, also set df_source=security.
alertOpt.alertTarget[*].targets[*].df_source string Optional; the public target structure only supports security. When omitted, the execution layer excludes the security source.
Example: security
How to obtain or enter: Set security only for security monitoring events; omit for ordinary events.
alertOpt.alertTarget[*].targets[*].to array Required array of recipient targets; can include members, teams, Notification Targets, or email addresses; an agent account can use its valid default Webhook.
Example: ["notify_example"]
How to obtain or enter: For accounts, obtain content.data[].uuid from Workspace Members; for teams, obtain the group_ UUID from the member's member_group or Team Management; for Notification Targets, obtain the UUID from the Notification Target List. Use actual resources in the current Workspace for all of these.
alertOpt.alertTarget[*].targets[*].to[*] string In member mode, email/sms/notify_ are commonly used; in status mode, use acnt_/agent_/group_/notify_ or email. Availability of channels such as SMS depends on the site and target configuration.
Example: notify_example
How to obtain or enter: For accounts, obtain content.data[].uuid from Workspace Members; for teams, obtain the group_ UUID from the member's member_group or Team Management; for Notification Targets, obtain the UUID from the Notification Target List. Use actual resources in the current Workspace for all of these.
alertOpt.alertTarget[*].targets[*].tags json In status mode, filter events by field value; in member mode, use the parent alertInfo.filterString; tags here are not used as member selection conditions.
Example: {"env": ["production"]}
How to obtain or enter: Build a dictionary from the event's original fields and values.
alertOpt.alertTarget[*].targets[*].tags.字段 array Array of matching values for a single field.
Example: ["production"]
How to obtain or enter: Use an actual event field as the key, such as env; use an array of actual field values to match as the value.
alertOpt.alertTarget[*].targets[*].tags.字段[*] string A single matching value.
Example: production
How to obtain or enter: Obtain the value from the same field in the event.
alertOpt.alertTarget[*].targets[*].filterString string In status mode, when non-empty, takes precedence over tags and is used for escalation actions; in member mode, use the parent alertInfo.filterString; fields within this target are not valid filtering entry points.
Example: env:production
How to obtain or enter: Use the server-side FilterString syntax, for example env:production; generate complex conditions in the console and copy them.
alertOpt.alertTarget[*].targets[*].upgradeTargets array Optional escalation actions; executed after an event remains at the corresponding severity for duration; [] means no escalation is configured.
Example: [{"to": ["acnt_example"], "duration": 600}]
How to obtain or enter: For accounts, obtain content.data[].uuid from Workspace Members; for teams, obtain the group_ UUID from the member's member_group or Team Management; for Notification Targets, obtain the UUID from the Notification Target List. Use actual resources in the current Workspace for all of these.
alertOpt.alertTarget[*].targets[*].upgradeTargets[*] json A single escalation action.
Example: {"to": ["acnt_example"], "duration": 600}
How to obtain or enter: Select the recipient target and wait time in seconds for each escalation.
alertOpt.alertTarget[*].targets[*].upgradeTargets[*].to array In member mode, these are the recipient members/teams for escalation; in status mode, these are the escalation notification targets, which can be members/teams/Notification Targets/email addresses.
Example: ["acnt_example"]
How to obtain or enter: For accounts, obtain content.data[].uuid from Workspace Members; for teams, obtain the group_ UUID from the member's member_group or Team Management; for Notification Targets, obtain the UUID from the Notification Target List. Use actual resources in the current Workspace for all of these.
alertOpt.alertTarget[*].targets[*].upgradeTargets[*].to[*] string A single escalation recipient identifier.
Example: acnt_example
How to obtain or enter: For accounts, obtain content.data[].uuid from Workspace Members; for teams, obtain the group_ UUID from the member's member_group or Team Management; for Notification Targets, obtain the UUID from the Notification Target List. Use actual resources in the current Workspace for all of these.
alertOpt.alertTarget[*].targets[*].upgradeTargets[*].duration integer Required duration in seconds; each escalation is configured relative to the event remaining in the corresponding severity, and multiple duration values are not automatically accumulated.
Example: 600
How to obtain or enter: Enter a positive integer number of seconds based on business requirements; for example, 600 means the severity persists for 10 minutes.
alertOpt.alertTarget[*].targets[*].upgradeTargets[*].toWay array Array of notification methods for member escalation; not used in status mode.
Example: ["email"]
How to obtain or enter: In member mode, select from email/sms or the notify_ objects in the Notification Target List; omit in status mode.
alertOpt.alertTarget[*].targets[*].upgradeTargets[*].toWay[*] string A single escalation notification method.
Example: email
How to obtain or enter: Select an actually available email/sms or Notification Target UUID.
alertOpt.alertTarget[*].alertInfo array Array of member groups used only in member mode; not used in status mode.
Example: [{"name": "生产负责人", "memberInfo": ["acnt_example"], "filterString": "env:production", "targets": [{"status": "critical", "to": ["email"]}]}]
How to obtain or enter: For accounts, obtain content.data[].uuid from Workspace Members; for teams, obtain the group_ UUID from the member's member_group or Team Management; for Notification Targets, obtain the UUID from the Notification Target List. Use actual resources in the current Workspace for all of these.
alertOpt.alertTarget[*].alertInfo[*] json Member group object.
Example: {"name": "生产负责人", "memberInfo": ["acnt_example"], "targets": [{"status": "critical", "to": ["email"]}]}
How to obtain or enter: For each group, specify the member scope, event conditions, and notification methods.
alertOpt.alertTarget[*].alertInfo[*].name string Optional member group name, up to 256 characters.
Example: 生产负责人
How to obtain or enter: Name it according to the business purpose of the member group.
alertOpt.alertTarget[*].alertInfo[*].memberInfo array Array of recipient members/teams for regular notifications in member mode; may include agent accounts; combined with notification methods in targets.to.
Example: ["acnt_example"]
How to obtain or enter: For accounts, obtain content.data[].uuid from Workspace Members; for teams, obtain the group_ UUID from the member's member_group or Team Management; for Notification Targets, obtain the UUID from the Notification Target List. Use actual resources in the current Workspace for all of these.
alertOpt.alertTarget[*].alertInfo[*].memberInfo[*] string A single member or team identifier.
Example: acnt_example
How to obtain or enter: For accounts, obtain content.data[].uuid from Workspace Members; for teams, obtain the group_ UUID from the member's member_group or Team Management; for Notification Targets, obtain the UUID from the Notification Target List. Use actual resources in the current Workspace for all of these.
alertOpt.alertTarget[*].alertInfo[*].filterString string Member group-level event filter; used by both regular and escalation actions.
Example: env:production
How to obtain or enter: Build it from actual event fields, for example env:production.
alertOpt.alertTarget[*].alertInfo[*].targets array Array of notification methods/severity actions in member mode.
Example: [{"status": "critical", "to": ["email"]}]
How to obtain or enter: For accounts, obtain content.data[].uuid from Workspace Members; for teams, obtain the group_ UUID from the member's member_group or Team Management; for Notification Targets, obtain the UUID from the Notification Target List. Use actual resources in the current Workspace for all of these.
alertOpt.alertTarget[*].alertInfo[*].targets[*] json A single severity action.
Example: {"status": "critical", "to": ["email"]}
How to obtain or enter: Set one action for each event source and severity.
alertOpt.alertTarget[*].alertInfo[*].targets[*].status string Required severity selection: fatal, critical, error, warning, nodata, info; use uppercase ALL for all. Separate multiple values with English commas without spaces. For the security source, use critical, high, medium, low, info, or ALL instead.
Example: critical
How to obtain or enter: Use df_status from the actual event; for security events, also set df_source=security.
alertOpt.alertTarget[*].alertInfo[*].targets[*].df_source string Optional; the public target structure only supports security. When omitted, the execution layer excludes the security source.
Example: security
How to obtain or enter: Set security only for security monitoring events; omit for ordinary events.
alertOpt.alertTarget[*].alertInfo[*].targets[*].to array In member mode, email, sms, or a notify_ Notification Target is commonly used to indicate the notification method; the execution layer also supports targets such as direct accounts/teams, but using memberInfo together with notification methods is recommended.
Example: ["email"]
How to obtain or enter: For accounts, obtain content.data[].uuid from Workspace Members; for teams, obtain the group_ UUID from the member's member_group or Team Management; for Notification Targets, obtain the UUID from the Notification Target List. Use actual resources in the current Workspace for all of these.
alertOpt.alertTarget[*].alertInfo[*].targets[*].to[*] string In member mode, email/sms/notify_ are commonly used; in status mode, use acnt_/agent_/group_/notify_ or email. Availability of channels such as SMS depends on the site and target configuration.
Example: email
How to obtain or enter: For accounts, obtain content.data[].uuid from Workspace Members; for teams, obtain the group_ UUID from the member's member_group or Team Management; for Notification Targets, obtain the UUID from the Notification Target List. Use actual resources in the current Workspace for all of these.
alertOpt.alertTarget[*].alertInfo[*].targets[*].tags json In status mode, filter events by field value; in member mode, use the parent alertInfo.filterString; tags here are not used as member selection conditions.
Example: {"env": ["production"]}
How to obtain or enter: Build a dictionary from the event's original fields and values.
alertOpt.alertTarget[*].alertInfo[*].targets[*].tags.字段 array Array of matching values for a single field.
Example: ["production"]
How to obtain or enter: Use an actual event field as the key, such as env; use an array of actual field values to match as the value.
alertOpt.alertTarget[*].alertInfo[*].targets[*].tags.字段[*] string A single matching value.
Example: production
How to obtain or enter: Obtain the value from the same field in the event.
alertOpt.alertTarget[*].alertInfo[*].targets[*].filterString string In status mode, when non-empty, takes precedence over tags and is used for escalation actions; in member mode, use the parent alertInfo.filterString; fields within this target are not valid filtering entry points.
Example: env:production
How to obtain or enter: Use the server-side FilterString syntax, for example env:production; generate complex conditions in the console and copy them.
alertOpt.alertTarget[*].alertInfo[*].targets[*].upgradeTargets array Optional escalation actions; executed after an event remains at the corresponding severity for duration; [] means no escalation is configured.
Example: [{"to": ["acnt_example"], "duration": 600, "toWay": ["email"]}]
How to obtain or enter: For accounts, obtain content.data[].uuid from Workspace Members; for teams, obtain the group_ UUID from the member's member_group or Team Management; for Notification Targets, obtain the UUID from the Notification Target List. Use actual resources in the current Workspace for all of these.
alertOpt.alertTarget[*].alertInfo[*].targets[*].upgradeTargets[*] json A single escalation action.
Example: {"to": ["acnt_example"], "duration": 600, "toWay": ["email"]}
How to obtain or enter: Select the recipient target and wait time in seconds for each escalation.
alertOpt.alertTarget[*].alertInfo[*].targets[*].upgradeTargets[*].to array In member mode, these are the recipient members/teams for escalation; in status mode, these are the escalation notification targets, which can be members/teams/Notification Targets/email addresses.
Example: ["acnt_example"]
How to obtain or enter: For accounts, obtain content.data[].uuid from Workspace Members; for teams, obtain the group_ UUID from the member's member_group or Team Management; for Notification Targets, obtain the UUID from the Notification Target List. Use actual resources in the current Workspace for all of these.
alertOpt.alertTarget[*].alertInfo[*].targets[*].upgradeTargets[*].to[*] string A single escalation recipient identifier.
Example: acnt_example
How to obtain or enter: For accounts, obtain content.data[].uuid from Workspace Members; for teams, obtain the group_ UUID from the member's member_group or Team Management; for Notification Targets, obtain the UUID from the Notification Target List. Use actual resources in the current Workspace for all of these.
alertOpt.alertTarget[*].alertInfo[*].targets[*].upgradeTargets[*].duration integer Required duration in seconds; each escalation is configured relative to the event remaining in the corresponding severity, and multiple duration values are not automatically accumulated.
Example: 600
How to obtain or enter: Enter a positive integer number of seconds based on business requirements; for example, 600 means the severity persists for 10 minutes.
alertOpt.alertTarget[*].alertInfo[*].targets[*].upgradeTargets[*].toWay array Array of notification methods for member escalation; not used in status mode.
Example: ["email"]
How to obtain or enter: In member mode, select from email/sms or the notify_ objects in the Notification Target List; omit in status mode.
alertOpt.alertTarget[*].alertInfo[*].targets[*].upgradeTargets[*].toWay[*] string A single escalation notification method.
Example: email
How to obtain or enter: Select an actually available email/sms or Notification Target UUID.
name string Optional new name; if omitted, it is preserved; submitting the existing name is recommended to trigger deep parameter validation.
Allows null: False
Example: 生产服务告警
How to obtain or enter: Check existing names in this Workspace from the Alert Policy List and choose an unused name.
desc string Optional description, up to 256 characters. If omitted on creation, it is an empty string; if omitted on modification, it is preserved; an empty string clears it.
Allows null: False
Empty string allowed: True
Maximum length: 256
Example: 生产服务异常通知与升级。
How to obtain or enter: Fill in according to the business scope for which the policy is responsible.
openPermissionSet boolean Optional custom operation permission switch; defaults to false on creation; if omitted on modification, it is preserved. When enabled, the creator, owner, and identities that meet advanced operation permissions or permissionSet can operate.
Allows null: False
Example: false
How to obtain or enter: Enable when editing and other operations need to be restricted to specific roles, teams, or members; disable for normal API permission control.
permissionSet array Complete array of custom operation principals; can contain roles, accounts, and team identifiers; omitted on creation as [], replaced as a whole when passed on modification, and cleared with []. The creator and owner are not locked out by an empty array.
Allows null: False
Example: ["wsAdmin"]
How to obtain or enter: Obtain role UUIDs from Workspace Roles and account/team UUIDs from Workspace Members; do not enter role display names.
ruleTimezone str Y Timezone string required for both creation and modification; saved to the policy entity; the current public version has a discrepancy in where execution reads it.
Allows null: False
Example: Asia/Shanghai
How to obtain or enter: Choose an IANA timezone according to business expectations, for example Asia/Shanghai; see the usage notes for current execution-side limitations.
alertOpt json Alert notification configuration object; omitting it on creation can save an empty configuration; when passed on modification, it replaces the entire configuration. When an object is provided, aggInterval is a required validation field.
Allows null: False
Example: {"alertType": "status", "aggInterval": 0, "silentTimeout": 900, "alertTarget": []}
How to obtain or enter: Fill in according to the target structure below. Before modifying, copy the complete object from the details and then adjust it.
alertOpt.alertType string status by severity, member by member; if omitted, defaults to status. The two modes have different targets hierarchies and cannot be mixed.
Allows null: False
Optional values: ['status', 'member']
Example: status
How to obtain or enter: Choose one of two options: select recipients by severity, or select notification methods by member.
alertOpt.silentTimeout integer Unified alert repeat interval; if omitted, execution defaults to 900 seconds; 0 means no further periodic repetition in the current round. If non-zero and less than 300, execution uses 300 seconds; do not pass null.
Allows null: False
Example: 900
How to obtain or enter: Enter the expected minimum repeat sending interval in seconds for the same type of alert.
alertOpt.silentTimeoutByStatusEnable boolean When omitted on creation, false uses silentTimeout; when true, expands status-specific intervals according to silentTimeoutByStatus.
Allows null: False
Example: false
How to obtain or enter: Set to true when different repeat intervals need to be set for different event severities.
alertOpt.silentTimeoutByStatus array Array of level-specific repeat intervals; when enabled, it should cover the severities that need to be controlled. This level-specific configuration does not go through the 300-second normalization of the unified silentTimeout.
Allows null: False
Example: [{"status": "critical,error", "silentTimeout": 600}]
How to obtain or enter: Set separately by actual event source and severity using the level-specific array structure below.
alertOpt.alertTarget array Notification rule array. In status mode, put severity actions in targets; in member mode, organize members and notification methods in alertInfo.
Allows null: False
Example: [{"name": "默认通知", "targets": [{"status": "critical", "to": ["notify_example"]}]}]
How to obtain or enter: Configure the array according to business time and recipient rules; use [] when there are no actions.
alertOpt.aggInterval integer Conditionally Required Required when alertOpt is provided; 0 to 1800 seconds. 0 means no aggregation; even if byAI is selected, it does not mean valid AI aggregation is enabled.
Allows null: False
$minValue: 0
$maxValue: 1800
Example: 0
How to obtain or enter: When aggregation is needed, enter the number of seconds to wait; enter 0 for no aggregation.
alertOpt.aggFields array Field list. Predefined values are df_monitor_checker_id, df_dimension_tags, df_label, and CLUSTER; byCustom mode can use business custom fields; for v2 aggregation modes, see aggType.
Allows null: False
Example: ["df_monitor_checker_id"]
How to obtain or enter: Select the following fields according to which events you want grouped together; [] means aggregate all.
alertOpt.aggLabels array Array of tag values for aggregation by tag; when df_label is selected, a non-empty array must be provided.
Allows null: False
Example: ["production"]
How to obtain or enter: Obtain actual tag values from event tags; only used when aggFields contains df_label.
alertOpt.aggClusterFields array Text fields for intelligent aggregation; when CLUSTER is included, at least df_title or df_message must be selected.
Allows null: False
Example: ["df_title"]
How to obtain or enter: Select the title or content field when CLUSTER aggregation is needed.

Additional Parameter Notes

In status mode, configure alertTarget[].targets; in member mode, configure alertTarget[].alertInfo[].memberInfo and targets. For escalations, use to for recipients and toWay for notification methods. For recurring windows, fill in crontab+crontabDuration; for specified-date windows, fill in customDateUUIDs+customStartTime+customDuration. Do not use crontabDuration as customDuration.

Example member mode request body structure (submit to the URL on this page; example accounts and teams must be replaced):

{
  "name": "生产服务告警",
  "ruleTimezone": "Asia/Shanghai",
  "alertOpt": {
    "alertType": "member",
    "aggInterval": 0,
    "silentTimeout": 900,
    "alertTarget": [
      {
        "name": "默认成员通知",
        "alertInfo": [
          {
            "name": "生产负责人",
            "memberInfo": [
              "acnt_example"
            ],
            "filterString": "env:production",
            "targets": [
              {
                "status": "critical",
                "to": [
                  "email"
                ],
                "upgradeTargets": [
                  {
                    "to": [
                      "group_example"
                    ],
                    "duration": 600,
                    "toWay": [
                      "email"
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/alert_policy/altpl_example/modify' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":"生产服务告警","ruleTimezone":"Asia/Shanghai","alertOpt":{"alertType":"status","aggInterval":0,"silentTimeout":900,"alertTarget":[{"name":"默认通知","targets":[{"status":"critical","to":["notify_example"]}]}]}}'

Response

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

Field Type Description
content.id integer or null Policy record ID; may not yet be assigned in a creation response. Operations use uuid.
content.uuid string altpl_ Alert Policy UUID.
content.workspaceUUID string UUID of the Workspace it belongs to.
content.name string Policy name.
content.desc string Policy description.
content.ruleTimezone string Timezone of the saved entity; see Usage for the execution read discrepancy; this is not proof that the timezone has taken effect.
content.score integer Policy score field; defaults to 0 on creation; this public request does not provide this field.
content.openPermissionSet boolean Custom operation permission switch.
content.permissionSet array<string> Operable role/member/team identifiers.
content.permissionSet[] string A single principal identifier.
content.status integer Record status: 0 active, 2 disabled, 3 deleted; the list includes policies that have not been deleted.
content.creator string Creation identity.
content.updator string Identity of the most recent update.
content.createAt integer Creation time, Unix seconds.
content.updateAt integer Update time, Unix seconds; initial value -1.
content.deleteAt integer Deletion time, Unix seconds; -1 if not deleted.
content.alertOpt object Saved configuration: alert notification configuration object; omitting it on creation can save an empty configuration; when passed on modification, it replaces the entire configuration. When an object is provided, aggInterval is a required validation field.
content.alertOpt.alertType string Saved configuration: status by severity, member by member; if omitted, defaults to status. The two modes have different targets hierarchies and cannot be mixed.
content.alertOpt.silentTimeout integer Saved configuration: unified alert repeat interval; if omitted, execution defaults to 900 seconds; 0 means no further periodic repetition in the current round. If non-zero and less than 300, execution uses 300 seconds; do not pass null.
content.alertOpt.silentTimeoutByStatusEnable boolean Saved configuration: when omitted on creation, false uses silentTimeout; when true, expands status-specific intervals according to silentTimeoutByStatus.
content.alertOpt.silentTimeoutByStatus array<object> Saved configuration: array of level-specific repeat intervals; when enabled, it should cover the severities that need to be controlled. This level-specific configuration does not go through the 300-second normalization of the unified silentTimeout.
content.alertOpt.silentTimeoutByStatus[] object Saved configuration: level-specific interval object.
content.alertOpt.silentTimeoutByStatus[].status string Saved configuration: for non-security, use fatal/critical/error/warning/nodata/info/ALL; for security, use security_critical/security_high/security_medium/security_low/security_info/security_ALL. Separate multiple values with English commas without spaces.
content.alertOpt.silentTimeoutByStatus[].silentTimeout integer Saved configuration: required repeat interval for each group, in seconds. Invalid severities may trigger internal errors; validate before sending.
content.alertOpt.aggInterval integer Saved configuration: required when alertOpt is provided; 0 to 1800 seconds. 0 means no aggregation; even if byAI is selected, it does not mean valid AI aggregation is enabled.
content.alertOpt.aggFields array<string> Saved configuration: field list. Predefined values are df_monitor_checker_id, df_dimension_tags, df_label, and CLUSTER; byCustom mode can use business custom fields; for v2 aggregation modes, see aggType.
content.alertOpt.aggFields[] string Saved configuration: a single aggregation field. For byCustom, select based on actual event fields; do not guess fields from display names alone.
content.alertOpt.aggLabels array<string> Saved configuration: array of tag values for aggregation by tag; when df_label is selected, a non-empty array must be provided.
content.alertOpt.aggLabels[] string Saved configuration: a single tag value.
content.alertOpt.aggClusterFields array<string> Saved configuration: text fields for intelligent aggregation; when CLUSTER is included, at least df_title or df_message must be selected.
content.alertOpt.aggClusterFields[] string Saved configuration: a single text field.
content.alertOpt.alertTarget array<object> Saved configuration: notification rule array. In status mode, put severity actions in targets; in member mode, organize members and notification methods in alertInfo.
content.alertOpt.alertTarget[] object Saved configuration: rule object. When a fallback is needed, explicitly add a rule without a time configuration; do not assume the system fills one in automatically.
content.alertOpt.alertTarget[].name string Saved configuration: optional rule name, up to 256 characters.
content.alertOpt.alertTarget[].crontab string Saved configuration: recurring start time expression; must be paired with crontabDuration. Choose either this or the custom date option.
content.alertOpt.alertTarget[].crontabDuration integer Saved configuration: duration of the recurring window in seconds; required when crontab is provided; if no recurring period is configured, omit both.
content.alertOpt.alertTarget[].customDateUUIDs array<string> Saved configuration: reference to a custom date set, up to 366 items; provide together with customStartTime and customDuration; do not substitute crontabDuration.
content.alertOpt.alertTarget[].customDateUUIDs[] string Saved configuration: a single date configuration UUID.
content.alertOpt.alertTarget[].customStartTime string Saved configuration: start time on the custom date; used together with customDateUUIDs/customDuration.
content.alertOpt.alertTarget[].customDuration integer Saved configuration: duration of the custom date window in seconds; must be provided together with the date set and start time.
content.alertOpt.alertTarget[].targets array<object> Saved configuration: array of severity-mode actions.
content.alertOpt.alertTarget[].targets[] object Saved configuration: a single severity action.
content.alertOpt.alertTarget[].targets[].status string Saved configuration: required severity selection: fatal, critical, error, warning, nodata, info; use uppercase ALL for all. Separate multiple values with English commas without spaces. For the security source, use critical, high, medium, low, info, or ALL instead.
content.alertOpt.alertTarget[].targets[].df_source string Saved configuration: optional; the public target structure only supports security. When omitted, the execution layer excludes the security source.
content.alertOpt.alertTarget[].targets[].to array<string> Saved configuration: required array of recipient targets; can include members, teams, Notification Targets, or email addresses; an agent account can use its valid default Webhook.
content.alertOpt.alertTarget[].targets[].to[] string Saved configuration: in member mode, email/sms/notify_ are commonly used; in status mode, use acnt_/agent_/group_/notify_ or email. Availability of channels such as SMS depends on the site and target configuration.
content.alertOpt.alertTarget[].targets[].tags object Saved configuration: in status mode, filter events by field value; in member mode, use the parent alertInfo.filterString; tags here are not used as member selection conditions.
content.alertOpt.alertTarget[].targets[].tags.字段 array<string> Saved configuration: array of matching values for a single field.
content.alertOpt.alertTarget[].targets[].tags.字段[] string Saved configuration: a single matching value.
content.alertOpt.alertTarget[].targets[].filterString string Saved configuration: in status mode, when non-empty, takes precedence over tags and is used for escalation actions; in member mode, use the parent alertInfo.filterString; fields within this target are not valid filtering entry points.
content.alertOpt.alertTarget[].targets[].upgradeTargets array<object> Saved configuration: optional escalation actions; executed after an event remains at the corresponding severity for duration; [] means no escalation is configured.
content.alertOpt.alertTarget[].targets[].upgradeTargets[] object Saved configuration: a single escalation action.
content.alertOpt.alertTarget[].targets[].upgradeTargets[].to array<string> Saved configuration: in member mode, these are the recipient members/teams for escalation; in status mode, these are the escalation notification targets, which can be members/teams/Notification Targets/email addresses.
content.alertOpt.alertTarget[].targets[].upgradeTargets[].to[] string Saved configuration: a single escalation recipient identifier.
content.alertOpt.alertTarget[].targets[].upgradeTargets[].duration integer Saved configuration: required duration in seconds; each escalation is configured relative to the event remaining in the corresponding severity, and multiple duration values are not automatically accumulated.
content.alertOpt.alertTarget[].targets[].upgradeTargets[].toWay array<string> Saved configuration: array of notification methods for member escalation; not used in status mode.
content.alertOpt.alertTarget[].targets[].upgradeTargets[].toWay[] string Saved configuration: a single escalation notification method.
content.alertOpt.alertTarget[].alertInfo array<object> Saved configuration: array of member groups used only in member mode; not used in status mode.
content.alertOpt.alertTarget[].alertInfo[] object Saved configuration: member group object.
content.alertOpt.alertTarget[].alertInfo[].name string Saved configuration: optional member group name, up to 256 characters.
content.alertOpt.alertTarget[].alertInfo[].memberInfo array<string> Saved configuration: array of recipient members/teams for regular notifications in member mode; may include agent accounts; combined with notification methods in targets.to.
content.alertOpt.alertTarget[].alertInfo[].memberInfo[] string Saved configuration: a single member or team identifier.
content.alertOpt.alertTarget[].alertInfo[].filterString string Saved configuration: member group-level event filter; used by both regular and escalation actions.
content.alertOpt.alertTarget[].alertInfo[].targets array<object> Saved configuration: array of notification methods/severity actions in member mode.
content.alertOpt.alertTarget[].alertInfo[].targets[] object Saved configuration: a single severity action.
content.alertOpt.alertTarget[].alertInfo[].targets[].status string Saved configuration: required severity selection: fatal, critical, error, warning, nodata, info; use uppercase ALL for all. Separate multiple values with English commas without spaces. For the security source, use critical, high, medium, low, info, or ALL instead.
content.alertOpt.alertTarget[].alertInfo[].targets[].df_source string Saved configuration: optional; the public target structure only supports security. When omitted, the execution layer excludes the security source.
content.alertOpt.alertTarget[].alertInfo[].targets[].to array<string> Saved configuration: in member mode, email, sms, or a notify_ Notification Target is commonly used to indicate the notification method; the execution layer also supports targets such as direct accounts/teams, but using memberInfo together with notification methods is recommended.
content.alertOpt.alertTarget[].alertInfo[].targets[].to[] string Saved configuration: in member mode, email/sms/notify_ are commonly used; in status mode, use acnt_/agent_/group_/notify_ or email. Availability of channels such as SMS depends on the site and target configuration.
content.alertOpt.alertTarget[].alertInfo[].targets[].tags object Saved configuration: in status mode, filter events by field value; in member mode, use the parent alertInfo.filterString; tags here are not used as member selection conditions.
content.alertOpt.alertTarget[].alertInfo[].targets[].tags.字段 array<string> Saved configuration: array of matching values for a single field.
content.alertOpt.alertTarget[].alertInfo[].targets[].tags.字段[] string Saved configuration: a single matching value.
content.alertOpt.alertTarget[].alertInfo[].targets[].filterString string Saved configuration: in status mode, when non-empty, takes precedence over tags and is used for escalation actions; in member mode, use the parent alertInfo.filterString; fields within this target are not valid filtering entry points.
content.alertOpt.alertTarget[].alertInfo[].targets[].upgradeTargets array<object> Saved configuration: optional escalation actions; executed after an event remains at the corresponding severity for duration; [] means no escalation is configured.
content.alertOpt.alertTarget[].alertInfo[].targets[].upgradeTargets[] object Saved configuration: a single escalation action.
content.alertOpt.alertTarget[].alertInfo[].targets[].upgradeTargets[].to array<string> Saved configuration: in member mode, these are the recipient members/teams for escalation; in status mode, these are the escalation notification targets, which can be members/teams/Notification Targets/email addresses.
content.alertOpt.alertTarget[].alertInfo[].targets[].upgradeTargets[].to[] string Saved configuration: a single escalation recipient identifier.
content.alertOpt.alertTarget[].alertInfo[].targets[].upgradeTargets[].duration integer Saved configuration: required duration in seconds; each escalation is configured relative to the event remaining in the corresponding severity, and multiple duration values are not automatically accumulated.
content.alertOpt.alertTarget[].alertInfo[].targets[].upgradeTargets[].toWay array<string> Saved configuration: array of notification methods for member escalation; not used in status mode.
content.alertOpt.alertTarget[].alertInfo[].targets[].upgradeTargets[].toWay[] string Saved configuration: a single escalation notification method.
content.alertOpt.aggType string Saved configuration: optional v2 mode: byFields for rule aggregation, byCluster for intelligent aggregation, byAI for AI aggregation, and byCustom for custom-field rule aggregation. If omitted or null, legacy aggFields logic applies; aggregation still requires aggInterval>0.
content.alertOpt.ignoreOK boolean Saved configuration: optional in v2; ignores normal-severity notifications; defaults to false.
content.alertOpt.aggSendFirst boolean Saved configuration: optional in v2; whether the first item is sent immediately during aggregation; defaults to false; aggInterval=0 does not constitute valid aggregation.
content.declaration object or null Workspace public declaration; write APIs return only the saved entity and do not include query-specific additional fields.
{
  "code": 200,
  "content": {
    "id": 42,
    "uuid": "altpl_example",
    "workspaceUUID": "wksp_example",
    "name": "生产服务告警",
    "desc": "生产服务异常通知与升级。",
    "alertOpt": {
      "alertType": "status",
      "aggInterval": 0,
      "silentTimeout": 900,
      "alertTarget": [
        {
          "name": "默认通知",
          "targets": [
            {
              "status": "critical",
              "to": [
                "notify_example"
              ]
            }
          ]
        }
      ]
    },
    "ruleTimezone": "Asia/Shanghai",
    "score": 0,
    "openPermissionSet": false,
    "permissionSet": [],
    "status": 0,
    "creator": "wsak_example",
    "updator": "wsak_example",
    "createAt": 1785430800,
    "updateAt": 1785430860,
    "deleteAt": -1,
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Response

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

HTTP Status errorCode Trigger Condition Message or Response Description Resolution
406 ft.ParameterValidationFailed A request field is missing, or the field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError Invalid request JSON syntax 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 single JSON object.
400 ft.AlertPolicyNameRepeat An undeleted policy with the same name exists, or a short-term concurrent creation has occupied the name Alert Policy name already exists First check whether it has already been created; after a short wait, determine whether to retry with a different name.
400 ft.ParamsValidateError The status/member action structure or time field dependencies do not comply with the rules Parameter validation failed: {} Complete the required fields according to the corresponding mode on this page; custom dates require customDuration, and crontabDuration cannot be used as a substitute.
400 ft.InvalidEventStatus The event severity in status mode is not in the corresponding regular/security enum Invalid event status: {} Use uppercase ALL and the correct source enum from this page; do not include spaces between commas.
406 ft.InvalidCrontabFormat The recurring expression cannot be parsed Invalid crontab format Use a valid Cron expression and provide crontabDuration.
400 ft.ErrorFilterString filterString cannot be parsed filterString parsing failed: {} First generate a valid condition with the console filter or fix it according to the example.
400 ft.InvalidCustomNoticeDateUUID The referenced date configuration does not exist, has been deleted, or does not belong to the current Workspace Invalid custom date UUIDs: {} Obtain a valid UUID again through Custom Notification Dates.
400 ft.InvalidAggFields An aggregation field that does not meet validation is provided in a mode other than byCustom Invalid aggregation type Select from the predefined fields, or explicitly select byCustom in v2 and use actual business fields.
400 ft.TagFieldMissing df_label aggregation is selected but no non-empty aggLabels is provided Missing tag Provide an array of actual tag values.
400 ft.InvalidAggClusterFields CLUSTER is selected but no title or content aggregation field is provided Invalid aggregation field aggClusterFields must contain at least df_title or df_message.
400 ft.UnsupportExternalEmail A restricted Workspace version uses an external email in a status target Free Plan Workspace; external emails are not supported as Notification Targets Select a member of the current Workspace or check the plan and channel support.
500 ft.InternalServerError A level-specific repeat alert status value directly triggers an exception, or saving/caching/other internal processing fails Internal error First self-check against the enums and complete structure on this page, query the saved status, and then decide whether to retry; if the failure persists, provide the traceId.
404 ft.NotFound The policy does not exist, has been deleted, or does not belong to the current Workspace Business route not found Obtain a valid UUID again from the Alert Policy List.
403 ft.ForbiddenAlertPolicyOperation The current identity does not pass the policy's custom operation permission check You do not have permission to operate Alert Policy [{}] Operate as the creator, owner, or an authorized principal; first verify permissionSet.
403 ft.Forbidden When custom permissions are not enabled, the current identity does not have API operation permissions You do not have permission to perform this operation Use an API Key with operation permissions.

Feedback

Is this page helpful?