--- openapi: "3.0.0" servers: - url: "https://api.enterprise.apigee.com/v1" info: title: "Environments API" description: "By default, Apigee organizations are provisioned with two environments:\ \ `test` and `prod`. An environment provides a runtime execution context for APIs.\ \ An API revision must be deployed to an environment before it can be accessed\ \ at runtime. No constraints are placed on the usage between different environments\ \ (`test` versus `prod`, for example). Developers are free to implement and enforce\ \ any type or testing, promotion, and deployment procedures that suit their development\ \ lifecycle." version: "1.0" security: - Basic: [] - OAuth: [] paths: /organizations/{org_name}/environments: post: tags: - "Environment" summary: "Create environment" description: "Creates an environment in an existing organization.\n\n**Notes**:\n\ * **Apigee Edge for Private Cloud only**. If you are using Apigee Edge for\ \ Public Cloud, contact Apigee Support for assistance.\n* **This API cannot\ \ be executed using the Try this API panel**.\n\n\nAfter you create the environment,\ \ you must:\n\n* Associate the environment with one or more Message processors.\ \ See Associate an environment with a Message Processor. \n* Enable analytics\ \ on the environment. See Enable analytics for an environment.\n\nEdge provides scripts and other\ \ tools that you can use as an alternative to making API calls directly. For\ \ example, see Creating an organization, environment, and virtual host." operationId: "createEnvironment" parameters: - $ref: "#/components/parameters/org_name" responses: "201": description: "Created" content: application/json: schema: $ref: "#/components/schemas/Environment" "400": description: "Bad request" requestBody: description: "Environment details." content: application/json: schema: $ref: "#/components/schemas/Environment" get: tags: - "Environment" summary: "List environments" description: "Lists all environments in an organization. By default, an Apigee\ \ organization contains two environments: `test` and `prod`\n\n**Note**: The\ \ portal environment is available for configuring custom\ \ domains on the integrated portal. See Customize your domain. " operationId: "listEnvironments" parameters: - $ref: "#/components/parameters/org_name" responses: "200": description: "OK" content: application/json: schema: type: "array" items: type: "string" "400": description: "Bad request" /organizations/{org_name}/environments/{env_name}: post: tags: - "Environment" summary: "Update an environment" description: "Updates an existing environment.\n\n**Notes**:\n* **Apigee Edge\ \ for Private Cloud only**. If you are using Apigee Edge for Public Cloud,\ \ contact Apigee Support for assistance.\n* **This API cannot be executed\ \ using the Try this API panel**.\n* If you have set properties on the environment\ \ and want to update one or more of those properties, you must pass all properties\ \ to the API, even if they are not being changed. To get the current list\ \ of properties for the environment, use the Get environment details. " operationId: "updateEnvironment" parameters: - $ref: "#/components/parameters/org_name" - $ref: "#/components/parameters/env_name" responses: "200": description: "OK" content: application/json: schema: $ref: "#/components/schemas/Environment" "400": description: "Bad request" delete: tags: - "Environment" summary: "Delete an environment" description: "Deletes an environment.\n\n**Notes**:\n* **Apigee Edge for Private\ \ Cloud only**. If you are using Apigee Edge for Public Cloud, contact Apigee\ \ Support for assistance.\n* **This API cannot be executed using the Try this\ \ API panel**.Deletes an environment, \n\nYou can only delete an environment\ \ after you have:\n\n* Deleted all virtual hosts in the environment. See Delete a virtual host.\n\n* Disassociated the environment from all Message\ \ Processors. See Disassociate an environment from a Message Processor.\n\n* Cleaned up\ \ analytics. See Remove analytics information about an environment." operationId: "deleteEnvironment" parameters: - $ref: "#/components/parameters/org_name" - $ref: "#/components/parameters/env_name" responses: "200": description: "OK" content: application/json: schema: $ref: "#/components/schemas/Environment" "400": description: "Bad request" get: tags: - "Environment" summary: "Get Environment Details" description: "Gets environment details, including:\n\n* UNIX times at which\ \ the environment was created and last modified\n* Email address of the Apigee\ \ user who created and last modified the environment\n* List of property names\ \ and values that are reserved for use by Apigee" operationId: "getEnvironment" parameters: - $ref: "#/components/parameters/org_name" - $ref: "#/components/parameters/env_name" responses: "200": description: "OK" content: application/json: schema: $ref: "#/components/schemas/Environment" "400": description: "Bad request" /organizations/{org_name}/environments/{env_name}/servers: post: tags: - "Environment" - "API Proxy" - "Servers" summary: "Associate or disassociate an environment and a Message Processor" description: "Associates or disassociates an environment and a Message Processor.\n\ \ \n \n**Notes**:\n* **Apigee Edge for Private Cloud only**. If you are using\ \ Apigee Edge for Public Cloud, contact Apigee Support for assistance.\n*\ \ **This API cannot be executed using the Try this API panel**.\n\n**Associate\ \ an environment with a Message Processor**\n\nAfter you create an environment, you must associate it with one or more Message\ \ Processors. You must call this API for each Message Processor associated\ \ with the environment. \n\nTo call the API, you need the UUID of the Message\ \ Processor. Use the following cURL command to obtain that UUID:\n\n`curl\ \ http://:8082/v1/servers/self`\n\nWhere `` is the IP address\ \ of the Message Processor.\n\n**Disassociate an environment from a Message\ \ Processor**\n\nBefore you can delete an environment, you must disassociate it from all Message Processors.\ \ You must call this API for each Message Processor associated with the environment.\ \ \n\nTo determine the list of Message Processor UUIDs associate with the\ \ environment, use Get servers associated with an environment.\n\nThe request\ \ body must contain:\n```\naction=remove&uuid={MP_UUID}\n````\n\nwhere `MP_UUID`\ \ is the UUID of the Message Processor. For example, in a cURL command, the\ \ request would appear as:\n\n```\ncurl -X POST http://:8080/v1/organizations/{org_name}/environments/{env_name}/servers\ \ -d \"action=remove&uuid=MP_UUID\" \\\n -H \"Content-Type:application/x-www-form-urlencoded\"\ \ \\\n -u sysAdminEmail:pWord \n \n```\n \n\nwhere `MS_IP` is the IP address\ \ or DNS name of the Edge Server." operationId: "associateDisassociateEnvironmentMP" parameters: - $ref: "#/components/parameters/org_name" - $ref: "#/components/parameters/env_name" responses: "200": description: "OK" "400": description: "Bad request" get: tags: - "Environment" - "API Proxy" - "Servers" summary: "List servers associated with an environment" description: "Lists the UUIDs of the Message Processors associated with the\ \ environment.\n\n**Notes**:\n* **Apigee Edge for Private Cloud only**. If\ \ you are using Apigee Edge for Public Cloud, contact Apigee Support for assistance.\n\ * **This API cannot be executed using the Try this API panel**." operationId: "listServersEnvironment" parameters: - $ref: "#/components/parameters/org_name" - $ref: "#/components/parameters/env_name" responses: "200": description: "OK" content: application/json: schema: type: "array" items: type: "string" "400": description: "Bad request" components: securitySchemes: Basic: type: "http" scheme: "basic" description: "Multi-factor authentication is not supported." OAuth: type: "apiKey" name: "Authorization" in: "header" description: "For OAuth, enter the following in the Key field: Bearer %your-token%\ \ (see https://docs.apigee.com/api-platform/system-administration/using-oauth2#get-the-tokens)" parameters: org_name: in: "path" name: "org_name" required: true schema: type: "string" description: "Organization name." env_name: in: "path" name: "env_name" required: true schema: type: "string" description: "Environment name." schemas: Environment: description: "Environment details." type: "object" required: - "name" properties: createdAt: format: "int32" description: "Output only. Time the environment was created in milliseconds\ \ since epoch." type: "integer" createdBy: description: "Output only. Email address of the admin that created the environment." type: "string" description: type: "string" description: "Description of the environment." lastModifiedAt: format: "int32" description: "Output only. Time the environment was last modified in milliseconds\ \ since epoch." type: "integer" lastModifiedBy: description: "Output only. Email of admin that last modified the environment." type: "string" name: description: "Name of the environment. Valid characters include: `a-zA-Z0-9._\\\ -$ %`." type: "string" properties: description: "List of properties that can be used to customize the environment." type: "object" properties: property: description: "Environment property names and values." type: "array" items: type: "object" properties: name: description: "Name of property." type: "string" value: description: "Set to `\"true\"` to enable or `\"false\"` to disable\ \ the property." type: "string" example: createdAt: 1394486446988 createdBy: "noreply_admin@apigee.com" displayName: "myorg" lastModifiedAt: 1590113466345 lastModifiedBy: "admin@example.com" name: "test" properties: property: - name: "useSampling" value: 100 - name: "samplingThreshold" value: 100000