Remove agents using the Wazuh API
The request DELETE /agents removes the specified agents.
# curl -k -X DELETE "https://localhost:55000/agents?pretty=true&older_than=0s&agents_list=005,006,007" -H "Authorization: Bearer $TOKEN"
{
"data": {
"affected_items": ["005", "006", "007"],
"total_affected_items": 3,
"total_failed_items": 0,
"failed_items": [],
"older_than": "0s",
},
"message": "All selected agents were deleted",
"error": 0,
}