Step 10: Deploy an API proxy

Now that you've configured Google Cloud and the Apigee UI, and installed and configured the runtime, you're ready to see how it all works together.

1. Create a new API proxy using the Apigee UI

This section describes how to create a new API proxy in the UI by using the API Proxy Wizard.

To create a simple API proxy using the API Proxy Wizard:

  1. Open Apigee UI in a browser.
  2. Select your organization from the dropdown menu in the upper left corner.
  3. Select Develop > API Proxies in the main view.
  4. Click Create New.The API Proxy Wizard starts.
  5. Select Reverse proxy (most common).

    The Proxy details view is displayed.

  6. Configure your proxy with the following settings:
    • Proxy Name: Enter "myproxy". The remaining steps in this section assume that this is your proxy's ID.
    • Proxy Base Path: Automatically set to "/myproxy". The Proxy Base Path is part of the URL used to make requests to your API. Edge uses the URL to match and route incoming requests to the proper API proxy.
    • (Optional) Description: Enter a description for your new API proxy, such as "Testing Apigee hybrid with a simple proxy".
    • Target (Existing API): Enter "https://mocktarget.apigee.net". This defines the target URL that Apigee invokes on a request to the API proxy. The mocktarget service is hosted at Apigee and returns simple data. It requires no API key or access token.

    Your API proxy's details should look like the following:

  7. Click Next.
  8. On the Policies screen, select Pass through (no authorization) as the security option.
  9. Click Next.
  10. On the Summary screen, select an environment to deploy your proxy to and click Create and Deploy.

    Hybrid generates the proxy (sometimes referred to as the proxy bundle):

  11. Click Go to proxy list.

    Apigee displays the Proxies view, which displays a list of API proxies. Your new proxy should display with a green status indicator, meaning that it has been deployed.

2. Call the API proxy

When the UI indicates your proxy is deployed, you can try calling it using cURL or the REST client of your choice. For example:

  1. Make sure your DOMAIN environment variable is set to the domain name you used for the hostname for your environment group in Project and org setup - Step 3: Create an environment group.
    echo $DOMAIN
  2. Find the external IP address and port of the Apigee ingress gateway with the following command:

    kubectl get svc -n apigee -l app=apigee-ingressgateway

    Your output should look something like:

    NAME                                        TYPE           CLUSTER-IP    EXTERNAL-IP     PORT(S)                                      AGE
    apigee-ingressgateway-prod-hybrid-37a39bd   LoadBalancer   192.0.2.123   233.252.0.123   15021:32049/TCP,80:31624/TCP,443:30723/TCP   16h
  3. Export your external IP and port to variables:
    export INGRESS_IP_ADDRESS=EXTERNAL_IP_ADDRESS
    export INGRESS_PORT=PORT_NUMBER
  4. Call the API proxy:
    curl  -H Host:$DOMAIN --resolve \
      $DOMAIN:$INGRESS_PORT:$INGRESS_IP_ADDRESS  \
      https://$DOMAIN:$INGRESS_PORT/myproxy -k

    For example:

    curl  -H Host:example.com --resolve example.com:443:233.252.0.123 https://example.com:443/myproxy -k

To learn more about building and deploying API proxies, see Build your first proxy overview.