Changed hardcoded API base path to a dynamic one set by the URL.