Delete Containers in Your Account

Deletes containers in your account.

DELETE/v1.3/containers

You can choose to provide a request body without parameters or you can specify UUIDs or filter as input parameters in the API request.

Request Body ParametersRequest Body Parameters

When specifying the request body:

Parameter

Mandatory/Optional

Data Type

Description

containerDeleteRequest

Mandatory

-

User filters to query containers or provide one or more container UUIDs to delete.

The filter can be applied by providing a query using Qualys syntax.

Refer to the “How to Search” topic in the online help for assistance with creating your query.

Input ParametersInput Parameters

When specifying input parameters as part of the path:

Parameter

Mandatory/Optional

Data Type

Description

containerIds

Optional

array[string]

One or more container UUIDs for the containers you want to delete.

When specifying multiple containers in the same request, enter them in this way: containerIds=value1&containerIds=value2&containerIds=value3, and so on.

filter

Optional

string

Filter the containers list by providing a query using Qualys syntax.

Refer to the “How to Search” topic in the online help for assistance with creating your query.

Sample 1 - Use the request body to specify containers to deleteSample 1 - Use the request body to specify containers to delete

In this sample, a request body is used as part of the API request.

API request

    curl -X DELETE 
"<qualys_base_url>/csapi/v1.3/containers" 
-d "{"containerIds":["a6025a31-bd86-37e6-9de7-5722af586b66", "c4032e71-5969-34a9-a8a9-ba2b69729673"]}" --header "Authorization: Bearer <token>"
    

Response

    Returns {"deletionJobId":"413b076e-01a8-4780-8e62-875b615a9a1f"}
response code 200
    

Sample 2 - Delete a single container using container UUIDSample 2 - Delete a single container using container UUID

In this sample, we’ll delete a single container by specifying the container UUID.

API request

    curl -X DELETE 
"<qualys_base_url>/csapi/v1.3/containers?containerIds=77161d39-386c-35dd-85b2-a80bd86111b6" --header "Authorization: Bearer <token>"
    

Response

    {
 "deletionJobId": "951dca63-254b-4f5c-ab76-7671dd8f1528"
}
     

Sample 3 - Delete multiple containers using container UUIDsSample 3 - Delete multiple containers using container UUIDs

In this sample, we’ll delete 2 containers in the same request. Specify multiple containers by entering containerIds=value1&containerIds=value2, and so on.

API request

    curl -X DELETE 
"<qualys_base_url>/csapi/v1.3/containers?containerIds=68cc933e-4994-3d9b-8232-b1c78b3b3c9d&containerIds=4e7d40ce-6ddc-3fb7-ab55-e0b48a60208a" --header "Authorization: Bearer <token>" 
    

Response

    {
 "deletionJobId": "2b38a127-b413-4aa7-8421-61760487722c"
} 
    

Sample 4 - Delete containers using a filterSample 4 - Delete containers using a filter

In this sample, we’ll delete containers based on the filter parameter.

API request

    curl -X DELETE 
"<qualys_base_url>/csapi/v1.3/containers?filter=containerId%3A194c52ca4d31" --header "Authorization: Bearer <token>" 
    

Response

    {
 "deletionJobId": "8a47532f-4f22-46e5-b772-58f9664173fe"
}