Delete¶
POST /api/v1/notice/date/delete
Overview¶
Delete a date configuration; by default, first check whether it is referenced by any non-deleted Alert Policy.
Before Calling and Usage Steps¶
First select a non-empty target UUID array from the Custom Notification Date List. By default, skipRefCheck=false: if related policies are found, HTTP200 returns the refAlertPolicyNames object and retains the date configuration; this is not a successful deletion. Only content=true indicates that the deletion process has completed; true may also be returned when no matching date record is found. The reference check matches by policy configuration text, and the prompt names must be verified against the Alert Policy details. An empty array is not treated as a valid pre-check request and may return reference prompts unrelated to the target. First confirm and adjust references in Alert Policy Details; if forced deletion is truly required, explicitly set skipRefCheck=true. Forced deletion does not automatically remove the UUID from the existing alertOpt; it only invalidates these date references and clears the Alert Policy cache. Notification windows may no longer match, so recheck the policy configuration.
Request Headers¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Yes | Workspace OpenAPI authentication credential. Example: <DF-API-KEY>How to obtain or enter: Obtain an OpenAPI Key with this operation permission from API Key Management in the target workspace. |
Request Body Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| noticeDatesUUIDs[*] | string | A single date configuration UUID. Example: ndate_exampleHow to obtain or enter: Take a single ndate_ UUID from the Custom Notification Date List. |
|
| noticeDatesUUIDs | array | Yes | Array of UUIDs of date configurations to delete. Required; do not enter date text. Allowed null: False Example: ["ndate_example"]How to obtain or enter: Get the target from content.data[].uuid in the Custom Notification Date List; submit a non-empty array. |
| skipRefCheck | boolean | Optional boolean. Default false checks references; true skips the reference check and deletes matching configurations in the current workspace. Allowed null: False Example: falseHow to obtain or enter: For normal deletion, use false or omit this field first; use true only after confirming the reference impact. |
Additional Parameter Notes¶
By default, a reference prompt is part of a successful response, not an error code. Callers must check both the content type and refAlertPolicyNames, and must not rely solely on HTTP200/success=true. Deletion does not delete the Alert Policy itself.
Request Example¶
curl --request POST 'https://openapi.guance.com/api/v1/notice/date/delete' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{"noticeDatesUUIDs":["ndate_example"],"skipRefCheck":false}'
Response¶
HTTP 200, application/json. The following example shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content | object or boolean | An object when references exist and the check is not skipped; true when the deletion process is complete. |
| content.refAlertPolicyNames | array<string> |
Alert Policy names included in the reference-check prompt; the presence of this field indicates that this request did not delete anything. |
| content.refAlertPolicyNames[] | string | A single policy name. |
| content.declaration | object or null | Only the non-empty object prompt branch includes the workspace common declaration; the true branch does not. |
{
"code": 200,
"content": {
"refAlertPolicyNames": [
"Production Service Alert"
],
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
When there are no references or the reference check is explicitly skipped, and deletion processing is complete:
{
"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 | Correct the JSON according to content.reason, line, and column. |
| 400 | ft.JsonFormatError | JSON top level is not an object | Partial JSON file format error | Submit a single JSON object. |
| 500 | ft.InternalServerError | Reference check, deletion, or cache cleanup failed | Internal error | First check the current status of the date configuration and referencing policies; if the failure persists, provide the traceId. |