ALIEN-519 Java and javascript API updated for deployment with environment (WIP, NOT STABLE)