---
title: "POST /v1/{+parent}/environments"
method: POST
path: "/v1/{+parent}/environments"
tags: ["organizations"]
---

# POST /v1/{+parent}/environments

`POST /v1/{+parent}/environments`

Creates an environment in an organization.

## Path parameters

- `parent` string, required

## Query parameters

- `name` string

## Request body

- GoogleCloudApigeeV1Environment
  - `type` 'ENVIRONMENT_TYPE_UNSPECIFIED' | 'BASE' | 'INTERMEDIATE' | 'COMPREHENSIVE' — Optional. EnvironmentType selected for the environment.
  - `deploymentType` 'DEPLOYMENT_TYPE_UNSPECIFIED' | 'PROXY' | 'ARCHIVE' — Optional. Deployment type supported by the environment. The deployment type can be set when creating the environment and cannot be changed. When you enable archive deployment, you will be **prevented from performing** a [subset of actions](/apigee/docs/api-platform/local-development/overview#prevented-actions) within the environment, including: * Managing the deployment of API proxy or shared flow revisions * Creating, updating, or deleting resource files * Creating, updating, or deleting target servers
  - `forwardProxyUri` string — Optional. URI of the forward proxy to be applied to the runtime instances in this environment. Must be in the format of {scheme}://{hostname}:{port}. Note that the only supported scheme is "http". The port must be supplied. To remove a forward proxy setting, update the field to an empty value. Note: At this time, PUT operations to add forwardProxyUri to an existing environment fail if the environment has nodeConfig set up. To successfully add the forwardProxyUri setting in this case, include the NodeConfig details with the request.
  - `properties` GoogleCloudApigeeV1Properties — Message for compatibility with legacy Edge specification for Java Properties object in JSON.
    - `property` GoogleCloudApigeeV1Property[] — List of all properties in the object
      - `name` string — The property key
      - `value` string — The property value
  - `createdAt` string, int64 — Output only. Creation time of this environment as milliseconds since epoch.
  - `lastModifiedAt` string, int64 — Output only. Last modification time of this environment as milliseconds since epoch.
  - `clientIpResolutionConfig` GoogleCloudApigeeV1EnvironmentClientIPResolutionConfig — Configuration for resolving the client ip.
    - `headerIndexAlgorithm` GoogleCloudApigeeV1EnvironmentClientIPResolutionConfigHeaderIndexAlgorithm — Resolves the client ip based on a custom header.
      - `ipHeaderName` string — Required. The name of the header to extract the client ip from.
      - `ipHeaderIndex` integer — Required. The index of the ip in the header. Positive indices 0, 1, 2, 3 chooses indices from the left (first ips) Negative indices -1, -2, -3 chooses indices from the right (last ips)
  - `name` string — Required. Name of the environment. Values must match the regular expression `^[.\\p{Alnum}-_]{1,255}$`
  - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'ACTIVE' | 'DELETING' | 'UPDATING' — Output only. State of the environment. Values other than ACTIVE means the resource is not ready to use.
  - `description` string — Optional. Description of the environment.
  - `apiProxyType` 'API_PROXY_TYPE_UNSPECIFIED' | 'PROGRAMMABLE' | 'CONFIGURABLE' — Optional. API Proxy type supported by the environment. The type can be set when creating the Environment and cannot be changed.
  - `nodeConfig` GoogleCloudApigeeV1NodeConfig — NodeConfig for setting the min/max number of nodes associated with the environment.
    - `minNodeCount` string, int64 — Optional. The minimum total number of gateway nodes that the is reserved for all instances that has the specified environment. If not specified, the default is determined by the recommended minimum number of nodes for that gateway.
    - `maxNodeCount` string, int64 — Optional. The maximum total number of gateway nodes that the is reserved for all instances that has the specified environment. If not specified, the default is determined by the recommended maximum number of nodes for that gateway.
    - `currentAggregateNodeCount` string, int64 — Output only. The current total number of gateway nodes that each environment currently has across all instances.
  - `displayName` string — Optional. Display name for this environment.
  - `hasAttachedFlowHooks` boolean

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/apigee.md) · [All operations](https://skmtc.net/google/apis/apigee/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/apigee/versions/6e272fa448a7/schema)
