API Manager Request and Response Logging

Another great feature in the API Manager that helped us debug and trouble shoot an application without the need of any debugging code or even a code deployment. With limited write access to certain environments this makes the task of detmerining trouble spots even more difficult.

We were running into an issue with an API that we published in the Publisher Portal. We were experiencing some odd behavior with the response. The Try It Now feature is a good an easy way to quickly test an API through the API manager interface but it is not intended for debugging an application. The response was being reported as a 404 with no response body when invoking the api via the UI Try It Now in the manager.

With a simple click on Enable Request and Response Logging we were able to get some very useful insight into the issue. We quickly were able to identify in our logs what was causing the application to fail.

1. Log into the API Manager Publisher Portal

2. Select the API you wish to enable logging for request and response

logging-selection

3. Click on the resources menu item on the left.

 

logging-resources-selection

 

4. Select the resource you wish to enable request and response logging by checking the box below.

logging-resources-selection

5. That is all it takes. You will see a success message on the bottom right after checking the box. Check your logs (depending on where you write them) for the request and response data, and happy debugging.Do not forget to turn off the request and response logging when done. It could impact performance.

logging-final

Leave a reply

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

By submitting this form, you accept the Mollom privacy policy.

Related