Zum Inhalt springen

Bitdefender API & Automatisierung

Experte20 min
BitdefenderAPIAutomatisierung

Nutzen Sie die GravityZone REST API für Automatisierung, SIEM-Integration und PowerShell-Skripte.

1. API Grundlagen

GravityZone API

Die GravityZone API basiert auf JSON-RPC 2.0 über HTTPS. Alle Aktionen, die in der Console möglich sind, können auch per API durchgeführt werden.

API Endpunkte

Cloud:
https://cloud.gravityzone.bitdefender.com/api/v1.0/jsonrpc
On-Prem:
https://[VA-IP]/api/v1.0/jsonrpc

Authentifizierung

HTTP Basic Auth mit API Key

Authorization: Basic [base64(apiKey:)]

2. API Key erstellen

  1. 1GravityZone Console → My Account
  2. 2Reiter API Keys öffnen
  3. 3Add → Name vergeben → Permissions auswählen
  4. 4API Key sicher speichern (wird nur einmal angezeigt!)
Sicherheitshinweis
Erstellen Sie separate API Keys für verschiedene Integrationen. Vergeben Sie nur die minimal notwendigen Rechte.

3. API Beispiele

Alle Endpoints abrufen

curl -X POST "https://cloud.gravityzone.bitdefender.com/api/v1.0/jsonrpc/network" \
  -H "Authorization: Basic [API_KEY_BASE64]" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "getEndpointsList",
    "params": {
      "parentId": "[COMPANY_ID]",
      "page": 1,
      "perPage": 100
    },
    "id": 1
  }'

Scan auf Endpoint starten

curl -X POST "https://cloud.gravityzone.bitdefender.com/api/v1.0/jsonrpc/network" \
  -H "Authorization: Basic [API_KEY_BASE64]" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "createScanTask",
    "params": {
      "targetIds": ["[ENDPOINT_ID]"],
      "type": 1,
      "name": "API Quick Scan"
    },
    "id": 2
  }'

Endpoint isolieren

curl -X POST "https://cloud.gravityzone.bitdefender.com/api/v1.0/jsonrpc/network" \
  -H "Authorization: Basic [API_KEY_BASE64]" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "createIsolateEndpointFromNetworkTask",
    "params": {
      "endpointId": "[ENDPOINT_ID]"
    },
    "id": 3
  }'

4. PowerShell Integration

PowerShell Helper-Modul

# GravityZone API Helper Functions

$GZApiUrl = "https://cloud.gravityzone.bitdefender.com/api/v1.0/jsonrpc"
$ApiKey = "YOUR_API_KEY"

function Invoke-GZApi {
    param([string]$Service, [string]$Method, [hashtable]$Params)
    
    $auth = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$ApiKey:"))
    $body = @{
        jsonrpc = "2.0"
        method = $Method
        params = $Params
        id = (Get-Random)
    } | ConvertTo-Json -Depth 10
    
    $response = Invoke-RestMethod -Uri "$GZApiUrl/$Service" \
        -Method POST \
        -Headers @{Authorization = "Basic $auth"} \
        -Body $body -ContentType "application/json"
    
    return $response.result
}

# Beispiel: Alle Endpoints abrufen
$endpoints = Invoke-GZApi -Service "network" -Method "getEndpointsList" \
    -Params @{parentId = "[COMPANY_ID]"; page = 1; perPage = 100}

# Beispiel: Offline Endpoints finden  
$endpoints.items | Where-Object { $_.isManaged -eq $false } | 
    Select-Object name, lastSeen

5. SIEM Integration

Splunk

  • • Bitdefender Add-on für Splunk
  • • Syslog-Forward an HEC
  • • Vorgefertigte Dashboards

Elastic SIEM

  • • Filebeat mit GZ-Modul
  • • REST API Polling
  • • JSON-Log-Export

Microsoft Sentinel

  • • Data Connector verfügbar
  • • CEF-Format via Syslog
  • • Analytics Rules Templates

Syslog Forward

  • • Console → Configuration → Syslog
  • • TCP/UDP auf Port 514
  • • CEF oder LEEF Format

6. Automatisierungs-Szenarien

Auto-Isolation bei kritischen Alerts

API-Polling → Bei Severity=Critical → automatisch isolieren

Daily Health Report

Täglicher Report: Offline Endpoints, veraltete Signaturen, offene Incidents

ServiceNow Integration

Automatisch Tickets erstellen bei Security Incidents

Compliance Reporting

Wöchentlicher Export für Audit-Dokumentation

API-Integration Unterstützung

Benötigen Sie Hilfe bei der API-Integration? Thalvos Cloud entwickelt maßgeschneiderte Automatisierungen.

Projekt besprechen →

API Dokumentation

Offizielle Bitdefender API Docs:

API Reference →