use confgurable API endponts

Allows confguring API to use.