API: alertas e incidentes
Filtre alertas, obténgalas con explicación y cambie su estado, por ejemplo desde su sistema de tickets. Los incidentes agrupan alertas relacionadas.
GET /alerts
Listar alertas · Lectura
Alertas, las más recientes primero, paginadas (meta.page, meta.pages, meta.total).
| Parámetro | Ubicación | Tipo | Obligatorio | Descripción |
|---|---|---|---|---|
status | query | open|ack|resolved|false_positive | no | filtrar por estado |
severity | query | critical|high|medium|low|info | no | filtrar por gravedad |
host | query | uuid | no | solo un servidor |
since | query | date | no | desde un momento (ISO 8601) |
per_page | query | integer 1–500 | no | entradas por página, por defecto 100 |
page | query | integer | no | página, por defecto 1 |
Ejemplo de llamada
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());Ejemplo de respuesta 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}
Obtener una alerta · Lectura
Una alerta con explicación: área, qué ocurrió, próximos pasos y cuándo es inofensiva.
| Parámetro | Ubicación | Tipo | Obligatorio | Descripción |
|---|---|---|---|---|
id | ruta | integer | sí | ID de la alerta |
Ejemplo de llamada
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());Ejemplo de respuesta 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}
Cambiar el estado de una alerta · Escritura
Confirmar (ack), resolver (resolved), marcar como falso positivo (false_positive) o reabrir (open).
| Parámetro | Ubicación | Tipo | Obligatorio | Descripción |
|---|---|---|---|---|
id | ruta | integer | sí | ID de la alerta |
status | cuerpo JSON | open|ack|resolved|false_positive | sí | nuevo estado |
Ejemplo de llamada
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());Ejemplo de respuesta HTTP 200
{
"ok": true
}GET /incidents
Listar incidentes · Lectura
Alertas relacionadas agrupadas en incidentes, por ejemplo todas las de una IP atacante. Como máximo 500, los activos más recientes primero.
| Parámetro | Ubicación | Tipo | Obligatorio | Descripción |
|---|---|---|---|---|
host | query | uuid | no | solo un servidor |
open | query | boolean | no | solo incidentes con alertas abiertas |
Ejemplo de llamada
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());Ejemplo de respuesta 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"
]
}
]
}Vea en dos minutos lo que ocurre en su servidor.
Instale el agente con un solo comando, espere al primer inventario y listo. 14 días gratis, hasta 3 servidores, sin tarjeta de crédito.