View message data with the Debug view

This pageapplies toApigee andApigee hybrid.

View Apigee Edge documentation.

What you'll learn

In 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 this tutorial, do the following:

  • Ensure thatcurl is installed on your machine to make API calls from the command line.
  • Complete the steps inBefore you begin.
  • Add a SpikeArrest policy to your proxy. The SpikeArrest policy is a policy that restricts the number of requests that can be sent to your API proxy. Your proxy must have at least onepolicy.

View message data

The Debug view in the Apigee Proxy Editor lets you view headers, variables, objects, and other details such as response time in the API proxy request and response flow. The Debug view also lets you see how a request or response changes as it is processed by an API proxy. For a more detailed description of the debug view, seeUsing Debug.

This page describes how to use the Debug view to see what happens when the SpikeArrest policy rate is exceeded.

Note: The Debug Tool is available in the Google Cloud console, the Classic UI, and some debug actions can be performed using the API as described in the following tabs. The Google Cloud console options are Debug v2 (new) and Debug v1 (released07/01/2022). You can switch between versions of the Debug Tool in the Google Cloud console and the Classic UI.

Apigee Cloud console

Debug v2 (new)

To use the Debug view in the Cloud console UI to see what happens when the SpikeArrest policy rate is exceeded:

  1. In the Google Cloud console, go to theProxy development> API Proxies page.

    Go to API Proxies

  2. Be sure that your organization name is selected from the project picker in the Google Cloud console pane. The organization name is the same as your Google Cloud project name.
  3. Click the name of the API proxy you want to debug.
  4. Click theDevelop tab.
  5. Click thePolicies > SpikeArrest policy.
  6. In the edit pane, changeRate to1pm.
  7. ClickSave.This will allow you to see both successful and failed (over the limit) API calls.
  8. Deploy the updated proxy.
  9. Click theDebug tab.
  10. ClickStart debug session.

    In the dialog:

    1. Select theEnvironment in which you want to run the debug session.
    2. (Optional) From theFilter list, select a filter to apply to all transactions in the debug session you are creating. The default isNone (All transactions), which includes all transactions in the debug data.

      For information on using filters, see Using filters in a debug session. For information about the built-in filters, seeUsing predefined filters.

    3. ClickStart.
  11. Call the API proxy usingcurl (or with the URL in a web browser) several times until you see at least one200 response and one429 response in theTransactions pane.

    Click for larger image view.Status 200 and 439 in debug view.Note: The HTTP status code for exceeding the rate limit is429 Too many requests.
  12. Click a429 transaction. In theTransaction map pane, this displays a flow diagram including a SpikeArrest policy with an error icon.

    Click for larger image view.Transaction with status 429 displayed in Transaction map.
  13. Click theerror icon. TheError Properties pane is displayed.

    Click for larger image view.Details of SpikeArrest policyerror.

You can click thePrevious andNext buttons to move between steps in the flow and see the details of each step.

To download the entire debug session as a single document, clickDownload Session. A debug session is deleted within 24 hours of the time it is completed, so if you want to view the session after that time, you need to download it before then.

Debug v1

  1. On theDevelop tab of the API Proxy, edit the Spike Arrest policy's<Rate> to be1pm again, thenSave the proxy. This will allow you to see both successful and failed (over the limit) API calls.
  2. In the Proxy Editor, click theDebug tab.
  3. ClickStart Debug Session.
  4. In the dialog:

    1. Select theEnvironment in which you want to run the debug session.
    2. (Optional) From theFilter drop-down list, select a filter to apply to all transactions in the debug session you are creating. The default isNone (All transactions), which includes all transactions in the debug data.

      For information on using filters, seeUsing filters in a debug session. For information about the built-in filters, seeUsing predefined filters.

    3. ClickStart.
  5. Call the API proxy again usingcurl (or with the URL in a web browser) several times until you see at least one200 response and one429 response in the left-hand pane.

    Status 200 and 439 in debug view.

    Note: The HTTP status code for exceeding the rate limit is429 Too many requests.
  6. Click the429 transaction in the left-hand pane. This displays aGantt chart for the transaction in the right-hand pane.

    Transaction with status 429 displayed in Gantt chart.

    Note that there is a row for the Spike Arrest policy, which is displayed with an error icon.

  7. Click the row labeledError. This displays the error details to the right of the chart. The picture below shows theProperties section of the error details:

    Details of Spike Arrest error.

You can click theBack andNext buttons below the Gannt chart to move between steps in the flow and see the details of each step.

To download the entire debug session as a single document, clickDownload Session. A debug session is deleted within 24 hours of the time it is completed, so if you want to view the session after that time, you need to download it before then.

Classic UI

  1. On theDevelop tab of the API proxy, edit the Spike Arrest policy's<Rate> to be1pm again, thenSave the proxy. This will allow you to see both successful and failed (over the limit) API calls.
  2. In the Proxy Editor, click theDebug tab.
  3. UnderStart a debug session, select the environment to which your proxy is deployed.
  4. ClickStart Debug Session.
  5. Call the API proxy again usingcurl (or with the URL in a web browser) until you see at least one200 response and one429 response in theDebug Transactions pane.

    curl -v https://YOUR_ENV_GROUP_HOSTNAME/my-proxy

    whereYOUR ENV_GROUP_HOSTNAME is the environment group hostname. See Find the environment group hostname.

    A200 response and a429 response are shown below.

    Debug session in the Apigee UI with a 200 response and a 429 response.

    Note: The default HTTP status code for exceeding the rate limit is429 Too many requests.

    If you want the status code to be different (500, for example) for all Spike Arrest policies used in an organization, a property needs to be set on your organization. If you're a Cloud customer, contactGoogle Cloud Customer Care to set that property.

  6. Click the200 transaction in the leftTransactions pane. Its Debug detail is loaded in the main window underTransaction Map, which shows a request/response diagram. The Spike Arrest icon is in the request flow.
  7. In the flow diagram, click thecircle icon in the response, the furthest one to the right (shown in the following diagram).

    ThePhase 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.

  8. Now look at an error in Debug.

    Click the429 transaction 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-shapederror icon to the right of the Spike Arrest icon, and look at the spike arrest violation details in thePhase Details pane.

    Spike arrest error

You can click theBack andNext 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 clickingDownload Debug Session.

For more information, seeUsing Debug.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.