adding events endpoint of API