Supported versions:
Unsupported versions:
In this step, you will create an environment and an environment group.
In Apigee, API proxies are deployed to environments, which provide isolated contexts for your proxies. Environments are organized into environment groups, which provide hostnames for all the proxies deployed to environments within the group. You must have at least one environment and at least one environment group. To learn more, see About environments and environment groups.
Create the environment first before creating the environment group. You can create an environment using the Apigee hybrid UI or using the CLI. You may want to use the UI for these steps to familiarize yourself with it.
To access the hybrid UI and add an environment, perform the following steps:
Your browser navigates to the hybrid UI main landing page:

Ensure that your hybrid-enabled organization is selected from the organization drop-down list. If it is not selected, select it from the drop-down list, as the following example shows:


The Environments view is displayed, with no environments (yet):

The New environment dialog is displayed:

My First Environment or test. Unlike the Environment
name, the Display name can include uppercase and other special
characters. For example, my-environment or test.
The Display name and the Environment name can be different.
Created
during initial installation.Apigee creates the new environment and indicates that it is Pending Provisioning:

In a few moments, it changes to provisioned:

However, you're not quite done. You also need to add your new environment to the
runtime's overrides.yaml file—but first you've got to install the runtime,
so let's not get ahead of ourselves.
To create an environment with the Create environments API, perform the following steps:
On the command line, get your gcloud authentication credentials, as the following example shows:
TOKEN=$(gcloud auth print-access-token)
To check that your token was populated, use echo, as the following example shows:
echo $TOKEN
This should display your token as an encoded string.
For more information, see gcloud command-line tool overview.
ENV_NAME (Required) is the programmatic ID for your
environment. The environment name can contain lowercase letters, dashes, and numbers and
must start with a lowercase letter. This name will be used as the identifier and cannot be
changed after creation
export ENV_NAME=ENVIRONMENT_NAME
ENV_DISPLAY_NAME (Required) is the user-friendly name
of your environment. This value does not need to be unique, and can include spaces and
special characters. For example, "My Example Environment".
ENV_DISPLAY_NAME=FRIENDLY_NAME
ORG_NAME (Required) is your organization ID. Make sure you
have defined the ORG_NAME environment variable from
Step 4: Create an organization:
echo $ORG_NAME
ENV_DESCRIPTION (Optional) is information about the
environment that you'd like to use as a reminder of its purpose. For example, "Example
environment for Apigee Hybrid instructions".
ENV_DESCRIPTION=DESCRIPTION_TEXT
POST request to the Create environments API.
The following example shows the request structure that creates an organization, using the following command:
curl -H "Authorization: Bearer $TOKEN" -X POST -H "content-type:application/json" -d '{
"name": "'"$ENV_NAME"'",
"displayName": "'"$ENV_DISPLAY_NAME"'",
"description": "'"$ENV_DESCRIPTION"'"
}' "https://apigee.googleapis.com/v1/organizations/$ORG_NAME/environments"On a successful creation request, the Environments API should respond with a message similar to the following:
{ "name": "organizations/hybrid-example/operations/c2aee040-7e79-4fd4-b0cf-79ca1b7098a8", "metadata": { "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata", "operationType": "INSERT", "targetResourceName": "organizations/hybrid-example/environments/example-env", "state": "IN_PROGRESS" } }
As the state property in the response indicates, Apigee has started to create
the new environment, so its state is IN_PROGRESS. This process can take several
minutes.
Now create an environment group and assign the environment you just created to it. Environment groups allow you to group environments together, and provide the hostnames for routing the proxies deployed to the environments within the group. You must create at least one environment group, and you must assign at least one hostname to the group. For an overview of environment groups, see About environments and environment groups.
To create an environment group using the Apigee UI, perform the following steps:
Your browser navigates to the hybrid UI main landing page.
The Environment Groups Overview view is displayed, with any created environment groups:
The Add an Environment Group dialog is displayed.
Hold the pointer over the newly-created environment group and then click Edit .
Add a hostname that all proxies deployed to environments within this group will use. This should be a domain you have management access to. If you need to register a domain, see a domain registrar like Google Domains.
To create an environment group using the command line, perform the following steps:
On the command line, get your gcloud authentication credentials, as the following example shows:
TOKEN=$(gcloud auth print-access-token)
To check that your token was populated, use echo, as the following example shows:
echo $TOKEN
This should display your token as an encoded string.
For more information, see gcloud command-line tool overview.
echo $DOMAIN
This is the hostname that all proxies deployed to environments within this group will use. This should be a domain you have management access to.
If it is not set, create it with the domain you plan to use for your Apigee hybrid installation. For example:
export DOMAIN=YOUR-DOMAIN.COM
echo $ENV_NAME
export ENV_GROUP=ENVIRONMENT_GROUP_NAME
curl -H "Authorization: Bearer $TOKEN" -X POST -H "content-type:application/json" \
-d '{
"name": "'"$ENV_GROUP"'",
"hostnames":["'"$DOMAIN"'"]
}' \
"https://apigee.googleapis.com/v1/organizations/$ORG_NAME/envgroups"
curl -H "Authorization: Bearer $TOKEN" -X POST -H "content-type:application/json" \
-d '{
"environment": "'"$ENV_NAME"'",
}' \
"https://apigee.googleapis.com/v1/organizations/$ORG_NAME/envgroups/$ENV_GROUP/attachments"
To continue with the installation, see Part 2: Hybrid runtime setup: Before you begin.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-06-11 UTC.