added option to specify api endpoint for internal / offline tests