Configurable API-Calls

Environment (dev/prod) and portalId can be set via ....js?portal=123&env=dev (production is default)