setting up api