View
Apigee Edge documentation.
This section describes how to create and edit environment groups, which includes adding environments or host names to a group, or removing them, with Apigee. For more information about what an environment group is and how it works, see Environments and environment group overview.
You can create new environment groups using the Apigee UI or the Apigee API. This section describes how to do both.
When you first create an environment group, it does not contain any environments. It does, however, define a default hostname: example.group-name. To add environments to an environment group, see Adding environments to an environment group.
To create a new environment group in the Apigee UI:
In the Google Cloud console, go to the Apigee > Management > Environments page.
Hostnames: A list of host names that can be used to call proxies. Each host name must be on a separate line.
You also have the option to click Configure Google Load Balancer with these domains. This opens the Load balancing page in the Cloud console, where you can configure load balancing for the host names.
To create a new environment group using the Apigee API, send a POST request to the
Create environment groups API. Before calling the API, be sure that you have a valid token, as described
in Obtaining an OAuth 2.0 access token.
The following example curl command shows the syntax to create a new group:
curl -i $TOKEN -X POST \ https://apigee.googleapis.com/v1/organizations/ORG_NAME/envgroups?name=new-group-name
When specifying the new group's name, you must use only lower case letters, numbers, and hyphens
(a-z, A-Z, and -). You cannot use upper case letters or any
special characters other than hyphens. You must also start the name with a lower case letter.
If you don't specify any additional parameters, this command creates a new group with no host names assigned to it.
You can also assign host names when you create the group by specifying them as an array in the body of the request.
The following example creates a new group my-group and assigns three new host names to
the new group:
curl -i $TOKEN -X POST \
https://apigee.googleapis.com/v1/organizations/org_name/envgroups?name=my-group \
-d '{ \
"hostnames": ["server1.mycompany.com", "server2.mycompany.com", "10.1.142.8"] \
}'You can later change the host names in the list by sending a PATCH request to the
Patch environment groups API.
Environments that are not in a group cannot be accessed because there is no host name associated with them. Host names are defined on the environment group, not the environment. When you create an environment using the Apigee UI in Google Cloud console, you have the option to assign the environment to an existing environment group. For more information, see Creating a new environment in the UI.
If you did not assign your environment to a group during environment creation, this section describes how to add an unassigned environment to an environment group using the Apigee UI or the Apigee API.
To add an environment to an environment group in the Apigee UI:
In the Google Cloud console, go to the Apigee > Management > Environments page.
To add a new environment to an environment group using the Apigee API, send a POST request to the
Environment group attachment API, as the following example shows:
curl -H "Authorization: Bearer $TOKEN" -X POST
"https://apigee.googleapis.com/v1/organizations/my-org/envgroups/test-group/attachments"
-d '{
"name": "my-attachment",
"environment": "test"
}'Where:
$TOKEN is set to your OAuth 2.0 access token, as described in Obtaining an OAuth 2.0 access token.The body of the request contains an instance of an EnvironmentGroupAttachment resource, which is a simple wrapper around a single environment.
If successful, the response contains details about the new attachment, including the timestamp at which it was created; for example:
{
"name": "my-attachment",
"environment": "test"
"createdAt": "42"
}You can remove an environment from an environment group with the Apigee UI or the Apigee API.
To remove an environment from an environment group in the Apigee UI:
In the Google Cloud console, go to the Apigee > Management > Environments page.
To remove an environment from an environment group using the Apigee API,
use the delete method in the
EnvironmentGroupAttachment resource to delete the attachment corresponding to
the environment.
You can delete an environment group using either the Apigee UI or the API.
To delete an environment group in the Apigee UI:
In the Google Cloud console, go to the Apigee > Management > Environments page.
To delete an environment group using the Apigee API, use the delete
method in the
EnvironmentGroup resource.
When you create a group, Apigee adds the default hostname
example.GROUP_NAME. You
can add your host names to the group using the instructions in this section.
The hostnames that you define on an environment group:
To add a host name to an environment group in the Apigee UI:
In the Google Cloud console, go to the Apigee > Management > Environments page.
To add host names to an environment group using the Apigee API, send a
PATCH request
to the Patch environment groups API. Be sure to set the updateMask parameter to
hostnames and specify the entire list of host names that you want: the value of that
field in your request replaces the existing list.
The following example sets the host names for the test environment:
curl -H "Authorization: Bearer $TOKEN" -X PATCH
"https://apigee.googleapis.com/v1/organizations/my-org/envgroups/test-group?updateMask=hostnames"
-d '{
"name": "my-hostnames",
"hostnames": [
"test-1.example.com",
"test-2.example.com",
"test-3.example.com"
]
}'Where:
$TOKEN is set to your OAuth 2.0 access token, as described in Obtaining an OAuth 2.0 access token.If the request was successful, the response contains an Operation resource.
You can call a proxy with the following command:
curl -v https://YOUR_ENV_GROUP_HOSTNAME/myproxy
where YOUR_ENV_GROUP_HOSTNAME is the hostname of an environment group
that contains the environment in which the proxy is deployed. To do so, the
Cloud Load Balancer
must be configured for the environment group hostname. Usually, the Load Balancer is configured when
Apigee is first provisioned.
To determine whether the Load Balancer is configured for the hostname:
In the Google Cloud console, go to the Apigee Management > Environments > Environment Groups page.

Click the name of the load balancer in the Name column. If Apigee was provisioned
with the Provisioning Wizard,
the name of the load balancer will be apigee-proxy-url-map. If you don't see that
name, contact the system administrator in your organization who provisioned Apigee.
When you click the name, the Load balancer details page is displayed:

If you don't find the hostname in any certificate, contact your system administrator for further assistance.
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-09 UTC.