You are viewing the Apigee Management API reference documentation. For the main product docs, and to search all docs, go to https://docs.apigee.com. For cross-site search, click Search all in the search results.

Create a Virtual Host

Resource Summary

Security

Content Type

application/json, text/xml

Category

Virtual Host,

createVHost

POST

Create a Virtual Host

Creates a virtual host.

Virtual hosts let multiple domain names connect to the same host. A virtual host on Edge defines the domains and ports on which an API proxy is exposed, and, by extension, the URL that apps use to access an API proxy. A virtual host also defines whether the API proxy is accessed by using the HTTP protocol, or by the encrypted HTTPS protocol.


The way you create a virtual host, and the requirements for creating a virtual host, depend on whether you are using Edge for the Cloud or Edge for the Private Cloud. If you are using Edge for the Private Cloud, then it also depends on which version of Edge for the Private Cloud you are using.


For example, a subset of request body properties are valid only for specific Edge for Private Cloud versions, as follows:

  • ciphers and protocols properties are valid on Edge for Private Cloud version 4.15.07 and earlier
  • properties array is valid on Edge for Private Cloud version 4.17.01 and later
  • baseUrl property is valid on Edge for Private Cloud version 4.17.05 and later
  • retryOptions and listenOptions properties are valid on Edge for Private Cloud version 4.18.01 and later
Note: As of Edge for Private Cloud version 4.16.01, you must create a host alias when you create a virtual host. Also, the combination of host alias name and port number for the virtual host must be unique for all virtual hosts in the Edge installation.

For a general introduction to creating virtual hosts, see About virtual hosts. For information about your specific version of Edge, see:

See Virtual host property reference for complete information on setting all virtual host values.


Updating a proxy to use the new virtual host



When you create a new API proxy, Edge automatically configures its ProxyEndpoint to use all available virtual hosts. If you create a new API proxy that should not be accessible over a particular virtual host, then you must edit the API proxy to remove that virtual host from its ProxyEndpoint.

If you created any API proxies before requesting the virtual host, then you must edit the API proxy to add the new virtual hosts to its ProxyEndpoint. Otherwise, the API proxy is not accessible by the virtual host.


See Configuring an API proxy to use a virtual host.

Resource URL

https://api.enterprise.apigee.com/v1 /organizations/{org_name}/environments/{env_name}/virtualhosts

Header Parameters

Name Values Description
Content-Type
(required)

Specify Content Type as either application/json or text/xml

Request Body

The request body to create a virtual host depends on whether you are using Edge for the Cloud or Edge for the Private Cloud. If you are using Edge for the Private Cloud, then it also depends on which version of Edge for the Private Cloud you are using. For a complete list of all options for the request body, see Virtual host property reference.

org_name Mention the organization name true

env_name Mention the environment name true

HTTP Basic

OAuth 2.0

API Key

Reset

Make a request and see the response.

Make a request and see the response.

Make a request and see the response.

Working...

Help or comments?

  • If something's not working: Ask the Apigee Community or see Apigee Support.
  • If something's wrong with the docs: Click the "Send Feedback" button.
    (Incorrect? Unclear? Broken link? Typo?)