This page applies to Apigee and Apigee hybrid.
View
Apigee Edge documentation.
An Apigee API proxy has two endpoints: a proxy endpoint and a target endpoint. The proxy endpoint is the client interface. It receives requests from clients and sends responses back to clients. The target endpoint is the API producer interface. It communicates from Apigee to an API producer, such as a backend service or API. To learn more about endpoints, see What is an API proxy?
In this step, you will change the API proxy's target endpoint to https://mocktarget.apigee.net/xml, a resource that
returns test XML data. After making the change, you will redeploy and test the revised API proxy.
In the Google Cloud console, go to the Apigee > Proxy development > API proxies page.
- Make sure the same Google Cloud project where you created the API proxy is selected from the dropdown at the top of the page.
- In the proxies table, select the proxy myproxy, which you created in Step 1: Create an API proxy.
- Click the Develop tab.
Explore the Develop view
In the left-hand pane of the Develop view, you can:
- Search for text in the proxy in the Search proxy field.
- Add new policies.
- Add proxy and target endpoints.
- Add other resources.
If you don't want to view the left-hand pane, you can collapse it by clicking the
close button
.
The right-hand pane of the Develop view displays the visual and text editors for the proxy:
- The visual editor provides a graphical view of the request and response flow.
- The text editor lets you edit the XML for the proxy or target.

Notes:
- You can click and drag the divider between the two editors up or down to expand the display area of either editor.
- You can expand the display area of the visual editor by clicking the toggle button on the right side of the text editor, which closes the text editor pane. Click the toggle button again to re-open the text editor pane.
Change the target endpoint
To change the target endpoint of the proxy:
- In the Proxy revision pane, select Target Endpoints > default.

This displays a diagram of the target endpoint in the visual editor:

Below the visual editor, the XML code for the target endpoint is displayed in the text editor:

In the text editor, change the
<URL>tohttps://mocktarget.apigee.net/xml. (Append "/xml" to the existing URL.)The new URL is shown below:
... <HTTPTargetConnection> <Properties/> <URL>https://mocktarget.apigee.net/xml</URL> </HTTPTargetConnection> ...
- Click the arrow next to Save at the top right of the Proxy Editor, and select Save as new revision.
- To deploy your changes, click Deploy.
- In the Deploy dialog, select the revision and environment in which to deploy, and click Deploy.
Test the proxy
To test the API proxy revision, call the proxy just as you did in Call an API proxy.
This time, the mocktarget endpoint returns XML in the body of the response:
<?xml version="1.0" encoding="UTF-8"?> <root> <city>San Jose</city> <firstName>John</firstName> <lastName>Doe</lastName> <state>CA</state> </root>
Now that the API proxy returns XML data, in the next step you will add a policy that converts XML to JSON.
1 2 3 4 (NEXT) Step 5: Add a policy