Step 3: Call an API proxy

This page applies to Apigee and Apigee hybrid.

View Apigee Edge documentation.

Now that you've created a new proxy, you're ready to test it by calling the proxy. If a domain name system (DNS) entry has been set up for the environment group hostname for your organization, you can call the proxy as follows:

curl https://YOUR_ENV_GROUP_HOSTNAME/myproxy

where YOUR_ENV_GROUP_HOSTNAME is the hostname for an environment group that contains the environment in which your proxy is deployed. See Find the environment group hostname.

A successful call to the proxy returns the following output:

Hello, Guest!

If the environment group hostname was set up during provisioning using a wildcard service, such as nip.io, you can call the proxy without having a DNS entry configured. For example:

curl https://IP_ADDRESS.nip.io/myproxy

In this case, the environment group hostname is IP_ADDRESS.nip.io is , where IP_ADDRESS is the IP address of the host.

If you get an error, check the following:

  • If you see a timeout error (unusual), try undeploying and redeploying the new API proxy.
  • If the host cannot be resolved, for example you receive a 404 error, double check that you are using the correct hostname and proxy name. You can find the hostname in the Apigee UI. Go to Admin > Environments > Groups to view the hostname or hostnames.
  • If you see a TLS/SSL error, such as an SSL handshake error, contact your DNS provider to make sure the DNS A record for the hostname is configured properly. Make sure the record has the IP of the load balancer that was created during Apigee provisioning. If you're not sure what the IP should be, see Determining whether the Cloud Load Balancer is configured for a hostname.
  • If you see a TLS/SSL certificate error, the SSL certificate associated with the load balancer might not have the correct hostname, and therefore is being rejected. The certificate was created during the provisioning process. The troubleshooting steps in Determining whether the Cloud Load Balancer is configured for a hostname show you how to locate and inspect the certificate.
  • If you're unable to resolve the problem, contact the person who provisioned Apigee for further assistance.

Find the environment group hostname

If you don't know the environment group hostname, you can find it as follows:

  1. In the Apigee UI, select Admin > Environments > Groups.
  2. Look for a row displaying the environment in which your proxy is deployed. For example, if the environment is test-1, the row might appear as shown below:

    Environment groups pane in the Apigee UI.

    The environment group hostname for this environment is api-test.exco.com.

In this case, the curl command to call the proxy would be:

curl https://api-test.exco.com/myproxy

In the next step, you will change the target endpoint to return XML data from the target service.

Next step

1 2 3 (NEXT) Step 4: Change the target endpoint 5