SSH Monitor aktualisieren
Aktualisiert einen SSH Monitor und/oder ändert den Status.
PATCH /api/ssh-monitors/:sshMonitorPublicId
Authentifizierung
Erfordert eine gültige Session.
- Header:
Authorization: Bearer <token>
Parameter
sshMonitorPublicId(Pfad, erforderlich): Öffentliche UUID des SSH Monitors.
Request Body
Alle Felder sind optional.
{
"name": "Bastion Host (Primary)",
"hostname": "ssh.example.com",
"port": 22,
"status": "paused",
"checkInterval": 60,
"timeoutSeconds": 30,
"allowedCheckCountryCodes": ["de", "us"],
"sshConfig": {
"username": "root",
"privateKey": "-----BEGIN OPENSSH PRIVATE KEY-----..."
}
}Hinweise
statusakzeptiertactive,maintenance,disabled,paused,inactive.pausedundinactivewerden zudisablednormalisiert.allowedCheckCountryCodeswird zu Uppercase ISO Codes normalisiert (z.B.DE,US). Leere Listen werden zunull.- SSH Config kann als
sshConfigoder alsconfig(Alias) übergeben werden. Wenn keiner der Keys vorhanden ist, bleibt die gespeicherte Config unverändert. - Nutzer mit Rolle
readonlykönnen nurstatusändern.
cURL
curl -X PATCH "https://YOUR_DOMAIN/api/ssh-monitors/44444444-4444-4444-8444-444444444444" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "disabled"
}'Response
{
"id": 300,
"organizationId": 1,
"customerId": 10,
"name": "Bastion Host (Primary)",
"hostname": "ssh.example.com",
"port": 22,
"status": "disabled",
"checkInterval": 60,
"timeoutSeconds": 30,
"notificationEmail": null,
"notificationPhoneNumber": null,
"lastCheckedAt": "2026-02-26T12:00:00.000Z",
"createdAt": "2026-02-26T12:00:00.000Z",
"updatedAt": "2026-02-26T12:01:00.000Z",
"config": {
"username": "root"
},
"sshConfig": {
"username": "root"
}
}Errors
400SSH Monitor Public ID (UUID) erforderlich / ungültige Felder401Unauthorized403Forbidden (readonly darf nurstatusändern; global supporters dürfen nicht updaten)404Not found