Add GET /export endpoint, which dumps important tables in json.

Meant to be used in tandem with the manage.py import command.
The following sensitive data is scrubbed:

  * user api keys
  * user password hashes
  * stream email keys
  * invite-only streams
  * messages from invite-only streams
  * messages from users from other domains

(imported from commit 8e58dcdcb80ef1c7127d3ab15accf40c6187633f)
This commit is contained in:
Jonathan Dahan 2015-08-18 11:32:56 -07:00
parent 7784fb9758
commit ddd6ee9988

View file

@ -416,6 +416,7 @@ Client._register('update_message', method='PATCH', url='messages', make_request=
Client._register('get_messages', method='GET', url='messages/latest', longpolling=True) Client._register('get_messages', method='GET', url='messages/latest', longpolling=True)
Client._register('get_events', url='events', method='GET', longpolling=True, make_request=(lambda **kwargs: kwargs)) Client._register('get_events', url='events', method='GET', longpolling=True, make_request=(lambda **kwargs: kwargs))
Client._register('register', make_request=_mk_events) Client._register('register', make_request=_mk_events)
Client._register('export', method='GET', url='export')
Client._register('deregister', url="events", method="DELETE", make_request=_mk_deregister) Client._register('deregister', url="events", method="DELETE", make_request=_mk_deregister)
Client._register('get_profile', method='GET', url='users/me') Client._register('get_profile', method='GET', url='users/me')
Client._register('get_streams', method='GET', url='streams', make_request=_kwargs_to_dict) Client._register('get_streams', method='GET', url='streams', make_request=_kwargs_to_dict)