Skip to content

API REST

Endpoints

MéthodeEndpointDescription
GET/api/healthStatus du serveur
POST/api/scan/uploadScanner un ZIP
POST/api/scan/directoryScanner un répertoire
GET/api/scan/historyHistorique des scans
GET/api/scan/:scanIdRapport complet
DELETE/api/scan/:scanIdSupprimer un scan

Exemple - Health check

bash
curl http://localhost:3001/api/health
json
{
  "status": "ok",
  "version": "1.0.0",
  "service": "SAP DevSec Scanner",
  "lang": "fr"
}

Exemple - Scanner un ZIP

bash
curl -X POST http://localhost:3001/api/scan/upload \
  -F "project=@mon-projet.zip"

Exemple - Scanner un répertoire

bash
curl -X POST http://localhost:3001/api/scan/directory \
  -H "Content-Type: application/json" \
  -d '{"dirPath": "/home/user/mon-projet", "projectName": "mon-projet"}'

Structure du rapport

json
{
  "scanId": "uuid",
  "projectName": "my-fiori-app",
  "projectTypes": ["UI5", "CAP"],
  "scannedAt": "2026-06-25T10:00:00.000Z",
  "riskScore": 73,
  "riskLevel": "MEDIUM",
  "summary": {
    "critical": 0, "high": 2, "medium": 3, "low": 5
  }
}

Open-source project - Apache-2.0 license