# This script will login and create an environment with an application. It depends on helpers in the helpers
# script as well as host and login information found in apiHostInfo and loginCredentials, respectively.
eval $(cat loginCredentials)
# When deciding which application to place the environment in we simply choose the first application found. You are
# encouraged to modify this to suit your needs. Please see get_application_id in helpers for more information.
echo "* creating environment 'newEnv' in application '$APPLICATION_ID'..."
curl $SSL_CERT -X POST -H ''"$AUTH_HEADER"'' -H 'Content-Type: application/json' -H 'Accept: application/json' --data @- $MASKING_ENGINE/environments <<EOF