Deletes sensors in your account.
You can only delete sensors with UNKNOWN status.
You can choose to provide a request body without parameters or you can specify UUIDs or filter as input parameters in the API request.
When specifying the request body:
Parameter |
Mandatory/Optional |
Data type |
Description |
---|---|---|---|
sensorDeleteRequest |
Mandatory |
string |
User filters to query sensors or provide one or more sensor UUIDs to delete. 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. |
When specifying input parameters as part of the path:
Parameter |
Mandatory/Optional |
Data type |
Description |
---|---|---|---|
sensorIds |
Optional |
array[string] |
One or more sensor UUIDs for the sensors you want to delete. When specifying multiple sensors in the same request, enter them in this way: sensorIds=value1&sensorIds=value2&sensorIds=value3, and so on. |
filter |
Optional |
string |
Filter the sensors 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. |
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/sensors" -d "{"filter":"hostname:cms"}' --header 'Authorization: Bearer <token>"
Response
Returns {
"deletionJobId": "bbaac4c7-6263-4e2f-b391-bcb032975206"
}
response code 200
In this sample, we will delete a single sensor by specifying the sensor UUID.
API request
curl -X DELETE
"<qualys_base_url>/csapi/v1.3/sensors?sensorIds=dba55718-736b-4bac-ae9a-38bb59643b45" --header "Authorization: Bearer <token>"
Response
{
"deletionJobId": "8b04c56a-33ad-44ba-a128-fc643b0af3c7"
}
In this sample, we’ll delete 2 sensors in the same request. Specify multiple sensors by entering sensorIds=value1&sensorIds=value2, and so on.
API request
curl -X DELETE
"<qualys_base_url>/csapi/v1.3/sensors?sensorIds=dba55718-736b-4bac-ae9a-38bb59643b45&sensorIds=bcd55718-736b-3bac-ae7a-34bb59644b32" --header "Authorization: Bearer <token>"
Response
{
"deletionJobId": "6e04c56a-42ad-44ba-a678-fc642b0af3c9"
}
In this sample, we will delete sensors based on the filter parameter.
API request
curl -X DELETE
"<qualys_base_url>/csapi/v1.3/sensors?filter=sensorId%3A4f97332e3a23" --header "Authorization: Bearer <token>"
Response
{
"deletionJobId": "7a93e37e-b2c6-40ac-8f18-70f87fcf3957"
}
Was this topic helpful?