|DataResponse * * 200: Bridge version returned * 400: Getting bridge version is not possible */ #[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['matterbridge'])] public function getMatterbridgeVersion(): DataResponse { try { $version = $this->bridgeManager->getCurrentVersionFromBinary(); if ($version === null) { return new DataResponse([ 'error' => 'binary', ], Http::STATUS_BAD_REQUEST); } } catch (WrongPermissionsException $e) { return new DataResponse([ 'error' => 'binary_permissions', ], Http::STATUS_BAD_REQUEST); } return new DataResponse([ 'version' => $version, ]); } /** * Stop all bridges * * @return DataResponse|DataResponse * * 200: All bridges stopped successfully * 406: Stopping all bridges is not possible */ #[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['matterbridge'])] public function stopAllBridges(): DataResponse { try { $success = $this->bridgeManager->stopAllBridges(); } catch (ImpossibleToKillException $e) { return new DataResponse(['error' => $e->getMessage()], Http::STATUS_NOT_ACCEPTABLE); } return new DataResponse($success); } }