viewing Apigee X documentation.
View Apigee Edge documentation.
What you'll learn
Through this tutorial, you'll learn to:
- See the response message's headers and body content.
- See error messages.
What you'll need
- Before you begin, you must complete the steps in Overview and prerequisites.
- At least one policy in your proxy.
curlinstalled on your machine to make API calls from the command line.
View message data
The API proxy Debug tool lets you view headers, variables, objects, and other details such as response time in the API proxy request and response flow. The Debug tool also lets you see how a request or response changes as it is processed by an API proxy.
- On the Develop tab of the API proxy, edit the Spike Arrest policy's
<Rate>to be 1pm again, then Save the proxy. This will allow us to see both successful and failed (over the limit) API calls.
- In the API proxy editor, click the Debug tab.
- Under Start a trace session, select the environment to which your proxy is deployed.
- Click Start Debug Session.
Call the API proxy again using
curl(or with the URL in a web browser) until you see at least one
200response and one
429response in the Debug Transactions pane.
curl -v -k https://$EXTERNAL_IP/myproxy
$EXTERNAL_IPis the IP address of the external load balancer. This IP address is exposed to the internet. For more information, see Configure routing.
- Click the
200transaction in the left Transactions pane. Its Debug detail is loaded in the main window under Transaction Map, which shows a request/response diagram. The Spike Arrest icon is in the request flow.
- In the flow diagram, click the circle icon in the response, the
furthest one to the right (shown in the following diagram).
The Phase Details pane shows the data available at that point in the flow. If you scroll through that pane, you'll see the HTTP response headers and body content.
- Now look at an error in Debug.
429transaction in the Transactions pane. In the main editor window, you see a flow diagram with items in the request only, including a Spike Arrest icon with a red exclamation point indicating an error.
Click the small tube-shaped error icon to the right of the Spike Arrest icon, and look at the spike arrest violation details in the Phase Details pane.
You can click the Back and Next buttons in the flow diagram to move between points in the flow and see the Debug details.
If you want to see the entire Debug session as a single document, download it by clicking Download Debug Session.
For more information, see Using the Debug tool.