Get¶
GET /api/v1/issue/notification_policy/{issue_notification_policy_uuid}/get
Overview¶
Read a notification policy and its associated schedules, channels, and creator/updater identities.
Prerequisites and Usage Steps¶
Copy the policy UUID from the Notification Policy List into the path, and read each notification type and escalation configuration in extend. Before modifying, save the complete target values of name, notificationScheduleUUIDs, and extend; obtain the schedule UUID from relNotificationScheduleInfos[].uuid. The schedules in the details are raw entity configurations and are not appended with effectiveTimeInfos from the list. The policy must be associated with target channels in the console and with valid notification schedules; actual recipients are determined by the schedule's time zone, time period of the day, effective period, rotation, and notification targets. Saving the policy itself does not immediately send a test notification.
Route Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| issue_notification_policy_uuid | string | Y | UUID of the notification policy in the current Workspace, not the schedule UUID. Example: inpy_exampleHow to obtain or specify: Obtain it from content.data[].uuid in the Notification Policy List or from content.uuid in the create response. |
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 specify: Obtain an OpenAPI Key with permission for this operation from API Key Management in the target Workspace. |
Additional Parameter Notes¶
Whether an escalation rule is triggered also depends on the Issue creation time, current status, assignee, number of associated events, scheduled jobs, and valid schedule targets; do not assume that a notification has been sent based only on the saved JSON.
Request Example¶
curl --get 'https://openapi.guance.com/api/v1/issue/notification_policy/inpy_example/get' \
-H 'DF-API-KEY: <DF-API-KEY>'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content.id | integer | Database ID of the existing configuration; subsequent API operations use the UUID for identification. |
| content.uuid | string | Notification policy UUID, starting with inpy_. |
| content.workspaceUUID | string | UUID of the Workspace to which it belongs. |
| content.name | string | Policy name. |
| content.status | integer | Record status: 0 enabled, 2 disabled, 3 deleted; the list includes enabled and disabled policies that have not been deleted. |
| content.creator | string | Identity of the creating caller. |
| content.updator | string | Identity of the most recent updater; empty string if never updated. |
| content.createAt | integer | Creation time, Unix seconds. |
| content.updateAt | integer | Update time, Unix seconds; -1 if never updated. |
| content.deleteAt | integer | Deletion time, Unix seconds; -1 if not deleted. |
| content.extend | object | Saved notification scope and escalation rules; may be {}. |
| content.extend.notifyTypes | array<string> |
Enabled action types. |
| content.extend.notifyTypes[] | string | A single action type; see the parameter table for its specific effect. |
| content.extend.upgradeCfg | object | Rules saved by trigger type. |
| content.extend.upgradeCfg.noManager | object | Triggered when an Issue has no valid assignee at creation and enters the no-assignee candidate set, and its status is Open/Working/Pending; the wait starts from Issue creation. For an existing Issue, merely removing the assignee does not guarantee re-entry into the candidate set. Enter a positive integer number of seconds that is a multiple of 60. Enabled type is issueUpgrade.noManager; omitted when not configured. |
| content.extend.upgradeCfg.noManager.duration | integer | Initial wait time in seconds. |
| content.extend.upgradeCfg.noManager.notifyType | string | once or cycle; if this value is not saved, once is used. |
| content.extend.upgradeCfg.noManager.cycleDuration | integer | Cycle interval in seconds; used in cycle mode. |
| content.extend.upgradeCfg.noManager.cycleTimes | integer | Maximum total number of cycle triggers, from 1 to 30, including the first trigger. |
| content.extend.upgradeCfg.processTimeout | object | Duration for which an Issue remains incomplete in Open/Working. The first timing starts from creation; when the Issue re-enters the processing state from Pending/Resolved/Closed, timing starts from the status record after re-entry. Enabled type is issueUpgrade.processTimeout; omitted when not configured. |
| content.extend.upgradeCfg.processTimeout.duration | integer | Initial wait time in seconds. |
| content.extend.upgradeCfg.processTimeout.notifyType | string | once or cycle; if this value is not saved, once is used. |
| content.extend.upgradeCfg.processTimeout.cycleDuration | integer | Cycle interval in seconds; used in cycle mode. |
| content.extend.upgradeCfg.processTimeout.cycleTimes | integer | Maximum total number of cycle triggers, from 1 to 30, including the first trigger. |
| content.extend.upgradeCfg.openProcessTimeout | object | Takes effect only while the Issue remains Open; timing starts from the last status change time; if there is no status record, timing starts from the creation time. Enabled type is issueUpgrade.processTimeout; omitted when not configured. |
| content.extend.upgradeCfg.openProcessTimeout.duration | integer | Initial wait time in seconds. |
| content.extend.upgradeCfg.openProcessTimeout.notifyType | string | once or cycle; if this value is not saved, once is used. |
| content.extend.upgradeCfg.openProcessTimeout.cycleDuration | integer | Cycle interval in seconds; used in cycle mode. |
| content.extend.upgradeCfg.openProcessTimeout.cycleTimes | integer | Maximum total number of cycle triggers, from 1 to 30, including the first trigger. |
| content.extend.upgradeCfg.eventStorm | object | Triggered after the eventCount recorded on the Issue is strictly greater than exceedTimes; not limited by Open/Working status, and completed Issues may also meet the count condition. Enabled type is issueUpgrade.eventStorm; omitted when not configured. |
| content.extend.upgradeCfg.eventStorm.exceedTimes | integer | Count threshold; triggered only when eventCount is strictly greater. |
| content.extend.upgradeCfg.eventStorm.notifyType | string | once or cycle; if this value is not saved, once is used. |
| content.extend.upgradeCfg.eventStorm.cycleDuration | integer | Cycle interval in seconds; used in cycle mode. |
| content.extend.upgradeCfg.eventStorm.cycleTimes | integer | Maximum total number of cycle triggers, from 1 to 30, including the first trigger. |
| content.extend.Other fields | JSON | Other extension fields saved by the source; not all of them control notification behavior. |
| content.relNotificationScheduleInfos | array<object> |
Associated valid schedule objects; the list additionally contains formatted effective periods, while the details contain only raw schedule configurations. |
| content.relNotificationScheduleInfos[].id | integer | Database record ID; use uuid for schedule operations. |
| content.relNotificationScheduleInfos[].uuid | string | Schedule UUID, used for queries, modifications, deletions, and notification policy references. |
| content.relNotificationScheduleInfos[].workspaceUUID | string | UUID of the Workspace to which it belongs. |
| content.relNotificationScheduleInfos[].name | string | Schedule name. |
| content.relNotificationScheduleInfos[].timezone | string | IANA time zone used by this schedule to interpret the time period of the day and effective dates. |
| content.relNotificationScheduleInfos[].start | string | Start time of the day HH:MM. |
| content.relNotificationScheduleInfos[].end | string | End time of the day HH:MM; the last second of the end minute is still valid. |
| content.relNotificationScheduleInfos[].notifyTargets | array<string> |
Members, notification target UUIDs, or email addresses saved in order. |
| content.relNotificationScheduleInfos[].notifyTargets[] | string | acnt_ account, notify_ notification target, or email string. |
| content.relNotificationScheduleInfos[].extend | object | Extension configuration; may be {} if not configured. |
| content.relNotificationScheduleInfos[].extend.enableRotateNotification | boolean | Whether rotation is enabled; defaults to false. |
| content.relNotificationScheduleInfos[].extend.rotationCycle | string | Rotation cycle when rotation is enabled: day means daily, week means weekly on Monday, month means every calendar month, workDay means daily on workdays only, weekend means daily on weekends only. Holidays are not recognized; may be omitted if not configured. |
| content.relNotificationScheduleInfos[].extend.effectiveTime | object | Overall effective period; may be omitted if not configured. |
| content.relNotificationScheduleInfos[].extend.effectiveTime.start | integer | Effective period start in Unix seconds; 0 or omitted means no limit. |
| content.relNotificationScheduleInfos[].extend.effectiveTime.end | integer | Effective period end in Unix seconds; 0 or omitted means no limit. |
| content.relNotificationScheduleInfos[].rotationUpdateAt | integer | Start time for rotation calculation, in Unix seconds. Reset when rotation-related configurations are changed. |
| content.relNotificationScheduleInfos[].status | integer | Record status; active records are 0. |
| content.relNotificationScheduleInfos[].creator | string | Identity of the creating caller. |
| content.relNotificationScheduleInfos[].updator | string | Identity of the most recent updater; empty string if never updated. |
| content.relNotificationScheduleInfos[].createAt | integer | Creation time, Unix seconds. |
| content.relNotificationScheduleInfos[].updateAt | integer | Update time, Unix seconds; -1 if never updated. |
| content.relNotificationScheduleInfos[].deleteAt | integer | Deletion time, Unix seconds; -1 if not deleted. |
| content.relChannelInfos | array<object> |
Channel objects that reference this policy. |
| content.relChannelInfos[].id | integer | Channel record ID. |
| content.relChannelInfos[].uuid | string | Channel UUID, used for modification, deletion, or subscription. |
| content.relChannelInfos[].workspaceUUID | string | Workspace to which the channel belongs. |
| content.relChannelInfos[].name | string | Channel name. default indicates the default channel. |
| content.relChannelInfos[].description | string | Channel description. |
| content.relChannelInfos[].notifyTarget | array<string> |
UUIDs of notification targets configured directly for this channel. |
| content.relChannelInfos[].notifyTarget[] | string | A single notification target UUID. |
| content.relChannelInfos[].notifyUpgradeCfg | object | Escalation notification configuration; empty object if not configured. |
| content.relChannelInfos[].notifyUpgradeCfg.triggerTime | integer | Wait time before triggering the escalation notification, in seconds. |
| content.relChannelInfos[].notifyUpgradeCfg.notifyTarget | array<string> |
List of escalation notification target UUIDs. |
| content.relChannelInfos[].notifyUpgradeCfg.notifyTarget[] | string | Escalation notification target UUID. |
| content.relChannelInfos[].status | integer | Record status; normal is 0. |
| content.relChannelInfos[].creator | string | Identity of the creating caller. |
| content.relChannelInfos[].updator | string | Identity of the most recent updater; empty string if never updated. |
| content.relChannelInfos[].createAt | integer | Creation time, Unix seconds. |
| content.relChannelInfos[].updateAt | integer | Update time, Unix seconds; -1 if never updated. |
| content.relChannelInfos[].deleteAt | integer | Deletion time, Unix seconds; -1 if not deleted. |
| content.creatorInfo | object | Resolvable account profile of the creating/updating identity. An API Key is not an individual member, so the list response may return null and the detail response may be an empty object; the following fields are optional depending on the identity. |
| content.creatorInfo.uuid | string | Account UUID. |
| content.creatorInfo.status | integer | Account record status. |
| content.creatorInfo.wsAccountStatus | integer | Account status in the Workspace. |
| content.creatorInfo.username | string | Login name. |
| content.creatorInfo.name | string | Display name. |
| content.creatorInfo.iconUrl | string | Avatar URL; may be omitted. |
| content.creatorInfo.email | string | Email or API Key identity. |
| content.creatorInfo.mobile | string | Mobile phone number; may be empty. |
| content.creatorInfo.countryCode | string | Country/region code; may be omitted. |
| content.creatorInfo.acntWsNickname | string | Workspace nickname; may be omitted. |
| content.updatorInfo | object | Resolvable account profile of the creating/updating identity. An API Key is not an individual member, so the list response may return null and the detail response may be an empty object; the following fields are optional depending on the identity. |
| content.updatorInfo.uuid | string | Account UUID. |
| content.updatorInfo.status | integer | Account record status. |
| content.updatorInfo.wsAccountStatus | integer | Account status in the Workspace. |
| content.updatorInfo.username | string | Login name. |
| content.updatorInfo.name | string | Display name. |
| content.updatorInfo.iconUrl | string | Avatar URL; may be omitted. |
| content.updatorInfo.email | string | Email or API Key identity. |
| content.updatorInfo.mobile | string | Mobile phone number; may be empty. |
| content.updatorInfo.countryCode | string | Country/region code; may be omitted. |
| content.updatorInfo.acntWsNickname | string | Workspace nickname; may be omitted. |
| content.declaration | object or null | Workspace public declaration. |
{
"code": 200,
"content": {
"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": {},
"updatorInfo": {},
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Responses¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Handling |
|---|---|---|---|---|
| 404 | ft.ObjectNotExists | The policy does not exist, has been deleted, or does not belong to the Workspace of the current API Key | The specified object does not exist | Obtain the UUID for the current Workspace again from the Notification Policy List. |
| 500 | ft.InternalServerError | Failed to read the policy or associated data | Internal error | Retry later; if the failure persists, provide the traceId. |