Migrate remaining web-only routes to be API routes #611

timabbott opened this Issue Mar 31, 2016 · 2 comments


None yet

2 participants

timabbott commented Mar 31, 2016 edited

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.

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

@timabbott timabbott referenced this issue in zulip/zulip-android Apr 7, 2016

Implement Mute topics #42

@timabbott timabbott added this to the 2016 roadmap milestone Apr 29, 2016
@timabbott timabbott added area/misc and removed area/misc labels Oct 14, 2016
@timabbott timabbott modified the milestone: Zulip roadmap, Old roadmap Nov 18, 2016

We've moved the legacy URLs to be removed to zproject/legacy_urls.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment