API endpoint rewrite, work in progress