automationRunStorage = $automationRunStorage; $this->automationStorage = $automationStorage; $this->runLogController = $runLogController; } public static function getRequestSchema(): array { return [ 'id' => Builder::integer()->required(), ]; } public function handle(Request $request): Response { $runId = absint($request->getParam('id')); $automationRun = $this->automationRunStorage->getAutomationRun($runId); if (!$automationRun) { throw Exceptions::automationRunNotFound($runId); } $automation = $this->automationStorage->getAutomation($automationRun->getAutomationId()); if (!$automation) { throw Exceptions::automationNotFound($automationRun->getAutomationId()); } $result = $this->runLogController->getAutomationRunData($automation, $automationRun); return new Response($result); } }