Skip to content

Modify



POST /api/v1/issue/notification_policy/{issue_notification_policy_uuid}/modify

Overview

Fully updates the notification scope, associated schedules, and escalation configuration of a notification policy.

Before Calling and Usage Steps

Modification requires submitting the complete target name, schedule UUID array, and extend. Schedule associations and extend are replaced entirely; omitting notificationScheduleUUIDs clears schedules, and omitting extend clears the notification scope and rules. In the parameter table, notification_schedule_uuid is a historical path name. The value to enter here is the same policy UUID corresponding to issue_notification_policy_uuid in the actual URL, not a schedule UUID and not another query parameter. The 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 the policy itself does not immediately send a test notification. Escalation is checked by a site scheduled task, not an exact countdown; only Issues created after the trigger configuration is created or updated are checked. A trigger may be recorded even if the schedule has no valid targets at that time; do not treat the trigger count as the delivery count. Check both notification targets and actual messages. The policy body, associations, and escalation trigger configuration are saved in separate steps. After a failure or timeout, read the details first to confirm existing changes, then decide whether to retry. In the current version, the trigger configuration save may fail only when time-based rules of type noManager/processTimeout/openProcessTimeout are newly added to an existing policy and no trigger configuration for that type existed previously; the policy body may already be saved. Updating an existing configuration of the same type and adding eventStorm do not fall under this condition; after a failure, read the details and verify the actual trigger effect.

Path Parameters

Parameter Type Required Description
notification_schedule_uuid string Y Notification policy UUID in the path; it is not a schedule UUID, and no additional Query parameter is passed.
Example: inpy_example
How to obtain or enter: Obtain the policy UUID from the Notification Policy List. This name is only a historical declaration and corresponds to issue_notification_policy_uuid in the actual URL.

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 permission for this operation from API Key Management in the target workspace.

Body Request Parameters

Parameter Type Required Description
notificationScheduleUUIDs[*] string UUID of a single notification schedule. Do not substitute a notification target UUID.
Example: nsche_example
How to obtain or enter: Copy a single schedule UUID from the Notification Schedule List, and use Notification Schedule Details to confirm the configuration and targets.
extend.notifyTypes[*] string A single trigger type. openProcessTimeout is also enabled by issueUpgrade.processTimeout; do not pass issueUpgrade.openProcessTimeout separately.
Example: issueUpgrade.eventStorm
How to obtain or enter: Select one of the above event types according to the trigger intent; the event type itself does not specify recipients.
extend.upgradeCfg.noManager json When an Issue has no valid assignee at creation and enters the no-assignee candidate set, and its status is Open/Working/Pending, wait from the Issue creation time; for existing Issues, 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. Omitting this field or passing an empty object disables the rule.
Example: {"duration": 600, "notifyType": "once"}
How to obtain or enter: After including issueUpgrade.noManager in extend.notifyTypes, fill in according to business expectations.
extend.upgradeCfg.noManager.duration integer Required when enabled, positive integer seconds, must be a multiple of 60, maximum 31622400 seconds; omitting it or setting it to 0 does not create the rule.
Example: 600
How to obtain or enter: Convert the business wait duration to seconds; for example, 600 is 10 minutes.
extend.upgradeCfg.noManager.notifyType string Notification method, once or cycle; defaults to once when omitted.
Example: once
How to obtain or enter: Enter once to notify only once; enter cycle when repeated check and send is required.
extend.upgradeCfg.noManager.cycleDuration integer Required cycle interval in cycle mode, in seconds; it is not added to duration each time, and actual behavior is also affected by scheduled tasks and schedule validity.
Example: 600
How to obtain or enter: In cycle mode, select a positive integer second interval, for example, 600 is 10 minutes; omit in once mode.
extend.upgradeCfg.noManager.cycleTimes integer Required in cycle mode, maximum number of triggers, including the first. Valid range is 1 to 30; the actual recorded count does not equal the number of successful deliveries.
Example: 3
How to obtain or enter: In cycle mode, enter an integer from 1 to 30; omit in once mode.
extend.upgradeCfg.processTimeout json Continuous unresolved time while an Issue is in Open/Working. The first timing starts from creation; when it re-enters a processing status from Pending/Resolved/Closed, timing starts from the status record after re-entry. Omitting this field or passing an empty object disables the rule.
Example: {"duration": 1800, "notifyType": "cycle", "cycleDuration": 600, "cycleTimes": 3}
How to obtain or enter: After including issueUpgrade.processTimeout in extend.notifyTypes, fill in according to business expectations.
extend.upgradeCfg.processTimeout.duration integer Required when enabled, positive integer seconds, must be a multiple of 60, maximum 31622400 seconds; omitting it or setting it to 0 does not create the rule.
Example: 1800
How to obtain or enter: Convert the business wait duration to seconds; for example, 600 is 10 minutes.
extend.upgradeCfg.processTimeout.notifyType string Notification method, once or cycle; defaults to once when omitted.
Example: cycle
How to obtain or enter: Enter once to notify only once; enter cycle when repeated check and send is required.
extend.upgradeCfg.processTimeout.cycleDuration integer Required cycle interval in cycle mode, in seconds; it is not added to duration each time, and actual behavior is also affected by scheduled tasks and schedule validity.
Example: 600
How to obtain or enter: In cycle mode, select a positive integer second interval, for example, 600 is 10 minutes; omit in once mode.
extend.upgradeCfg.processTimeout.cycleTimes integer Required in cycle mode, maximum number of triggers, including the first. Valid range is 1 to 30; the actual recorded count does not equal the number of successful deliveries.
Example: 3
How to obtain or enter: In cycle mode, enter an integer from 1 to 30; omit in once mode.
extend.upgradeCfg.openProcessTimeout json Effective only while the Issue remains Open; timing starts from the last status change time; if there is no status record, timing starts from creation time. Omitting this field or passing an empty object disables the rule.
Example: {"duration": 900, "notifyType": "once"}
How to obtain or enter: After including issueUpgrade.processTimeout in extend.notifyTypes, fill in according to business expectations.
extend.upgradeCfg.openProcessTimeout.duration integer Required when enabled, positive integer seconds, must be a multiple of 60, maximum 31622400 seconds; omitting it or setting it to 0 does not create the rule.
Example: 900
How to obtain or enter: Convert the business wait duration to seconds; for example, 600 is 10 minutes.
extend.upgradeCfg.openProcessTimeout.notifyType string Notification method, once or cycle; defaults to once when omitted.
Example: once
How to obtain or enter: Enter once to notify only once; enter cycle when repeated check and send is required.
extend.upgradeCfg.openProcessTimeout.cycleDuration integer Required cycle interval in cycle mode, in seconds; it is not added to duration each time, and actual behavior is also affected by scheduled tasks and schedule validity.
Example: 600
How to obtain or enter: In cycle mode, select a positive integer second interval, for example, 600 is 10 minutes; omit in once mode.
extend.upgradeCfg.openProcessTimeout.cycleTimes integer Required in cycle mode, maximum number of triggers, including the first. Valid range is 1 to 30; the actual recorded count does not equal the number of successful deliveries.
Example: 3
How to obtain or enter: In cycle mode, enter an integer from 1 to 30; omit in once mode.
extend.upgradeCfg.eventStorm json Triggered after the Issue's recorded eventCount is strictly greater than exceedTimes; not limited by Open/Working status, and completed Issues may also satisfy the count condition. Omitting this field or passing an empty object disables the rule.
Example: {"exceedTimes": 60, "notifyType": "once"}
How to obtain or enter: After including issueUpgrade.eventStorm in extend.notifyTypes, fill in according to business expectations.
extend.upgradeCfg.eventStorm.exceedTimes integer Event count threshold, not time; required when enabled, positive integer, no greater than 31622400.
Example: 60
How to obtain or enter: Set a positive integer threshold based on the acceptable number of associated events; for example, 60 means the trigger occurs only when eventCount exceeds 60.
extend.upgradeCfg.eventStorm.notifyType string Notification method, once or cycle; defaults to once when omitted.
Example: once
How to obtain or enter: Enter once to notify only once; enter cycle when repeated check and send is required.
extend.upgradeCfg.eventStorm.cycleDuration integer Required cycle interval in cycle mode, in seconds; it is not added to duration each time, and actual behavior is also affected by scheduled tasks and schedule validity.
Example: 600
How to obtain or enter: In cycle mode, select a positive integer second interval, for example, 600 is 10 minutes; omit in once mode.
extend.upgradeCfg.eventStorm.cycleTimes integer Required in cycle mode, maximum number of triggers, including the first. Valid range is 1 to 30; the actual recorded count does not equal the number of successful deliveries.
Example: 3
How to obtain or enter: In cycle mode, enter an integer from 1 to 30; omit in once mode.
name string Y Required non-empty policy name, maximum 256 characters; it must also be submitted during modification.
Allowed null: False
Maximum length: 256
Allow empty string: False
Example: 生产异常通知
How to obtain or enter: Check existing policy names from the Notification Policy List and choose a name not used in the current workspace.
notificationScheduleUUIDs array Complete target schedule UUID array; omitting it or passing [] clears all schedule associations.
Allowed null: False
Example: ["nsche_example"]
How to obtain or enter: Obtain notification schedules in the same workspace from content.data[].uuid in the Notification Schedule List; a policy can be associated with multiple schedules.
extend json Complete target notification configuration; omitting it or passing {} clears the saved notification scope and escalation rules.
Allowed null: False
Example: {"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"}}}
How to obtain or enter: Fill in according to the Issue actions and escalation rules to receive; pass {} if there is no content.
extend.notifyTypes array Notification trigger type array: issue.add=Issue creation notification; issue.modify=Issue modification notification; issueReply.add=reply creation notification; issueReply.modify=reply modification notification; issueReply.delete=reply deletion notification; issueUpgrade.noManager=escalation notification when there is no assignee; issueUpgrade.processTimeout=processing timeout escalation, controlling both processTimeout and openProcessTimeout; issueUpgrade.eventStorm=event storm notification after the number of associated events strictly exceeds the threshold; dailySummary=daily summary sent by the site summary task.
Allowed null: False
Example: ["issue.add", "issue.modify", "issueReply.add", "issueUpgrade.noManager", "issueUpgrade.processTimeout", "issueUpgrade.eventStorm"]
How to obtain or enter: Select from the event types actually supported below and include the corresponding strings for the types you need; omitting the field or passing [] disables these actions.
extend.upgradeCfg json Object containing four types of escalation rules, which can be configured separately; omit it or pass {} when there are no escalation rules.
Allowed null: False
Example: {"noManager": {"duration": 600, "notifyType": "once"}, "processTimeout": {"duration": 1800, "notifyType": "cycle", "cycleDuration": 600, "cycleTimes": 3}, "openProcessTimeout": {"duration": 900, "notifyType": "once"}, "eventStorm": {"exceedTimes": 60, "notifyType": "once"}}
How to obtain or enter: First enable the corresponding escalation type in notifyTypes, then fill in its rules; filling in rules without enabling the type does not create an effective escalation trigger.

Additional Parameter Notes

noManager is no-assignee waiting, processTimeout is continuous processing timeout in Open/Working, and openProcessTimeout is Open-only timeout; the latter two are both enabled by issueUpgrade.processTimeout. eventStorm uses an associated event count threshold rather than wait seconds. Cyclic rules must provide both cycleDuration and cycleTimes; if a field is missing, the configuration may be saved but no effective rule will be created. Nested fields are not strictly validated field by field, and incorrect types may also return a generic internal error.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/issue/notification_policy/inpy_example/modify' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":"生产异常通知","notificationScheduleUUIDs":["nsche_example"],"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"}}}}'

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 locate it by uuid.
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 that made the creation call.
content.updator string Identity of the most recent update; 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; can 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 When an Issue has no valid assignee at creation and enters the no-assignee candidate set, and its status is Open/Working/Pending, wait from the Issue creation time; for existing Issues, 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 by type issueUpgrade.noManager; omitted when not configured.
content.extend.upgradeCfg.noManager.duration integer First 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, 1 to 30, including the first.
content.extend.upgradeCfg.processTimeout object Continuous unresolved time while an Issue is in Open/Working. The first timing starts from creation; when it re-enters a processing status from Pending/Resolved/Closed, timing starts from the status record after re-entry. Enabled by type issueUpgrade.processTimeout; omitted when not configured.
content.extend.upgradeCfg.processTimeout.duration integer First 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, 1 to 30, including the first.
content.extend.upgradeCfg.openProcessTimeout object Effective only while the Issue remains Open; timing starts from the last status change time; if there is no status record, timing starts from creation time. Enabled by type issueUpgrade.processTimeout; omitted when not configured.
content.extend.upgradeCfg.openProcessTimeout.duration integer First 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, 1 to 30, including the first.
content.extend.upgradeCfg.eventStorm object Triggered after the Issue's recorded eventCount is strictly greater than exceedTimes; not limited by Open/Working status, and completed Issues may also satisfy the count condition. Enabled by type issueUpgrade.eventStorm; omitted when not configured.
content.extend.upgradeCfg.eventStorm.exceedTimes integer Count threshold; the trigger occurs only when eventCount strictly exceeds it.
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, 1 to 30, including the first.
content.extend.其他字段 JSON Other extension fields saved from the source; not all of them control notification behavior.
content.notificationScheduleUUIDs array<string> Schedule UUID array after this full replacement; if omitted in the request, it is treated as [] and clears associations rather than retaining the original values.
content.notificationScheduleUUIDs[] string Schedule UUID.
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": "wsak_example",
    "createAt": 1785430800,
    "updateAt": 1785430860,
    "deleteAt": -1,
    "notificationScheduleUUIDs": [
      "nsche_example"
    ],
    "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
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 this workspace again from the Notification Policy List.
406 ft.ParameterValidationFailed A request field is missing, or the field value violates the declared validation conditions Parameter parsing failed Verify the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError Invalid request JSON syntax Request JSON format error Correct the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The JSON top level is not an object Some JSON file format error Submit a single JSON object.
400 ft.PolicySameNameExists A policy with the same name that has not been deleted exists in the current workspace, including disabled policies A notification policy with the same name already exists Choose an unused name; after a timeout, first confirm whether it has been saved.
400 ft.InvalidFieldValue notifyType is not once/cycle, or cycleTimes is not between 1 and 30 Field {} value: {} is invalid Enter notifyType and the count according to the rules; use the correct type for nested objects.
400 ft.UpgradeTimeTooLarge Any time-based duration is greater than 31622400 seconds Escalation time configuration is too large; set a reasonable escalation trigger time Shorten the wait time; the maximum is 31622400 seconds.
400 ft.InvalidUpgradeTimeDuration Time-based duration is not an integer multiple of 60 seconds Escalation time configuration must be a positive integer multiple of 60(s) Use the number of seconds obtained by multiplying a positive integer number of minutes by 60.
400 ft.exceedTimesTooLarge eventStorm.exceedTimes is greater than 31622400 The associated event trigger count is too large; set a reasonable trigger count Use a positive integer event count threshold not exceeding 31622400.
500 ft.InternalServerError Unhandled exception during policy relationship saving, escalation trigger configuration update, or auditing, etc.; the body or relationships may already be committed, and if the original policy lacks a time trigger configuration, subsequent processing may also fail Internal error Read name and extend by the original policy UUID, verify schedule associations from relNotificationScheduleInfos[].uuid, and then verify the actual escalation trigger status; omitting the schedule array clears it. Do not recreate a policy with the same name as a new policy; retain the traceId to locate the unfinished part.

Feedback

Is this page helpful?