:original_name: DeleteCaptureTask.html
.. _DeleteCaptureTask:
Delete capture task
===================
Function
--------
Delete capture task
URI
---
POST /v1/{project_id}/capture-task/batch-delete
.. table:: **Table 1** Path Parameters
========== ========= ====== ===========
Parameter Mandatory Type Description
========== ========= ====== ===========
project_id Yes String Project ID
========== ========= ====== ===========
.. table:: **Table 2** Query Parameters
+-----------------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Parameter | Mandatory | Type | Description |
+=======================+===========+========+================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+
| fw_instance_id | Yes | String | Firewall instance ID, which is automatically generated after a CFW instance is created. You can obtain the ID by calling the API used for querying a firewall instance. For details, see the API Explorer and Help Center FAQ.By default, if fw_instance_Id is not specified, information about the first firewall under the account is returned. If fw_instance_Id is specified, information about the firewall with this fw_instance_Id is returned.If object_Id is specified, information about the firewall with this object_Id is returned by default. If both fw_instance_Id and object_Id are specified, the specified object_Id must belong to the specified firewall. |
+-----------------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| enterprise_project_id | No | String | Enterprise project id, the id generated by the enterprise project after the user supports the enterprise project, which can be obtained by calling the ListFirewallList. |
+-----------------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Request Parameters
------------------
.. table:: **Table 3** Request header parameters
+--------------+-----------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| Parameter | Mandatory | Type | Description |
+==============+===========+========+====================================================================================================================================================+
| X-Auth-Token | No | String | User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. |
+--------------+-----------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------+
.. table:: **Table 4** Request body parameters
========= ========= ================ =======================
Parameter Mandatory Type Description
========= ========= ================ =======================
task_ids Yes Array of strings delete capture task dto
========= ========= ================ =======================
Response Parameters
-------------------
**Status code: 200**
.. table:: **Table 5** Response body parameters
+-----------+---------------------------------------------------------------+------------------------------+
| Parameter | Type | Description |
+===========+===============================================================+==============================+
| data | :ref:`IdObject ` object | delete capture task response |
+-----------+---------------------------------------------------------------+------------------------------+
.. _deletecapturetask__response_idobject:
.. table:: **Table 6** IdObject
========= ====== ===========
Parameter Type Description
========= ====== ===========
id String ID
name String name
========= ====== ===========
Example Requests
----------------
Delete the packet capture task from project ID 09bb24e6fe80d23d2fa2c010b53b418c and firewall id ebf891cd-2163-48a0-9963-6309f99dd3c4, and the packet capture task ID is 24e6bb6d-d335-48fd-b9c7-bbaaa851d209.
.. code-block::
https://{Endpoint}/v1/09bb24e6fe80d23d2fa2c010b53b418c/capture-task/batch-delete?fw_instance_id=ebf891cd-2163-48a0-9963-6309f99dd3c4&enterprise_project_id=default
{
"task_ids" : [ "24e6bb6d-d335-48fd-b9c7-bbaaa851d209" ]
}
Example Responses
-----------------
**Status code: 200**
delete capture task response
.. code-block::
{
"data" : {
"id" : "ebf891cd-2163-48a0-9963-6309f99dd3c4",
"name" : "test"
}
}
Status Codes
------------
=========== ============================
Status Code Description
=========== ============================
200 delete capture task response
=========== ============================
Error Codes
-----------
See :ref:`Error Codes `.