Add scan diff endpoint and update spec checklist.

Compare two scans by alive hosts and LLDP-derived links, then reflect completed diff milestone in technical spec.

Made-with: Cursor
This commit is contained in:
Andrey Lutsenko
2026-04-09 22:05:09 +10:00
parent ab94409a52
commit df32d43ac5
3 changed files with 81 additions and 3 deletions
+7
View File
@@ -8,6 +8,7 @@
- `POST /api/scans` - создание задания скана.
- `GET /api/scans` - список сканов.
- `GET /api/scans/{id}` - просмотр созданного задания.
- `GET /api/scans/diff?from=&to=` - сравнение двух сканов (hosts/links).
- `GET /api/scans/{id}/hosts` - результаты проверки хостов по скану.
- `GET /api/scans/{id}/ports` - результаты проверки TCP-портов по скану.
- `GET /api/scans/{id}/snmp` - результаты SNMP v2c (`sysName`, `sysDescr`, `sysObjectID`).
@@ -131,6 +132,12 @@ curl -s http://localhost:8080/api/scans/<scan_id>
curl -s http://localhost:8080/api/scans?limit=20
```
Сравнить два scan:
```bash
curl -s "http://localhost:8080/api/scans/diff?from=<scan_id_1>&to=<scan_id_2>"
```
В ответе у scan есть:
- `status`: `queued`, `running`, `done`, `failed`