Skip to content

Batch Delete



POST /api/v1/notify_object/batch_delete

Overview

Batch delete notification targets in a workspace.

Before You Begin and Usage Steps

First, verify the UUIDs against the notification target list and adjust the Alert Policies or notification policies that reference those targets. The operation soft-deletes matching objects in the current workspace and clears the Alert Policy cache; it does not guarantee automatic unbinding of all references. If no objects match, the response still returns true, and repeated calls do not report that the target does not exist. A batch request fails if any target lacks operation permission. After a service error, query the result again before retrying.

Request Headers

Parameter Name Type Required Description
DF-API-KEY string Y OpenAPI authentication credential of the workspace.
Example: <DF-API-KEY>
How to obtain or fill in: Obtain an OpenAPI Key with the required operation permission from API Key management in the target workspace.

Body Request Parameters

Parameter Name Type Required Description
notifyObjectUUIDs[*] string UUID string of a single notification target.
Example: notify_example
How to obtain or fill in: Copy the notification target UUID of the current workspace from content.data[].uuid returned by the notification target list.
notifyObjectUUIDs array Y Array of notification target UUIDs to delete.
Null allowed: False
Example: ["notify_example"]
How to obtain or fill in: Copy the notification target UUIDs of the current workspace from content.data[].uuid returned by the notification target list.

Additional Parameter Notes

Only objects that have not been deleted in the current workspace are processed. The return value does not provide the number of deleted objects.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/notify_object/batch_delete' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"notifyObjectUUIDs":["notify_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, including when no object matched.
{
  "code": 200,
  "content": true,
  "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 Method
406 ft.ParameterValidationFailed A request field is missing, or a field value violates the declared validation conditions Parameter parsing failed Verify the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError The 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 format error Submit a single JSON object.
403 ft.ForbiddenNotifyObjOperation The target has custom permissions enabled and the current identity is outside the operable scope 您无通知对象【{}】操作权限 An identity with management permission should verify the object permissionSet and the workspace advanced permission configuration.
500 ft.InternalServerError Deletion submission, cache clearing, or subsequent auditing fails Internal error First query the list to confirm whether the object still exists, so as not to treat a 500 as not deleted, then retry with the traceId or contact support.

Feedback

Is this page helpful?