setup api server