Create your first API proxy
What you'll learn
In this tutorial, you'll learn to:
- Create an API proxy.
- Configure the API proxy to send requests to an existing RESTful target server.
- Call the API proxy using cURL.
This tutorial walks you through the process of creating and configuring a simple API proxy using the Apigee Edge management UI.
The API proxy you'll create is a "hello world". When you call the API proxy with an HTTP client (we'll use the cURL tool in a terminal window), the API proxy will send the request to an existing target service that returns text in the response.
What you'll need
Create the API proxy
- Go to https://enterprise.apigee.com and log in. This is the Edge management UI.
Click APIs in the top menu.
Note: In the list of API proxies, you may already have a proxy named
helloworld. You can either delete this proxy and continue with the tutorial, or give the proxy in this tutorial a different name.
- Click the add (+) API Proxy button.
- In the Build a Proxy wizard, select Reverse proxy (most common), and click Next.
- Configure the proxy with the following:
In this field do this Proxy Name
If a proxy already exists with this name, just enter a different name, such as
Proxy Base Path
The Proxy Base Path is part of the URL used to make requests to your API. Apigee Edge uses the URL to match and route incoming requests to the proper API proxy.
Adding a version number is considered a best practice to version your API. For more information on this important topic, see Versioning Best Practices.
Be sure to use http and not https. This defines the target URL that Apigee Edge invokes on a request to the API proxy.
hello world proxy
- Click Next.
- On the Security page, select Pass through (none) as the security option, and click Next.
- On the Virtual Hosts page, click Next.
- On the Build page, make sure the test environment is selected, and click Build and Deploy.
- On the Summary page, you see an acknowledgement that your new API proxy was created successfully and deployed to your test environment.
- Click View the helloworld proxy in the editor to display the Overview page for the API proxy.
Congratulations! You've created a simple API proxy. Next you'll test it to see how it works.
Test the API proxy
You can test your
helloworld API using cURL or a web browser.
In a terminal window, run the following cURL command. Subsitute your organization name in the URL.
You can also enter the URL portion in a web browser to get a similar response.
You should see the following:
Remember that when you created your API proxy, you configured it to send the request to the "Existing API" of
http://mocktarget.apigee.net. So at this point, cURLing your new API proxy (
http://<org_name>) is the same as cURLing
http://mocktarget.apigee.net. In later tutorials, you'll see how adding policies to your API proxy changes its behavior.
Way to go! You've built a simple API proxy and tested it.
Help or comments?
- If something's not working: Ask the Apigee Community or see Apigee Support.
- If something's wrong with the docs: Send Docs Feedback
(Incorrect? Unclear? Broken link? Typo?)