+ /**
+ * Retrieve version number.
+ *
+ * @ApiDoc()
+ *
+ * @deprecated Should use info endpoint instead
+ *
+ * @return JsonResponse
+ */
+ public function getVersionAction()
+ {
+ $version = $this->container->getParameter('wallabag_core.version');
+ $json = $this->get('jms_serializer')->serialize($version, 'json');
+
+ return (new JsonResponse())->setJson($json);
+ }
+
+ /**
+ * Retrieve information about the wallabag instance.
+ *
+ * @ApiDoc()
+ *
+ * @return JsonResponse
+ */
+ public function getInfoAction()
+ {
+ $info = [
+ 'appname' => 'wallabag',
+ 'version' => $this->container->getParameter('wallabag_core.version'),
+ 'allowed_registration' => $this->container->getParameter('wallabag_user.registration_enabled'),
+ ];
+
+ return (new JsonResponse())->setJson($this->get('jms_serializer')->serialize($info, 'json'));
+ }
+