[api] add api to return events in json foramt
[api] add api to get avatar