analytics: Add APIs for submitting analytics to another server.

This adds a new API for sending basic analytics data (number of users,
number of messages sent) from a Zulip server to the Zulip Cloud
central analytics database, which will make it possible for servers to
elect to have their usage numbers counted in published stats on the
size of the Zulip ecosystem.
This commit is contained in:
Tim Abbott
2019-01-30 15:39:02 -08:00
parent 8df0d95559
commit 022c8beaf5
7 changed files with 323 additions and 5 deletions

View File

@@ -18,6 +18,12 @@ v1_api_and_json_patterns = [
# Push signup doesn't use the REST API, since there's no auth.
url('^remotes/server/register$', zilencer.views.register_remote_server),
# For receiving InstallationCount data and similar analytics.
url('^remotes/server/analytics$', rest_dispatch,
{'POST': 'zilencer.views.remote_server_post_analytics'}),
url('^remotes/server/analytics/status$', rest_dispatch,
{'GET': 'zilencer.views.remote_server_check_analytics'}),
]
urlpatterns = [