Construct base api and controller env