Cloud Blog

Trace API calls and responses

To effectively troubleshoot APIs you need to know how your calls get transmitted to the backend and what the backend sends back. We have made this easy with the new gateway log access and tracing mediators. Here’s how.

1. Open for editing the API that you want to trace,

2. Go to step 2 (Implement),

3. Click the Enable Message Mediation checkbox and then select the debug_ sequences from the dropdowns for all 3 flows below it as shown in the picture:

enable-debug-tracing-mediators-for-an-api

4. Click the Next: Manage button at the bottom of the screen,

5. Click Save & Publish at the bottom of the last step of the editing wizard.

6. Open the live log by clicking the Configure / Admin Dashboard menu, and then clicking Log Analyzer / Live Log Viewer in Admin Dashboard’s left-hand menu pane.

Admin Dashboard log viewer

7. Now invoke the API (for example, in the API Store‘s API Console for that API).

8. You will see detailed information on the API request and response in the log:

call-and-response-trace-in-api-gateway-log

9. When you are done troubleshooting, disable the message mediation that you enabled in step 3.

Try it in API Cloud today!

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories

Recent Posts

Most Popular Posts

Twitter Facebook LinkedIn