Send Docs Feedback

Known issue: If this topic doesn't fully load, change the URL to http instead of https. Your actual API call will still securely use https.

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 2 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 120 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?