Tracing and debugging API (operations)
    • Dark
      Light
    • PDF

    Tracing and debugging API (operations)

    • Dark
      Light
    • PDF

    Article Summary

    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.

    image.png

    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.

    image.png

    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.

    APIM.png


    Was this article helpful?