import json import falcon import psycopg2.extras from falcon_swagger_ui import register_swaggerui_app from .config import DSPACE_STATISTICS_API_URL, VERSION from .database import DatabaseManager from .stats import get_downloads, get_views from .util import set_statistics_scope, validate_post_parameters class RootResource: def on_get(self, req, resp): resp.status = falcon.HTTP_200 resp.content_type = "text/html" docs_html = ( "" "" " " " " " DSpace Statistics API" " " " " f"

DSpace Statistics API {VERSION}

" f"

This site is running the DSpace Statistics API. For more information see the project's README.md or the interactive Swagger UI built into this API.

" " " "