Skip to content

Batch Delete



POST /api/v1/self_built_checker/batch_delete

Overview

Batch soft delete self-built inspections.

Before You Call and Usage Steps

This API only soft-deletes the main records of matched self-built inspections, but reference cleanup uses the complete input UUIDs and is not limited by reference type (still limited to the current workspace). Therefore, you must first verify items one by one from this module's list and not mix in Rule UUIDs from other sources, such as regular monitors; even if a main record does not match, references with the same workspace UUIDs of other types may also be cleaned up, so you cannot treat true as meaning no side effects occurred. After deletion, the associated Alert Policy cache is cleared asynchronously; generated events/raw data are not deleted along with the record and cannot be restored by enabling.

Only use UUIDs from this module's list in the current workspace. If refKey is provided, it filters jointly with the UUID and is not an independent batch targeting method. Returns true, with no per-item hit/change count; an empty array or no match can also succeed, and the status/associations need to be read back for verification. For errors/timeouts, first check the current configuration state; if asynchronous dispatch fails after deletion/submission, the data may already have been persisted.

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

Body Request Parameters

Parameter Type Required Description
ruleUUIDs[*] string A non-empty string is recommended; not a function ID or other rule identifier.
Example: rul_self_example
How to obtain or enter: UUID of a single verified self-built inspection.
ruleUUIDs array Declared optional, but an array must actually be provided; if omitted, in_(None) may return 500, and refKey cannot replace the array. Recommended to be non-empty, and do not mix in rules of other types or UUIDs from other workspaces.
Allows null: False
Example: ["rul_self_example"]
How to obtain or enter: Verify each self-built inspection UUID in the current workspace one by one from this module's list.
refKey string Optional additional filter condition that matches together with each UUID; it is not a substitute for UUIDs, and you cannot operate on a collection by passing only refKey.
Allows null: False
Example: custom-healthcheck-production
How to obtain or enter: Fill in when you need to additionally verify the same business correlation key.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/self_built_checker/batch_delete' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"ruleUUIDs":["rul_self_example"]}'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content boolean true on success; does not mean every input UUID matched or was actually changed.
{
  "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
406 ft.ParameterValidationFailed Request field missing, or field value violates the declared validation conditions Parameter parsing failed Check 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.
500 ft.InternalServerError Failure such as target not selected, incorrect field shape or length, database failure, or failure to dispatch an asynchronous task after submission Internal error First read back the current rule to confirm whether it has been saved; retry after using an explicit ruleUUID in the current workspace, and provide the traceId.

Feedback

Is this page helpful?