Step 5: Change the target endpoint

Stay organized with collections Save and categorize content based on your preferences.

You're viewing Apigee and Apigee hybrid documentation.
View Apigee Edge documentation.

Change your proxy's target endpoint to one that returns more meaningful data.

  1. Expand the helloworld API proxy bundle in the Apigee section and click default.xml in the targets folder to open the file in the editor.

    default.xml target endpoint file in the Apigee section

  2. Update the <URL> element to append xml to the existing URL, as shown below:
    <TargetEndpoint name="default">
  3. Select File > Save or ⌘S to save your edits.
  4. To redeploy the environment, position your cursor over the dev environment folder in the Apigee section and click Deploy icon.

    Deploy icon displays when you position the cursor over dev environment folder

  5. When prompted to select a test bundle to export, click Deploy without a test bundle since the test bundle has already been exported.

    Prompt to export test bundle

  6. Run your API in the Terminal tab.
    curl 0:8998/helloworld?apikey=ZQA5euYtNeJ7ZCGCJMpvd6F2BZOmxOzY

    The following response is returned:

    <?xml version="1.0" encoding="UTF-8"?>
        <city>San Jose</city>

In the next step, you'll add a new policy to your API.

Next step

1 2 3 4 5 (NEXT) Step 6: Attach a policy 7 8