Before starting api