[api] add an events model

The api pulls /lastnotifications from backend and sends its own
events and the backend notifications back to the backend under