From 33c3b84d0fa9e9b931f336de1a642eac66074c99 Mon Sep 17 00:00:00 2001 From: cynfo3000 Date: Sat, 28 Feb 2026 09:04:38 +0100 Subject: [PATCH] README: Agent-API-Beispiele ergaenzt (list, get, system, delete, hub, exec) --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 5cc1df9..311fe45 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,35 @@ curl -sk -H "X-API-Key: KEY" -X POST \ # Im Browser: https://backend-ip:10001/ ``` +### Agent-Beispiele + +```bash +# Alle Agents auflisten (ID, Name, IP, Version, letzter Heartbeat) +curl -sk -H "X-API-Key: KEY" \ + https://backend:8443/api/v1/agents + +# Einzelner Agent mit Systemdaten +curl -sk -H "X-API-Key: KEY" \ + https://backend:8443/api/v1/agents/AGENT_ID + +# Nur Systemdaten (Hardware, CPU, RAM, Disks, Services, etc.) +curl -sk -H "X-API-Key: KEY" \ + https://backend:8443/api/v1/agents/AGENT_ID/system + +# Agent loeschen +curl -sk -H "X-API-Key: KEY" -X DELETE \ + https://backend:8443/api/v1/agents/AGENT_ID + +# Hub-Status (verbundene Agents, aktive Tunnel) +curl -sk -H "X-API-Key: KEY" \ + https://backend:8443/api/v1/hub/status + +# Remote-Command ausfuehren +curl -sk -H "X-API-Key: KEY" -X POST \ + https://backend:8443/api/v1/agents/AGENT_ID/exec \ + -d '{"command":"uptime","timeout":30}' +``` + ### Update-Beispiele ```bash