Deleting Service Group Members in Batches¶
Function¶
This API is used to delete service group members in batches.
URI¶
DELETE /v1/{project_id}/service-items
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID, which can be obtained by calling an API or from the console. For details, see Obtaining a Project ID. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
enterprise_project_id | No | String | Enterprise project ID, which is the ID of a project planned based on organizations. You can obtain the enterprise project ID by referring to Obtaining an Enterprise Project ID. If the enterprise project function is not enabled, the value is 0. |
fw_instance_id | No | String | Firewall ID, which can be obtained by referring to Obtaining a Firewall ID. |
Request Parameters¶
Parameter | Mandatory | Type | Description |
---|---|---|---|
X-Auth-Token | Yes | String | User token. You can obtain the token by referring to Obtaining a User Token. |
Content-Type | Yes | String | Content type. It can only be set to application/json. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
set_id | Yes | String | Service group ID, which can be obtained by calling the API for querying the service group list. Find the value in data.records.set_id (The period [.] is used to separate different levels of objects). |
service_item_ids | Yes | Array of strings | List of service group member IDs. Service group member IDs can be obtained by calling the API for querying the service group member list. Find the value in data.records.item_id (The period [.] is used to separate different levels of objects). |
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
data | Array of strings | ID list of the service group members to be deleted in batches. |
Status code: 400
Parameter | Type | Description |
---|---|---|
error_code | String | Error code. |
error_msg | String | Error description. |
Example Requests¶
Delete service group member f837f7ae-22c9-449d-a99c-4be24533e243 from service group 688faf62-20fc-4ca6-b9f9-6fbc518df5ae in project 9d80d070b6d44942af73c9c3d38e0429.
https://{Endpoint}/v1/9d80d070b6d44942af73c9c3d38e0429/service-items?fw_instance_id=7a004e79-0b8b-4679-ab20-267f3946e8ba&enterprise_project_id=default
{
"set_id" : "688faf62-20fc-4ca6-b9f9-6fbc518df5ae",
"service_item_ids" : [ "f837f7ae-22c9-449d-a99c-4be24533e243" ]
}
Example Responses¶
Status code: 200
Return value for deleting service group members in batches.
{
"data" : [ "f837f7ae-22c9-449d-a99c-4be24533e243" ]
}
Status code: 400
Bad Request
{
"error_code" : "CFW.00200005",
"error_msg" : "Object not found."
}
Status Codes¶
Status Code | Description |
---|---|
200 | Return value for deleting service group members in batches. |
400 | Bad Request |
Error Codes¶
See Error Codes.