API : alertes et incidents
Filtrez les alertes, obtenez-les avec explication et changez leur statut – par exemple depuis votre système de tickets. Les incidents regroupent les alertes liées.
GET /alerts
Lister les alertes · Lecture
Alertes, les plus récentes d’abord, paginées (meta.page, meta.pages, meta.total).
| Paramètre | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
status | query | open|ack|resolved|false_positive | non | filtrer par statut |
severity | query | critical|high|medium|low|info | non | filtrer par gravité |
host | query | uuid | non | un seul serveur |
since | query | date | non | à partir d’un instant (ISO 8601) |
per_page | query | integer 1–500 | non | entrées par page, 100 par défaut |
page | query | integer | non | page, 1 par défaut |
Exemple d’appel
cURL
curl -sSf "https://app.tyrosec.com/api/v1/alerts?status=open&severity=critical&per_page=2" \
-H "Authorization: Bearer $TYROSEC_TOKEN" \
-H "Accept: application/json"Python
import os
import requests
resp = requests.request(
"GET",
"https://app.tyrosec.com/api/v1/alerts",
headers={"Authorization": f"Bearer {os.environ['TYROSEC_TOKEN']}", "Accept": "application/json"},
params={"status": "open", "severity": "critical", "per_page": 2},
timeout=30,
)
resp.raise_for_status()
print(resp.json())PHP
<?php
$ch = curl_init('https://app.tyrosec.com/api/v1/alerts?status=open&severity=critical&per_page=2');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FAILONERROR => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('TYROSEC_TOKEN'), 'Accept: application/json'],
]);
$out = curl_exec($ch);
if ($out === false) { throw new RuntimeException(curl_error($ch)); }
print_r(json_decode($out, true));JavaScript
const res = await fetch("https://app.tyrosec.com/api/v1/alerts?status=open&severity=critical&per_page=2", {
headers: {
Authorization: `Bearer ${process.env.TYROSEC_TOKEN}`,
Accept: "application/json",
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(await res.json());Exemple de réponse HTTP 200
{
"data": [
{
"id": 87528,
"host_id": "4c7b9c77-df0e-4772-b28f-c4f6df3ea1ec",
"rule": "vulnerable_software",
"severity": "critical",
"title": "Lücke in litespeed-cache 6.3 (wird aktiv ausgenutzt)",
"detail": "litespeed-cache 6.3 → Update auf 6.4\nWF-demo-litespeed-6-4 (9.8) · critical\nLiteSpeed Cache: Rechteausweitung ohne Anmeldung",
"status": "open",
"incident_id": null,
"created_at": "2026-11-17T15:26:25+00:00",
"auto_note": null
}
],
"meta": {
"page": 1,
"pages": 3,
"total": 6
}
}GET /alerts/{id}
Obtenir une alerte · Lecture
Une alerte avec explication : domaine, ce qui s’est passé, prochaines étapes et quand elle est inoffensive.
| Paramètre | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | chemin | integer | oui | ID de l’alerte |
Exemple d’appel
cURL
curl -sSf "https://app.tyrosec.com/api/v1/alerts/87524" \
-H "Authorization: Bearer $TYROSEC_TOKEN" \
-H "Accept: application/json"Python
import os
import requests
resp = requests.request(
"GET",
"https://app.tyrosec.com/api/v1/alerts/87524",
headers={"Authorization": f"Bearer {os.environ['TYROSEC_TOKEN']}", "Accept": "application/json"},
timeout=30,
)
resp.raise_for_status()
print(resp.json())PHP
<?php
$ch = curl_init('https://app.tyrosec.com/api/v1/alerts/87524');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FAILONERROR => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('TYROSEC_TOKEN'), 'Accept: application/json'],
]);
$out = curl_exec($ch);
if ($out === false) { throw new RuntimeException(curl_error($ch)); }
print_r(json_decode($out, true));JavaScript
const res = await fetch("https://app.tyrosec.com/api/v1/alerts/87524", {
headers: {
Authorization: `Bearer ${process.env.TYROSEC_TOKEN}`,
Accept: "application/json",
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(await res.json());Exemple de réponse HTTP 200
{
"data": {
"id": 87524,
"host_id": "7c1b6092-482b-48d9-b40f-fb476bd98176",
"rule": "vulnerable_software",
"severity": "critical",
"title": "Lücke in magento/product-community-edition 2.4.7-p3 (wird aktiv ausgenutzt)",
"detail": "magento/product-community-edition 2.4.7-p3 → Update auf 2.4.7-p4\nGHSA-demo-x7m2-cosmicsting (9.8) · critical\nMagento: XXE ermöglicht das Auslesen beliebiger Dateien („CosmicSting“)",
"status": "open",
"incident_id": null,
"created_at": "2026-11-17T15:26:20+00:00",
"auto_note": null,
"explain": {
"area": "Schwachstellen",
"area_key": "vulnerabilities",
"what": "Installierte Software hat bekannte Sicherheitslücken, für die ein Update bereitsteht.",
"todo": [
"Update einspielen – der passende Befehl steht unter „Schwachstellen“ (Klick auf das Paket).",
"Danach Dienste neu starten bzw. Server neu booten, falls nötig."
],
"harmless": "Weniger dringend, wenn der betroffene Dienst nicht aus dem Internet erreichbar ist und nur vertrauenswürdige Nutzer Zugriff haben – einplanen sollten Sie das Update trotzdem."
}
}
}PATCH /alerts/{id}
Définir le statut d’une alerte · Écriture
Prendre en compte (ack), résoudre (resolved), marquer comme faux positif (false_positive) ou rouvrir (open).
| Paramètre | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | chemin | integer | oui | ID de l’alerte |
status | corps JSON | open|ack|resolved|false_positive | oui | nouveau statut |
Exemple d’appel
cURL
curl -sSf -X PATCH "https://app.tyrosec.com/api/v1/alerts/87524" \
-H "Authorization: Bearer $TYROSEC_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"status": "ack"}'Python
import os
import requests
resp = requests.request(
"PATCH",
"https://app.tyrosec.com/api/v1/alerts/87524",
headers={"Authorization": f"Bearer {os.environ['TYROSEC_TOKEN']}", "Accept": "application/json"},
json={"status": "ack"},
timeout=30,
)
resp.raise_for_status()
print(resp.json())PHP
<?php
$ch = curl_init('https://app.tyrosec.com/api/v1/alerts/87524');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FAILONERROR => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_POSTFIELDS => json_encode(['status' => 'ack']),
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('TYROSEC_TOKEN'), 'Accept: application/json', 'Content-Type: application/json'],
]);
$out = curl_exec($ch);
if ($out === false) { throw new RuntimeException(curl_error($ch)); }
print_r(json_decode($out, true));JavaScript
const res = await fetch("https://app.tyrosec.com/api/v1/alerts/87524", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.TYROSEC_TOKEN}`,
Accept: "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({"status": "ack"}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(await res.json());Exemple de réponse HTTP 200
{
"ok": true
}GET /incidents
Lister les incidents · Lecture
Alertes liées regroupées en incidents – par exemple toutes celles d’une IP attaquante. Au plus 500, les plus récemment actifs d’abord.
| Paramètre | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
host | query | uuid | non | un seul serveur |
open | query | boolean | non | uniquement les incidents avec alertes ouvertes |
Exemple d’appel
cURL
curl -sSf "https://app.tyrosec.com/api/v1/incidents?open=1" \
-H "Authorization: Bearer $TYROSEC_TOKEN" \
-H "Accept: application/json"Python
import os
import requests
resp = requests.request(
"GET",
"https://app.tyrosec.com/api/v1/incidents",
headers={"Authorization": f"Bearer {os.environ['TYROSEC_TOKEN']}", "Accept": "application/json"},
params={"open": 1},
timeout=30,
)
resp.raise_for_status()
print(resp.json())PHP
<?php
$ch = curl_init('https://app.tyrosec.com/api/v1/incidents?open=1');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FAILONERROR => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('TYROSEC_TOKEN'), 'Accept: application/json'],
]);
$out = curl_exec($ch);
if ($out === false) { throw new RuntimeException(curl_error($ch)); }
print_r(json_decode($out, true));JavaScript
const res = await fetch("https://app.tyrosec.com/api/v1/incidents?open=1", {
headers: {
Authorization: `Bearer ${process.env.TYROSEC_TOKEN}`,
Accept: "application/json",
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(await res.json());Exemple de réponse HTTP 200
{
"data": [
{
"id": 27169,
"host_id": "7c1b6092-482b-48d9-b40f-fb476bd98176",
"key": "ip:198.51.100.23",
"label": "Einbruch über SSH von 198.51.100.23",
"severity": "critical",
"first_seen": "2026-11-18 13:27:47+00",
"last_seen": "2026-11-18 14:54:47+00",
"alerts": 4,
"rules": [
"ssh_bruteforce",
"ssh_success_after_bruteforce",
"ssh_authorized_keys",
"cron_changed"
]
}
]
}En deux minutes, voyez ce qui se passe sur votre serveur.
Installez l'agent en une ligne de commande, attendez l'inventaire initial, c'est tout. 14 jours gratuits, jusqu'à 3 serveurs, sans carte bancaire.