Fix for taking resource and api end point dynamically