In November 2020, the Apigee Edge API reference documentation will move to a new experience based on the Apigee integrated portal and visitors to this site will be redirected.

You are viewing the Apigee Edge API reference documentation. For the main product docs, and to search all docs, go to

Create a debug session

Resource Summary


Content Type



Debug Session,



Create a debug session

Create a debug session.

A debug session records detailed information on messages, the Flow processing, and policy execution during processing by an API proxy.

The data returned in the debug session is a single XML or JSON representation of all debug data for each message exchange. The debug data is the same as that used to generate the 'Trace' view in the edge management UI.

A debug session captures a maximum of 20 messages, or records, for a maximum for 10 minutes (by default), whichever comes first.

Debugging involves the following steps:
1. Start a debug session by creating a debug session.
2. Send a message for that deployed API proxy.
3. Retrieve the debug data associated with the debug session. The data can be fetched by issuing a GET call on the session.
4. Close the debug session. (Closing the debug session discards all the associated data).


Alternatively, you can create a debug session that captures only API calls with specific query parameters and/or HTTP headers. Filtering is particularly useful for troubleshooting. For more information, see Create a debug session with a filter.


Resource URL /organizations/{org_name}/environments/{env_name}/apis/{api_name}/revisions/{revision_number}/debugsessions

Query Parameters

Name Values Description

The user-given name of the debug session (used to retrieve the results after debugging completes).


The time in seconds after which the particular session should be discarded. Default is 600 seconds.

Header Parameters

Name Values Description

Specify the content type as application/x-www-url-form-encoded.

Request Body

org_name Mention the organization name true

env_name Mention the environment name true

api_name Mention the API name true

revision_number Mention the API revision number true

HTTP Basic

OAuth 2.0



Make a request and see the response.

Make a request and see the response.

Make a request and see the response.


Help or comments?

  • If something's not working: Ask the Apigee Community or see Apigee Support.
  • If something's wrong with the docs: Click the "Send Feedback" button.
    (Incorrect? Unclear? Broken link? Typo?)