set up api server