Updated on 2025-11-21 GMT+08:00

Deleting Domain Groups in Batches

Function

This API is used to delete domain name groups in batches.

URI

POST /v1/{project_id}/domain-sets/batch-delete

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID, which can be obtained by calling an API or from the console. For details, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

fw_instance_id

No

String

Definition

Firewall ID, which can be obtained by referring to Obtaining a Firewall ID.

Constraints

N/A

Range

N/A

Default Value

N/A

enterprise_project_id

No

String

Definition

Enterprise project ID. If you plan enterprise projects based on your organization's plan, each enterprise project will have such an ID. After this parameter is configured, you can filter assets by enterprise project.

Constraints

N/A

Range

N/A

Default Value

0

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Constraints

N/A

Range

N/A

Default Value

N/A

Table 4 Request body parameters

Parameter

Mandatory

Type

Description

object_id

No

String

Definition

Protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. You can obtain the ID by calling the API for querying firewall instances. In the return value, find the ID in data.records.protect_objects.object_id (The period [.] is used to separate different levels of objects). If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.

Constraints

N/A

Range

32-bit UUID.

Default Value

N/A

set_ids

No

Array of strings

Definition

Domain name group ID list. A domain name ID can be obtained by calling the API for querying the domain name group list. Find the value in data.records.set_id (The period [.] is used to separate different levels of objects).

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

data

Map<String,Array<Object>>

Definition

Response to the request for deleting domain name groups in batches.

Range

N/A

Example Requests

Delete domain groups in batches. The firewall ID is fced7179-64a4-4438-bc6d-b510a2da2f64, the target protected object ID is b71922fd-3539-421c-9317-c54ebc1bc4ea, the IDs of the domain groups to be deleted are 7d772766-6c44-4fa3-a140-8ddc7eac0fc5 and e17e24d2-bd7d-4e25-993c-38559d44a571, and the project ID is 408972e72dcd4c1a9b033e955802a36b.

https://{Endpoint}/v1/408972e72dcd4c1a9b033e955802a36b/domain-sets/batch-delete

{
  "object_id" : "b71922fd-3539-421c-9317-c54ebc1bc4ea",
  "set_ids" : [ "7d772766-6c44-4fa3-a140-8ddc7eac0fc5", "e17e24d2-bd7d-4e25-993c-38559d44a571" ]
}

Example Responses

Status code: 200

OK

{
  "data" : {
    "responseDatas" : [ {
      "name" : "9",
      "id" : "7d772766-6c44-4fa3-a140-8ddc7eac0fc5"
    }, {
      "name" : "8",
      "id" : "e17e24d2-bd7d-4e25-993c-38559d44a571"
    } ]
  }
}

Status Codes

Status Code

Description

200

OK

401

Unauthorized: Request error.

403

Forbidden: Access forbidden.

404

Not Found: Web page not found.

Error Codes

See Error Codes.