This is the documentation for Wazuh 3.9. Check out the docs for the latest version of Wazuh!

Remove agents using the Wazuh API

The request DELETE /agents removes the specified agents.

# curl -u foo:bar -k -X DELETE -d '{"ids":["005","006","007"]}' "https://127.0.0.1:55000/agents?pretty&purge"
{
    "error": 0,
    "data": {
        "msg": "All selected agents were removed",
        "affected_agents": [
            "005",
            "006",
            "007"
        ]
    }
}