Function getEnvironmentApi