Debug API Operation Test


How to debug issues in an API Operation Test?



The first step to debug an API operation issue is to review the "trace" information in the test result.

1. Repeat the test on "Add new user" operation of the "First API".

2. Click "Try it" and scroll down.

3. Click "Send". You see test result displayed.

4. Click the "Trace" tab next to "Response". You see trace information displayed in JSON format.

The "Trace" information is divided into multiple sections:

  • Inbound api-inspector - request - Information about the test request fired to the API public URL.
  • Inbound api-inspector - configuration - Information about the configuration of the backend service.
  • Inbound cors - Information about CORS (cross-origin resource sharing).
  • Backend - Information about the call to the backend service. If it is empty, then the backend service is not called.
  • Outbound transfer-response - Information about transferring the response from the backend to the caller.
  • Outbound quota-by-key - Information about usage tracking of this Azure service.
  • No error - Information about how error is handled.

If the Backend section is empty, the root cause of the issue is that the default API policy did not forward the request to the backend service.

The picture below shows you steps on how to review test trace information to debug API operation issues:

API Operation - Test Trace Info for Debug
API Operation - Test Trace Info for Debug


View Policy of an API Operation

Test API Operation Request Body Examples

Making API More User Friendly

⇑⇑ Microsoft Azure API Management Tutorials

2018-03-28, 1442🔥, 0💬