Adding REST support for /stats.