made api endpoint configurable