List¶
GET /api/v1/issue/notification_policy/list
Overview¶
Paginates through non-deleted Notification Policies in the current Workspace and returns their associated notification schedules, channels, and account profiles.
Before You Call and Usage Steps¶
The default values are pageIndex=1 and pageSize=10, sorted by last update time in descending order; policies that have not been updated are compared by creation time. The list includes both enabled and disabled policies, distinguished by status. The policy array is in content.data, and pagination information is in the top-level pageInfo. Save the returned uuid for use in details, update, or delete operations. A policy must be associated with the target channel in the console and with a valid notification schedule; actual recipients are determined by the schedule's time zone, time period of the day, validity period, rotation, and Notification Targets. Saving a policy does not immediately send a test notification.
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 permissions from API Key Management in the target Workspace. |
Query Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| search | string | Optional fuzzy search by name. The server trims leading and trailing whitespace. Do not pass null. Allows null: True Example: 生产How to obtain or enter: Enter part of the policy name; omit it or use an empty string to disable filtering. |
|
| pageIndex | integer | Page number, default 1, minimum 1. Allows null: False $minValue: 1 Example: 1How to obtain or enter: Increase page by page starting from 1, keeping the search conditions consistent. |
|
| pageSize | integer | Number of items per page, default 10. Allows null: False $minValue: 1 $maxValue: 100 Example: 10How to obtain or enter: Enter an integer from 1 to 100 as needed. |
Additional Parameter Notes¶
The returned associated schedule configuration is not the actual recipient list at the current moment; actual targets must also be calculated based on the schedule's validity period, time period, and rotation.
Request Example¶
curl --get 'https://openapi.guance.com/api/v1/issue/notification_policy/list' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-urlencode pageIndex=1 \
--data-urlencode pageSize=10
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 | Database ID of an existing configuration; use uuid to locate it in subsequent API calls. |
| content.data[].uuid | string | Notification Policy UUID, starting with inpy_. |
| content.data[].workspaceUUID | string | UUID of the Workspace to which the policy belongs. |
| content.data[].name | string | Policy name. |
| content.data[].status | integer | Record status: 0 enabled, 2 disabled, 3 deleted; the list includes enabled and disabled policies that have not been deleted. |
| content.data[].creator | string | Identity that created the record. |
| content.data[].updator | string | Identity of the most recent update; an empty string if not updated. |
| content.data[].createAt | integer | Creation time, in Unix seconds. |
| content.data[].updateAt | integer | Update time, in Unix seconds; -1 if not updated. |
| content.data[].deleteAt | integer | Deletion time, in Unix seconds; -1 if not deleted. |
| content.data[].extend | object | Saved notification scope and escalation rules; may be {}. |
| content.data[].extend.notifyTypes | array<string> |
Enabled action types. |
| content.data[].extend.notifyTypes[] | string | A single action type; see the parameter table for its specific effect. |
| content.data[].extend.upgradeCfg | object | Rules saved by trigger type. |
| content.data[].extend.upgradeCfg.noManager | object | When an Issue is created without a valid assignee and enters the no-assignee candidate, and its status is Open/Working/Pending, the wait starts from Issue creation; for an existing Issue, only removing the assignee does not guarantee re-entry into the candidate. Enter a positive integer number of seconds that is a multiple of 60. The enabled type is issueUpgrade.noManager; omitted when not configured. |
| content.data[].extend.upgradeCfg.noManager.duration | integer | Initial wait in seconds. |
| content.data[].extend.upgradeCfg.noManager.notifyType | string | once or cycle; if this value is not saved, once is used. |
| content.data[].extend.upgradeCfg.noManager.cycleDuration | integer | Cycle interval in seconds, used in cycle mode. |
| content.data[].extend.upgradeCfg.noManager.cycleTimes | integer | Maximum total number of cycle triggers, from 1 to 30, including the first. |
| content.data[].extend.upgradeCfg.processTimeout | object | Duration for which an Issue remains incomplete in Open/Working. The first timing starts from creation; when it re-enters a processing state from Pending/Resolved/Closed, timing starts from the state record after re-entry. The enabled type is issueUpgrade.processTimeout; omitted when not configured. |
| content.data[].extend.upgradeCfg.processTimeout.duration | integer | Initial wait in seconds. |
| content.data[].extend.upgradeCfg.processTimeout.notifyType | string | once or cycle; if this value is not saved, once is used. |
| content.data[].extend.upgradeCfg.processTimeout.cycleDuration | integer | Cycle interval in seconds, used in cycle mode. |
| content.data[].extend.upgradeCfg.processTimeout.cycleTimes | integer | Maximum total number of cycle triggers, from 1 to 30, including the first. |
| content.data[].extend.upgradeCfg.openProcessTimeout | object | Takes effect only while the Issue remains Open, timing from the last status change; if there is no status record, timing starts from creation. The enabled type is issueUpgrade.processTimeout; omitted when not configured. |
| content.data[].extend.upgradeCfg.openProcessTimeout.duration | integer | Initial wait in seconds. |
| content.data[].extend.upgradeCfg.openProcessTimeout.notifyType | string | once or cycle; if this value is not saved, once is used. |
| content.data[].extend.upgradeCfg.openProcessTimeout.cycleDuration | integer | Cycle interval in seconds, used in cycle mode. |
| content.data[].extend.upgradeCfg.openProcessTimeout.cycleTimes | integer | Maximum total number of cycle triggers, from 1 to 30, including the first. |
| content.data[].extend.upgradeCfg.eventStorm | object | Triggers after the eventCount recorded for the Issue is strictly greater than exceedTimes; not limited by Open/Working status, so a completed Issue may also meet the count condition. The enabled type is issueUpgrade.eventStorm; omitted when not configured. |
| content.data[].extend.upgradeCfg.eventStorm.exceedTimes | integer | Count threshold; triggers only when eventCount strictly exceeds it. |
| content.data[].extend.upgradeCfg.eventStorm.notifyType | string | once or cycle; if this value is not saved, once is used. |
| content.data[].extend.upgradeCfg.eventStorm.cycleDuration | integer | Cycle interval in seconds, used in cycle mode. |
| content.data[].extend.upgradeCfg.eventStorm.cycleTimes | integer | Maximum total number of cycle triggers, from 1 to 30, including the first. |
| content.data[].extend.其他字段 | JSON | Other extension fields saved by the source; not all of them control notification behavior. |
| content.data[].relNotificationScheduleInfos | array<object> |
Associated valid schedule objects; the list additionally includes a formatted validity period, while details contain only the raw schedule configuration. |
| content.data[].relNotificationScheduleInfos[].id | integer | Database record ID; use uuid to operate on the schedule. |
| content.data[].relNotificationScheduleInfos[].uuid | string | Schedule UUID, used for queries, updates, deletion, and Notification Policy references. |
| content.data[].relNotificationScheduleInfos[].workspaceUUID | string | UUID of the Workspace to which the schedule belongs. |
| content.data[].relNotificationScheduleInfos[].name | string | Schedule name. |
| content.data[].relNotificationScheduleInfos[].timezone | string | IANA time zone used by this schedule to interpret the time period of the day and effective dates. |
| content.data[].relNotificationScheduleInfos[].start | string | Start time of the day, HH:MM. |
| content.data[].relNotificationScheduleInfos[].end | string | End time of the day, HH:MM; the last second of the end minute is still valid. |
| content.data[].relNotificationScheduleInfos[].notifyTargets | array<string> |
Members, Notification Target UUIDs, or email addresses saved in order. |
| content.data[].relNotificationScheduleInfos[].notifyTargets[] | string | An acnt_ account, a notify_ Notification Target, or an email string. |
| content.data[].relNotificationScheduleInfos[].extend | object | Extension configuration; may be {} if not configured. |
| content.data[].relNotificationScheduleInfos[].extend.enableRotateNotification | boolean | Whether rotation is enabled; defaults to false. |
| content.data[].relNotificationScheduleInfos[].extend.rotationCycle | string | Rotation cycle when enabled: day for daily, week for weekly (Monday), month for calendar month, workDay for daily on workdays only, weekend for daily on weekends only. Public holidays are not recognized; can be omitted if not configured. |
| content.data[].relNotificationScheduleInfos[].extend.effectiveTime | object | Overall validity period; can be omitted if not configured. |
| content.data[].relNotificationScheduleInfos[].extend.effectiveTime.start | integer | Validity period start in Unix seconds; 0 or omitted means no limit. |
| content.data[].relNotificationScheduleInfos[].extend.effectiveTime.end | integer | Validity period end in Unix seconds; 0 or omitted means no limit. |
| content.data[].relNotificationScheduleInfos[].rotationUpdateAt | integer | Start time for rotation calculation, in Unix seconds. Reset when rotation-related configuration is changed. |
| content.data[].relNotificationScheduleInfos[].status | integer | Record status; 0 for active records. |
| content.data[].relNotificationScheduleInfos[].creator | string | Identity that created the record. |
| content.data[].relNotificationScheduleInfos[].updator | string | Identity of the most recent update; an empty string if not updated. |
| content.data[].relNotificationScheduleInfos[].createAt | integer | Creation time, in Unix seconds. |
| content.data[].relNotificationScheduleInfos[].updateAt | integer | Update time, in Unix seconds; -1 if not updated. |
| content.data[].relNotificationScheduleInfos[].deleteAt | integer | Deletion time, in Unix seconds; -1 if not deleted. |
| content.data[].relChannelInfos | array<object> |
Channel objects that reference this policy. |
| content.data[].relChannelInfos[].id | integer | Channel record ID. |
| content.data[].relChannelInfos[].uuid | string | Channel UUID, used for updates, deletion, or subscription. |
| content.data[].relChannelInfos[].workspaceUUID | string | Workspace to which the channel belongs. |
| content.data[].relChannelInfos[].name | string | Channel name. default indicates the default channel. |
| content.data[].relChannelInfos[].description | string | Channel description. |
| content.data[].relChannelInfos[].notifyTarget | array<string> |
Notification Target UUIDs directly configured for this channel. |
| content.data[].relChannelInfos[].notifyTarget[] | string | A single Notification Target UUID. |
| content.data[].relChannelInfos[].notifyUpgradeCfg | object | Escalation notification configuration; an empty object if not configured. |
| content.data[].relChannelInfos[].notifyUpgradeCfg.triggerTime | integer | Wait duration before triggering the escalation notification, in seconds. |
| content.data[].relChannelInfos[].notifyUpgradeCfg.notifyTarget | array<string> |
List of escalation Notification Target UUIDs. |
| content.data[].relChannelInfos[].notifyUpgradeCfg.notifyTarget[] | string | Escalation Notification Target UUID. |
| content.data[].relChannelInfos[].status | integer | Record status; 0 for normal. |
| content.data[].relChannelInfos[].creator | string | Identity that created the record. |
| content.data[].relChannelInfos[].updator | string | Identity of the most recent update; may be an empty string if not updated. |
| content.data[].relChannelInfos[].createAt | integer | Creation time, in Unix seconds. |
| content.data[].relChannelInfos[].updateAt | integer | Update time, in Unix seconds; -1 if not updated. |
| content.data[].relChannelInfos[].deleteAt | integer | Deletion time, in Unix seconds; -1 if not deleted. |
| content.data[].relNotificationScheduleInfos[].effectiveTimeInfos | object | Display information for the schedule's overall validity period added by the list. |
| content.data[].relNotificationScheduleInfos[].effectiveTimeInfos.timeStr | string | Formatted validity period; may be an empty string. |
| content.data[].relNotificationScheduleInfos[].effectiveTimeInfos.expired | boolean | Whether the overall validity period has ended. |
| content.data[].creatorInfo | object or null | Resolvable account profile of the creating/updating identity. An API Key is not a natural-person member, so the list may return null and details may return an empty object; the following fields are optional depending on the identity. |
| content.data[].creatorInfo.id | integer | Account record ID. |
| content.data[].creatorInfo.uuid | string | Account UUID. |
| content.data[].creatorInfo.name | string | Account name. |
| content.data[].creatorInfo.username | string | Login name. |
| content.data[].creatorInfo.email | string | Account email. |
| content.data[].creatorInfo.source | string | Account source. |
| content.data[].creatorInfo.userIconUrl | string | Avatar URL. |
| content.data[].creatorInfo.exterId | string | External identity identifier. |
| content.data[].creatorInfo.mobile | string | Mobile number. |
| content.data[].creatorInfo.countryCode | string | Country/region code. |
| content.data[].creatorInfo.namespace | string | Identity namespace. |
| content.data[].creatorInfo.attributes | object or array | Account attributes provided by the source. |
| content.data[].creatorInfo.attributes.自定义字段 | JSON | Attributes defined by the identity source. |
| content.data[].creatorInfo.customAttributes | object or array | Custom account attributes. |
| content.data[].creatorInfo.customAttributes.自定义字段 | JSON | Custom account attribute values. |
| content.data[].creatorInfo.acntWsNickname | string | Workspace nickname. |
| content.data[].creatorInfo.defaultWebhook | object | Default webhook information for some agent accounts; can be omitted. |
| content.data[].creatorInfo.defaultWebhook.自定义字段 | JSON | Webhook fields configured by account source. |
| content.data[].updatorInfo | object or null | Resolvable account profile of the creating/updating identity. An API Key is not a natural-person member, so the list may return null and details may return an empty object; the following fields are optional depending on the identity. |
| content.data[].updatorInfo.id | integer | Account record ID. |
| content.data[].updatorInfo.uuid | string | Account UUID. |
| content.data[].updatorInfo.name | string | Account name. |
| content.data[].updatorInfo.username | string | Login name. |
| content.data[].updatorInfo.email | string | Account email. |
| content.data[].updatorInfo.source | string | Account source. |
| content.data[].updatorInfo.userIconUrl | string | Avatar URL. |
| content.data[].updatorInfo.exterId | string | External identity identifier. |
| content.data[].updatorInfo.mobile | string | Mobile number. |
| content.data[].updatorInfo.countryCode | string | Country/region code. |
| content.data[].updatorInfo.namespace | string | Identity namespace. |
| content.data[].updatorInfo.attributes | object or array | Account attributes provided by the source. |
| content.data[].updatorInfo.attributes.自定义字段 | JSON | Attributes defined by the identity source. |
| content.data[].updatorInfo.customAttributes | object or array | Custom account attributes. |
| content.data[].updatorInfo.customAttributes.自定义字段 | JSON | Custom account attribute values. |
| content.data[].updatorInfo.acntWsNickname | string | Workspace nickname. |
| content.data[].updatorInfo.defaultWebhook | object | Default webhook information for some agent accounts; can be omitted. |
| content.data[].updatorInfo.defaultWebhook.自定义字段 | JSON | Webhook fields configured by account source. |
| content.declaration | object or null | Workspace public declaration. |
| pageInfo | object | Top-level pagination information. |
| 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 matching policies. |
{
"code": 200,
"content": {
"data": [
{
"id": 42,
"uuid": "inpy_example",
"workspaceUUID": "wksp_example",
"name": "生产异常通知",
"extend": {
"notifyTypes": [
"issue.add",
"issue.modify",
"issueReply.add",
"issueUpgrade.noManager",
"issueUpgrade.processTimeout",
"issueUpgrade.eventStorm"
],
"upgradeCfg": {
"noManager": {
"duration": 600,
"notifyType": "once"
},
"processTimeout": {
"duration": 1800,
"notifyType": "cycle",
"cycleDuration": 600,
"cycleTimes": 3
},
"openProcessTimeout": {
"duration": 900,
"notifyType": "once"
},
"eventStorm": {
"exceedTimes": 60,
"notifyType": "once"
}
}
},
"status": 0,
"creator": "wsak_example",
"updator": "",
"createAt": 1785430800,
"updateAt": -1,
"deleteAt": -1,
"relNotificationScheduleInfos": [],
"relChannelInfos": [],
"creatorInfo": null,
"updatorInfo": null
}
],
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE",
"pageInfo": {
"pageIndex": 1,
"pageSize": 10,
"count": 1,
"totalCount": 1
}
}
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. |
| 500 | ft.InternalServerError | Failed to read the policy or associated data | Internal error | Retry later; if it persists, provide the traceId. |