Tracing and debugging API (operations)
When defining your API operations for an API (definition), you can test each individually in the Azure Portal. In test tab you can select an operation, add query parameters and request headers, and hit Send – which means the request with appropriate payload (body) if necessary, headers and query parameters are sent to the backend service.
The result of the request the response will be shown in the Portal, and you can with trace inspect the inbound, backend and outbound details. The tracing is facilitated by an API Inspector tool backed into the Portal, which gives you an excellent way of debugging/tracing call to an operation in the backend service.
Besides the API Inspector, you can also enable diagnostic logs in the settings and push logging of your APIs to an Application Insights instance, or Azure Monitor, e.g. stream logging to a Log Analytics workspace.
It is a good practice to enable logging for your APIs to have a better grasp of what happens when API is called. Furthermore, there useful for debugging and troubleshooting.
Lastly, in other Azure API Management tips, we will further dive into the monitoring aspect of APIs.