TargetServers API
Apigee Edge enhances the availability of your API by providing built-in support for load balancing and failover across multiple backend server instances. TargetServer configurations decouple concrete endpoint URLs from TargetEndpoint configurations.
Resource Types
TargetServer
Method | Endpoint | Description |
---|---|---|
post | /organizations/{org_name}/environments/{env_name}/targetservers | Creates a TargetServer in the specified environment. TargetServers are used to decouple TargetEndpoint HTTPTargetConnections from concrete URLs for backend services. An HTTPConnection can be configured to use a LoadBalancer that lists one or more TargetSevers. Using TargetServers, you can create an HTTPTargetConnection that calls a different backend server based on the environment where the API proxy is deployed. See also Load balancing across backend servers. For example, instead of the following configuration:
You can reference a TargetServer as follows:
You can then set up a TargetServer called When you promote the API proxy with this configuration from the |
delete | /organizations/{org_name}/environments/{env_name}/targetservers/{targetserver_name} | Deletes a TargetServer configuration from an environment. Note: The deletion of a TargetServer can fail if it is referenced by a currently deployed API proxy. Before deleting a TargetServer, check to make sure that it's not referenced by any API proxies that are currently deployed. |
get | /organizations/{org_name}/environments/{env_name}/targetservers/{targetserver_name} | Gets TargetServer details. |
put | /organizations/{org_name}/environments/{env_name}/targetservers/{targetserver_name} | Modifies an existing TargetServer. (You can also modify TargetServers in the Edge UI, as described in Load balancing across backend servers.) For example, use this method to toggles a TargetServer configuration from enabled to disabled. This is useful when TargetServers are used in load balancing configurations, and one or more TargetServers need to taken out of rotation periodically. You could also use this API to modify the hostname of an enabled TargetServer. Note: When |