Step 8: Deploy and call a sample proxy

This page applies to Apigee and Apigee hybrid.

View Apigee Edge documentation.

What you're doing in this step

Follow the steps below to create and deploy a test API proxy. Finally, test the API proxy by sending an HTTP request to it.

Create and deploy an API proxy

The provisioning process for Apigee does not automatically create and deploy an API proxy for you. You must create and deploy a proxy manually.

Apigee UI in the Cloud console

To create and deploy your first proxy:

  1. Open the Apigee UI in Cloud console in a browser.
  2. Be sure that your organization name is selected from the dropdown menu in the upper left corner of the UI. The organization name is the same as your Google Cloud project name.
  3. In the left navigation pane, click Proxy development > API proxies.
  4. Click + Create.

    The Create a proxy page will open.

  5. In the Proxy template box, select Reverse proxy (most common).
  6. In Step 1: Proxy details, configure your proxy with the following values:
    Parameter name Value
    Proxy name hello-world
    Base path /hello-world
    Target (Existing API) mocktarget.apigee.net
  7. Click Next.
  8. In Step 2: Policies, under Security: Authorization select Pass through (no authorization).
  9. Click Next.
  10. In Step 3: Deploy (optional), select the environment in which to deploy the proxy, then click OK.
  11. Click Create.

    Your new API proxy is created and deployed in the selected environment.

  12. The Proxy summary page for your newly created proxy will display. A green check mark under Status indicates that the proxy was successfully deployed. If the proxy is not deployed, see Deploying an API proxy and follow the steps to deploy it manually.
  13. In the left navigation pane, select Management > Environments > Environment Groups.
  14. Copy the hostname for your environment group. You'll use this hostname to call the API proxy in the next steps.

Apigee UI

To create and deploy your first proxy:

  1. Sign in to the Apigee UI.
  2. Be sure that your organization name is selected from the dropdown menu in the upper left corner of the UI. The organization name is the same as your Google Cloud project name.
  3. Click API Proxies in the main view.
  4. From the Select Environment drop-down list, select an environment.
  5. Click Create new.
  6. Click Reverse proxy (most common).
  7. In the Proxy details page, configure your proxy with the following values:
    Parameter name Value
    Name hello-world
    Base path /hello-world
    Target (Existing API) https://mocktarget.apigee.net
  8. Click Next.
  9. In the Common policies page, under Security: Authorization select Pass through (no authorization).
  10. Click Next.
  11. On the Summary page, under Optional Deployment, select the environment in which to deploy the proxy.
  12. Click Create and deploy.

    Your new API proxy is created and deployed in the selected environment.

  13. Click Go to proxy list. A green check mark under Status indicates that the proxy was successfully deployed. If the proxy is not deployed, see Deploying an API proxy and follow the steps to deploy it manually.
  14. In the left navigation pane, select Admin > Environments > Groups.
  15. Copy the hostname for your environment group. You'll use this hostname to call the API proxy in the next steps.

Call the proxy with internal access

If you allowed internal access in Step 7: Configure access routing, follow the instructions in: Calling an API proxy with internal-only access.

Call the proxy with external access

If you allowed external access in Step 7: Configure access routing, follow these steps:

  1. Set up a DNS entry for your host. Here are two ways to accomplish this task:
    • At your registrar, create an A record pointing your environment group hostname to the IP shown on the wizard page under Configure DNS. For example, if your hostname is sales.example.com and the IP is 10.23.0.2, then point the record for sales.example.com to the address 10.23.0.2.
    • Use Google Cloud DNS to map a URL to an IP address.
  2. Test the API proxy by sending the following request in a terminal window:
    curl -v -H "Host:YOUR_ENV_GROUP_HOSTNAME" \
      https://YOUR_INSTANCE_IP_OR_DNS/hello-world

    Where:

    • The value of the Host header (YOUR_ENV_GROUP_HOSTNAME) is the hostname that you defined on the environment group in Step 6: Create an environment.

    A successful request returns the string: Hello, Guest!. If your request is not successful, see Troubleshooting.

Next steps