getSystemConfig(); $installed = (bool)$systemConfig->getValue('installed', false); $maintenance = (bool)$systemConfig->getValue('maintenance', false); # see core/lib/private/legacy/defaults.php and core/themes/example/defaults.php # for description and defaults $defaults = new \OCP\Defaults(); $values = [ 'installed' => $installed, 'maintenance' => $maintenance, 'needsDbUpgrade' => \OCP\Util::needUpgrade(), 'version' => implode('.', \OCP\Util::getVersion()), 'versionstring' => OC_Util::getVersionString(), 'edition' => '', 'productname' => $defaults->getProductName(), 'extendedSupport' => \OCP\Util::hasExtendedSupport() ]; if (OC::$CLI) { print_r($values); } else { header('Access-Control-Allow-Origin: *'); header('Content-Type: application/json'); echo json_encode($values); } } catch (Exception $ex) { http_response_code(500); \OCP\Server::get(LoggerInterface::class)->error($ex->getMessage(), ['app' => 'remote','exception' => $ex]); }