Debugging APIs can be a challenge when things go wrong. A lot can go unexpectedly while the calls travel from a user application to the API gateway, through transformation engine, to the backend service, and back. Luckily, WSO2 API Cloud comes with a live Log Viewer screen and we have just released its improved version.
Whenever you want to see what’s going on under the hood of API Gateway:
1. In API Cloud, on the Configure menu, click Admin Dashboard:
2. In the API Cloud Admin Dashboard, navigate to Log Analyzer / Live Log Viewer.
3. Invoke the API that you want to troubleshoot (for example, in the Developer Portal or curl or from your application.)
The new Log Viewer:
- Has a clear visual separation of information, warning, and error messages,
- Works across all regional gateways around the globe.
- API call tracing is off by default, so you will likely not be able to get the detailed information on the actual API and response URLs, headers, and body. To get those, enable tracing before making the calls. Then turn tracing off when you are done troubleshooting.