Delete¶
POST /api/v1/issue/notification_policy/delete
Overview¶
Batch delete notification policies and clean up associated channels, schedule relationships, and escalation trigger configurations.
Before You Start and Usage Steps¶
Obtain the UUIDs of the policies to delete from the notification policy list. After confirming that channels no longer depend on these policies, submit the array. This operation deletes policy configurations and relationships, but does not delete schedules, channels, Issues, or notification targets themselves. If no records match, or the array is empty, the response can still return true; per-item deletion results are not provided. After deletion, subsequent notifications no longer use the policy, but submitted asynchronous tasks or existing messages are not guaranteed to be withdrawn. The policy entity, relationships, and escalation trigger configurations are saved in separate steps. After a failure or timeout, read the details first to confirm existing changes, then decide whether to retry.
Request Headers¶
| Parameter Name | 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 permission from API Key Management in the target workspace. |
Body Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| issueNotificationPolicyUUIDs[*] | string | A single notification policy UUID. Example: inpy_exampleHow to obtain or enter: Copy a single UUID from the notification policy list. |
|
| issueNotificationPolicyUUIDs | array | Y | Array of policy UUIDs to delete. Required. [] does not delete any policies. Allows null: False Example: ["inpy_example"]How to obtain or enter: Obtain the UUIDs of policies in the same workspace from content.data[].uuid in the notification policy list. |
Additional Parameter Notes¶
Batch requests only operate on matching policies within the current workspace. To temporarily disable a policy, use the console; these 5 public APIs do not provide a separate enable/disable method.
Request Example¶
curl --request POST 'https://openapi.guance.com/api/v1/issue/notification_policy/delete' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{"issueNotificationPolicyUUIDs":["inpy_example"]}'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content | boolean | true when deletion processing is complete; it can also be true when no policies match. |
{
"code": 200,
"content": true,
"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 | 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 | Request JSON syntax is invalid | Request JSON format error | Fix the JSON according to content.reason, line, and column. |
| 400 | ft.JsonFormatError | The JSON top level is not an object | Some JSON file is malformed | Submit a single JSON object. |
| 500 | ft.InternalServerError | Failed to clean up policies, relationships, or escalation configurations | Internal error | Query the policy and relationship status first, then decide whether to retry; if the failure persists, provide the traceId. |