feat: Add Cortex XDR integration with data fetching and summary generation.

This commit is contained in:
jeremy bayse
2026-02-14 08:21:06 +01:00
parent 7555e6ea8c
commit 1f9d2f7875
2 changed files with 21 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Services\CortexXdrService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
class CortexXdrController extends Controller
{
@@ -23,7 +24,9 @@ class CortexXdrController extends Controller
public function getData(CortexXdrService $cortexService)
{
try {
$summary = $cortexService->getSummary();
$summary = Cache::remember('cortex_summary_data', 300, function () use ($cortexService) {
return $cortexService->getSummary();
});
return response()->json($summary);
} catch (\Exception $e) {
return response()->json(['error' => $e->getMessage()], 500);