We have an ongoing migration to move routes from the urlpatterns += patterns('zerver.views', section of zproject/urls.py, which are only available via the web, to be REST API-accessible (the routes in the same file that all use rest_dispatch) and not duplicated (we have some functions available via both interfaces right now). We don't need to move every route (e.g. the json/report_send_time type logging routes can stay web-only), but ideally everything that makes sense in the REST API should be available there and no longer appear in the old JSON style route maps.
urlpatterns += patterns('zerver.views',
In other cases, e.g. json/subscriptions/exists, we'd need to add a new HEAD users/me/subscriptions route to cover the use case.
Moving a few routes can be a great project for new contributors to get familiar with how the codebase is setup, since it generally only takes.
If you work on this, please do it with commits that are easy to read/review, e.g. moving a single route per commit, and please check carefully (e.g. using grep) that you've eliminate all references to the old route, since it's very common for bugs to be introduced in this sort of refactoring.
[Edited to remove recommendation to make multiple commits]
@timabbott I have started a PR for this. Will update it for other routes. PR #614
We've moved the legacy URLs to be removed to zproject/legacy_urls.py.