Enable or disable CrowdSec-based protection against malicious IP addresses for your virtual machine (VM). This helps protect your server from attacks by automatically blocking known malicious IPs.
path.vmid vmid integer · min: 1 required
Example: 10000 Unique vmid identifier
Accept Example Content-Type Example enable_protection boolean required
· Example: false data object required data.fail_count integer required
· Example: 0 data.ips array<string> required
· Example: ["192.0.0.1"] data.message string required
· Example: Protection disabled for 1 IPs Human-readable message.
data.protection_active boolean required
· Example: false data.results array<object> required
· Example: [{"ip":"192.0.0.1","success":true,"message":"IP address added to opt-out list"}] data.results[].ip string required
· Example: 192.0.0.1 data.results[].message string required
· Example: IP address added to opt-out list Human-readable message.
data.results[].success boolean required
· Example: true True for successful responses.
data.success_count integer required
· Example: 1 data.total_ips integer required
· Example: 1 requestId string required
· Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba Unique request identifier (UUID).
success boolean required
· Example: true True for successful responses.
timestamp string required
· Example: 2026-02-10T00:00:00.000Z ISO 8601 timestamp (UTC).
https://cloud.hostup.se/api/vm/{vmid}/crowdsec curl -X POST "https://cloud.hostup.se/api/vm/10000/crowdsec" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enable_protection": false
}' {
"success": true,
"timestamp": "2026-02-10T00:00:00.000Z",
"requestId": "2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba",
"data": {
"ips": [
"192.0.0.1"
],
"results": [
{
"ip": "192.0.0.1",
"success": true,
"message": "IP address added to opt-out list"
}
],
"protection_active": false,
"total_ips": 1,
"success_count": 1,
"fail_count": 0,
"message": "Protection disabled for 1 IPs"
}
} {
"enable_protection": false
}