List¶
GET /api/v1/alert_policy/list
Overview¶
List undeleted alert policies in the current workspace with pagination, along with binding counts and operation permissions for the current identity.
Before Calling and Usage Steps¶
By default, pageIndex=1 and pageSize=20. Results are sorted by update time in descending order; records that have not been updated are compared by creation time. Both enabled and disabled policies are included. Read content.data and the top-level pageInfo. Notification target filtering uses a UUID string joined by English commas; if any one of multiple objects matches, the record is included. Currently, matching is based on configured text and cannot independently prove an exact structural association or that the target is valid; verify details as needed. The returned silentTimeout is normalized for display compatibility: a non-zero integer less than 300 is shown as 300, and a non-integer historical value is shown as 900. In the current version, the top-level ruleTimezone is saved and displayed, but the execution cache reads the historical alertOpt.ruleTimezone, which defaults to Asia/Shanghai. Other time zones cannot be considered effective merely because they were saved successfully; integrators must verify against the actual execution time zone. Do not bypass public parameters through additional undeclared fields.
Request Headers¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Yes | OpenAPI authentication credential for the workspace. Example: <DF-API-KEY>How to obtain or fill: Obtain an OpenAPI Key with this operation permission from API Key Management in the target workspace. |
Query Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| search | string | Optional fuzzy name search. Null allowed: True Example: 生产How to obtain or fill: Enter text contained in the alert policy name; omit or leave blank to not filter by name. |
|
| notifyObjectUUIDs | commaArray | Optional notification target filter; multiple targets match if any one matches; pass actual UUID strings, not regular expressions or JSON arrays. Special regular expression characters may cause internal errors. Null allowed: False Example: notify_exampleHow to obtain or fill: Copy one or more UUIDs from the Notification Target List, and join multiple items with English commas, for example notify_a,notify_b. |
|
| pageIndex | integer | Page number, default 1, minimum 1. Null allowed: False $minValue: 1 Example: 1How to obtain or fill: Use 1 for the first page, then increment page by page. |
|
| pageSize | integer | Number of items per page, default 20. Null allowed: False $minValue: 1 $maxValue: 100 Example: 20How to obtain or fill: Enter an integer from 1 to 100 as needed. |
Additional Parameter Notes¶
For complete fields for configuring notification actions, see Create Alert Policy v2. This API does not declare internal filter fields such as checkerUUIDs, accountUUIDs, or refFilter.
Request Example¶
curl --get 'https://openapi.guance.com/api/v1/alert_policy/list' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-urlencode pageIndex=1 \
--data-urlencode pageSize=20
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content.data | array<object> |
Policies on the current page; [] if there are no results. |
| content.data[].id | integer or null | Policy record number; it may not yet be assigned in the creation response. Use uuid for operations. |
| content.data[].uuid | string | altpl_ alert policy UUID. |
| content.data[].workspaceUUID | string | UUID of the workspace to which the policy belongs. |
| content.data[].name | string | Policy name. |
| content.data[].desc | string | Policy description. |
| content.data[].ruleTimezone | string | Saved entity time zone; for differences in execution reads, see Usage; this is not proof that the time zone is effective. |
| content.data[].score | integer | Policy score field; defaults to 0 on creation; this public request does not provide this field. |
| content.data[].openPermissionSet | boolean | Custom operation permission switch. |
| content.data[].permissionSet | array<string> |
Identifiers of roles/members/teams that can operate. |
| content.data[].permissionSet[] | string | Single principal identifier. |
| content.data[].status | integer | Record status: 0 active, 2 disabled, 3 deleted; the list includes undeleted policies. |
| content.data[].creator | string | Creator identity. |
| content.data[].updator | string | Last updater identity. |
| content.data[].createAt | integer | Creation time, Unix seconds. |
| content.data[].updateAt | integer | Update time, Unix seconds; initial value -1. |
| content.data[].deleteAt | integer | Deletion time, Unix seconds; -1 if not deleted. |
| content.data[].alertOpt | object | Saved configuration: alert notification configuration object; omitting it on creation saves an empty configuration; passing it on modification replaces the entire object. When the object is provided, aggInterval is a required validation field. |
| content.data[].alertOpt.alertType | string | Saved configuration: status by level, member by member; defaults to status when omitted. The targets hierarchy differs between the two modes and cannot be mixed. |
| content.data[].alertOpt.silentTimeout | integer | Saved configuration: unified repeated alert interval; when omitted, execution defaults to 900 seconds; 0 means no periodic repetition in this round. When non-zero and less than 300, execution uses 300 seconds; do not pass null. |
| content.data[].alertOpt.silentTimeoutByStatusEnable | boolean | Saved configuration: when the creation default is false, silentTimeout is used; when true, expand level-specific intervals by silentTimeoutByStatus. |
| content.data[].alertOpt.silentTimeoutByStatus | array<object> |
Saved configuration: array of level-specific repeat intervals; when enabled, it should cover the levels that need to be controlled. This level-specific configuration does not undergo the 300-second normalization of the unified silentTimeout. |
| content.data[].alertOpt.silentTimeoutByStatus[] | object | Saved configuration: level-specific interval object. |
| content.data[].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. Join multiple values with English commas without spaces. |
| content.data[].alertOpt.silentTimeoutByStatus[].silentTimeout | integer | Saved configuration: required repeat interval for each group, in seconds. Invalid levels may trigger internal errors; validate before sending. |
| content.data[].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 indicate that effective AI aggregation is enabled. |
| content.data[].alertOpt.aggFields | array<string> |
Saved configuration: field list. Predefined available fields are df_monitor_checker_id, df_dimension_tags, df_label, and CLUSTER; byCustom mode can use custom business fields; for v2 aggregation modes, see aggType. |
| content.data[].alertOpt.aggFields[] | string | Saved configuration: single aggregation field. In byCustom, select based on actual event fields; do not guess fields only from display names. |
| content.data[].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.data[].alertOpt.aggLabels[] | string | Saved configuration: single tag value. |
| content.data[].alertOpt.aggClusterFields | array<string> |
Saved configuration: text fields for smart aggregation; when CLUSTER is included, at least df_title or df_message must be selected. |
| content.data[].alertOpt.aggClusterFields[] | string | Saved configuration: single text field. |
| content.data[].alertOpt.alertTarget | array<object> |
Saved configuration: array of notification rules. In status mode, place level actions in targets; in member mode, organize members and notification methods in alertInfo. |
| content.data[].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 automatically fills one in. |
| content.data[].alertOpt.alertTarget[].name | string | Saved configuration: optional rule name, up to 256 characters. |
| content.data[].alertOpt.alertTarget[].crontab | string | Saved configuration: cycle start time expression; must be paired with crontabDuration. Choose either this or the custom date approach. |
| content.data[].alertOpt.alertTarget[].crontabDuration | integer | Saved configuration: duration of the cycle window in seconds; must be provided when crontab is provided; if no recurring period is configured, omit both. |
| content.data[].alertOpt.alertTarget[].customDateUUIDs | array<string> |
Saved configuration: reference to a custom date set, up to 366 items; provide it together with customStartTime and customDuration; do not substitute crontabDuration. |
| content.data[].alertOpt.alertTarget[].customDateUUIDs[] | string | Saved configuration: single date configuration UUID. |
| content.data[].alertOpt.alertTarget[].customStartTime | string | Saved configuration: start time on the custom date; used together with customDateUUIDs/customDuration. |
| content.data[].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.data[].alertOpt.alertTarget[].targets | array<object> |
Saved configuration: array of level-mode actions. |
| content.data[].alertOpt.alertTarget[].targets[] | object | Saved configuration: single level action. |
| content.data[].alertOpt.alertTarget[].targets[].status | string | Saved configuration: required level selection: fatal, critical, error, warning, nodata, info; use uppercase ALL for all; join multiple values with English commas without spaces. For the security source, use critical, high, medium, low, info, or ALL instead. |
| content.data[].alertOpt.alertTarget[].targets[].df_source | string | Saved configuration: optional; the public target structure supports only security. When omitted, the execution layer excludes the security source. |
| content.data[].alertOpt.alertTarget[].targets[].to | array<string> |
Saved configuration: required array of receiving targets; can be members, teams, notification targets, or email addresses; an agent account can use its valid default Webhook. |
| content.data[].alertOpt.alertTarget[].targets[].to[] | string | Saved configuration: in member mode, commonly email/sms/notify_; in status mode, use acnt_/agent_/group_/notify_ or email. Whether channels such as SMS are available depends on the site and target configuration. |
| content.data[].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.data[].alertOpt.alertTarget[].targets[].tags.字段 | array<object> |
Saved configuration: array of match values for a single field. |
| content.data[].alertOpt.alertTarget[].targets[].tags.字段[] | string | Saved configuration: single match value. |
| content.data[].alertOpt.alertTarget[].targets[].filterString | string | Saved configuration: in status mode, when non-empty, it takes precedence over tags and is used for escalation actions; in member mode, use the parent alertInfo.filterString; fields within this target are not a valid filtering entry point. |
| content.data[].alertOpt.alertTarget[].targets[].upgradeTargets | array<object> |
Saved configuration: optional escalation action; executes after the event remains at the corresponding level for duration; [] means no escalation is configured. |
| content.data[].alertOpt.alertTarget[].targets[].upgradeTargets[] | object | Saved configuration: single escalation action. |
| content.data[].alertOpt.alertTarget[].targets[].upgradeTargets[].to | array<string> |
Saved configuration: in member mode, receiving members/teams for escalation; in status mode, escalation notification targets, which can be members/teams/notification targets/email addresses. |
| content.data[].alertOpt.alertTarget[].targets[].upgradeTargets[].to[] | string | Saved configuration: single escalation recipient identifier. |
| content.data[].alertOpt.alertTarget[].targets[].upgradeTargets[].duration | integer | Saved configuration: required duration in seconds; each escalation is configured relative to the event's continuous state, and multiple duration values are not automatically accumulated. |
| content.data[].alertOpt.alertTarget[].targets[].upgradeTargets[].toWay | array<string> |
Saved configuration: array of member escalation notification methods; status mode does not use this field. |
| content.data[].alertOpt.alertTarget[].targets[].upgradeTargets[].toWay[] | string | Saved configuration: single escalation notification method. |
| content.data[].alertOpt.alertTarget[].alertInfo | array<object> |
Saved configuration: member group array used only in member mode; status mode does not use it. |
| content.data[].alertOpt.alertTarget[].alertInfo[] | object | Saved configuration: member group object. |
| content.data[].alertOpt.alertTarget[].alertInfo[].name | string | Saved configuration: optional member group name, up to 256 characters. |
| content.data[].alertOpt.alertTarget[].alertInfo[].memberInfo | array<string> |
Saved configuration: array of receiving members/teams for regular notifications in member mode, which may include agent accounts; combined with notification methods in targets.to. |
| content.data[].alertOpt.alertTarget[].alertInfo[].memberInfo[] | string | Saved configuration: single member or team identifier. |
| content.data[].alertOpt.alertTarget[].alertInfo[].filterString | string | Saved configuration: member group-level event filtering; both regular and escalation actions use this condition. |
| content.data[].alertOpt.alertTarget[].alertInfo[].targets | array<object> |
Saved configuration: array of notification methods/level actions in member mode. |
| content.data[].alertOpt.alertTarget[].alertInfo[].targets[] | object | Saved configuration: single level action. |
| content.data[].alertOpt.alertTarget[].alertInfo[].targets[].status | string | Saved configuration: required level selection: fatal, critical, error, warning, nodata, info; use uppercase ALL for all; join multiple values with English commas without spaces. For the security source, use critical, high, medium, low, info, or ALL instead. |
| content.data[].alertOpt.alertTarget[].alertInfo[].targets[].df_source | string | Saved configuration: optional; the public target structure supports only security. When omitted, the execution layer excludes the security source. |
| content.data[].alertOpt.alertTarget[].alertInfo[].targets[].to | array<string> |
Saved configuration: in member mode, commonly email, sms, or notify_ notification targets, indicating the notification method; the execution layer is also compatible with targets such as direct accounts/teams; using memberInfo combined with notification methods is recommended. |
| content.data[].alertOpt.alertTarget[].alertInfo[].targets[].to[] | string | Saved configuration: in member mode, commonly email/sms/notify_; in status mode, use acnt_/agent_/group_/notify_ or email. Whether channels such as SMS are available depends on the site and target configuration. |
| content.data[].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.data[].alertOpt.alertTarget[].alertInfo[].targets[].tags.字段 | array<object> |
Saved configuration: array of match values for a single field. |
| content.data[].alertOpt.alertTarget[].alertInfo[].targets[].tags.字段[] | string | Saved configuration: single match value. |
| content.data[].alertOpt.alertTarget[].alertInfo[].targets[].filterString | string | Saved configuration: in status mode, when non-empty, it takes precedence over tags and is used for escalation actions; in member mode, use the parent alertInfo.filterString; fields within this target are not a valid filtering entry point. |
| content.data[].alertOpt.alertTarget[].alertInfo[].targets[].upgradeTargets | array<object> |
Saved configuration: optional escalation action; executes after the event remains at the corresponding level for duration; [] means no escalation is configured. |
| content.data[].alertOpt.alertTarget[].alertInfo[].targets[].upgradeTargets[] | object | Saved configuration: single escalation action. |
| content.data[].alertOpt.alertTarget[].alertInfo[].targets[].upgradeTargets[].to | array<string> |
Saved configuration: in member mode, receiving members/teams for escalation; in status mode, escalation notification targets, which can be members/teams/notification targets/email addresses. |
| content.data[].alertOpt.alertTarget[].alertInfo[].targets[].upgradeTargets[].to[] | string | Saved configuration: single escalation recipient identifier. |
| content.data[].alertOpt.alertTarget[].alertInfo[].targets[].upgradeTargets[].duration | integer | Saved configuration: required duration in seconds; each escalation is configured relative to the event's continuous state, and multiple duration values are not automatically accumulated. |
| content.data[].alertOpt.alertTarget[].alertInfo[].targets[].upgradeTargets[].toWay | array<string> |
Saved configuration: array of member escalation notification methods; status mode does not use this field. |
| content.data[].alertOpt.alertTarget[].alertInfo[].targets[].upgradeTargets[].toWay[] | string | Saved configuration: single escalation notification method. |
| content.data[].alertOpt.aggType | string | Saved configuration: v2 optional modes: byFields for rule aggregation, byCluster for smart aggregation, byAI for AI aggregation, and byCustom for custom-field rule aggregation. When omitted or null, the historical aggFields logic applies; aggregation still requires aggInterval > 0. |
| content.data[].alertOpt.ignoreOK | boolean | Saved configuration: v2 optional; ignores normal-level notifications; default false. |
| content.data[].alertOpt.aggSendFirst | boolean | Saved configuration: v2 optional; whether the first record is sent immediately during aggregation; default false; when aggInterval=0, it does not constitute effective aggregation. |
| content.data[].creatorInfo | object | Identity display information; {} when there is no match; the following fields are optional depending on the identity. |
| content.data[].creatorInfo.uuid | string | Account UUID; may be omitted. |
| content.data[].creatorInfo.status | integer | Account record status. |
| content.data[].creatorInfo.wsAccountStatus | integer | Workspace account status. |
| content.data[].creatorInfo.username | string | Login name. |
| content.data[].creatorInfo.name | string | Display name. |
| content.data[].creatorInfo.iconUrl | string | Avatar URL; may be omitted. |
| content.data[].creatorInfo.email | string | Email address or system identity display value. |
| content.data[].creatorInfo.mobile | string | Mobile number; may be empty. |
| content.data[].creatorInfo.countryCode | string | Country/region code; may be omitted. |
| content.data[].creatorInfo.acntWsNickname | string | Workspace nickname; may be omitted. |
| content.data[].updatorInfo | object | Identity display information; {} when there is no match; the following fields are optional depending on the identity. |
| content.data[].updatorInfo.uuid | string | Account UUID; may be omitted. |
| content.data[].updatorInfo.status | integer | Account record status. |
| content.data[].updatorInfo.wsAccountStatus | integer | Workspace account status. |
| content.data[].updatorInfo.username | string | Login name. |
| content.data[].updatorInfo.name | string | Display name. |
| content.data[].updatorInfo.iconUrl | string | Avatar URL; may be omitted. |
| content.data[].updatorInfo.email | string | Email address or system identity display value. |
| content.data[].updatorInfo.mobile | string | Mobile number; may be empty. |
| content.data[].updatorInfo.countryCode | string | Country/region code; may be omitted. |
| content.data[].updatorInfo.acntWsNickname | string | Workspace nickname; may be omitted. |
| content.data[].permissionSetInfo | object | Provided when permissionSet exists; a mapping of display profiles keyed by principal identifier; can be {} when no principal matches. |
| content.data[].permissionSetInfo.标识 | object | For an account, this is the account profile; for roles/teams, it is usually name and status. |
| content.data[].permissionSetInfo.标识.uuid | string | Account UUID; may be omitted. |
| content.data[].permissionSetInfo.标识.status | integer | Account record status. |
| content.data[].permissionSetInfo.标识.wsAccountStatus | integer | Workspace account status. |
| content.data[].permissionSetInfo.标识.username | string | Login name. |
| content.data[].permissionSetInfo.标识.name | string | Display name. |
| content.data[].permissionSetInfo.标识.iconUrl | string | Avatar URL; may be omitted. |
| content.data[].permissionSetInfo.标识.email | string | Email address or system identity display value. |
| content.data[].permissionSetInfo.标识.mobile | string | Mobile number; may be empty. |
| content.data[].permissionSetInfo.标识.countryCode | string | Country/region code; may be omitted. |
| content.data[].permissionSetInfo.标识.acntWsNickname | string | Workspace nickname; may be omitted. |
| content.data[].allow_operation | boolean or null | Custom operation permission determination; null indicates it is not enabled, and API permissions must still be used for determination; true/false is the custom determination for the current identity. |
| content.data[].ruleCount | integer | Total number of currently bound monitors/SLOs/security rules. |
| content.data[].refCountInfo | object | Counts grouped by association type; absent types may be omitted. |
| content.data[].refCountInfo.trigger | integer | Number of associations of this type. |
| content.data[].refCountInfo.self_built_trigger | integer | Number of associations of this type. |
| content.data[].refCountInfo.smartMonitor | integer | Number of associations of this type. |
| content.data[].refCountInfo.aiMonitor | integer | Number of associations of this type. |
| content.data[].refCountInfo.slo | integer | Number of associations of this type. |
| content.data[].refCountInfo.cspm | integer | Number of associations of this type. |
| content.data[].refCountInfo.siem | integer | Number of associations of this type. |
| content.data[].refCountInfo.aba | integer | Number of associations of this type. |
| content.data[].refCheckerInfo | object | Associated monitors/SLOs grouped by type; the fields differ from the flat arrays in details. |
| content.data[].refCheckerInfo.类型 | array<object> |
Array under types such as trigger/self_built_trigger/smartMonitor/aiMonitor/slo. |
| content.data[].refCheckerInfo.类型[].uuid | string | Monitor/SLO UUID. |
| content.data[].refCheckerInfo.类型[].name | string | Monitor/SLO name. |
| content.data[].refCheckerInfo.类型[].type | string | Type such as trigger/self_built_trigger/smartMonitor/aiMonitor/slo. |
| content.data[].refCheckerInfo.类型[].status | integer | Record enabled/disabled status. |
| content.data[].refCheckerInfo.类型[].jsonScript | object | Type summary when a monitor exists; may be omitted for SLOs. |
| content.data[].refCheckerInfo.类型[].jsonScript.type | string or null | Monitor detection type summary. |
| content.data[].refSecurityRuleInfo | object | Association information grouped by security rule type. |
| content.data[].refSecurityRuleInfo.类型 | array<object> |
Array of types such as cspm/siem/aba. |
| content.data[].refSecurityRuleInfo.类型[].uuid | string | Security rule UUID. |
| content.data[].refSecurityRuleInfo.类型[].name | string | Security rule name. |
| content.data[].refSecurityRuleInfo.类型[].type | string | Security rule type, such as cspm/siem/aba. |
| content.data[].refSecurityRuleInfo.类型[].status | integer | Rule status; the original relationship may contain deleted rules. |
| content.declaration | object or null | Workspace public declaration. |
| pageInfo | object | Top-level pagination. |
| pageInfo.pageIndex | integer | Page number. |
| pageInfo.pageSize | integer | Page size. |
| pageInfo.count | integer | Actual number of items on the current page. |
| pageInfo.totalCount | integer | Total number of matches. |
{
"code": 200,
"content": {
"data": [
{
"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": "",
"createAt": 1785430800,
"updateAt": -1,
"deleteAt": -1,
"ruleCount": 0,
"refCountInfo": {},
"refCheckerInfo": {},
"refSecurityRuleInfo": {},
"creatorInfo": {},
"updatorInfo": {},
"allow_operation": null
}
],
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE",
"pageInfo": {
"pageIndex": 1,
"pageSize": 20,
"count": 1,
"totalCount": 1
}
}
Error Response¶
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 | 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. |
| 500 | ft.InternalServerError | Failed to query policies, binding statistics, permissions, or account profiles | Internal error | Retry later; if it persists, provide the traceId. |