Alpha feature

Debug with Postman Insights

Postman Insights enables you not only to monitor the health of your services but also to debug your production issues. You can observe your endpoints over time and pinpoint the failures. Then, you can curate failing endpoints, fix the errors, and then keep monitoring these collections.

Explore your endpoints

The Postman Insights Agent watches your API traffic to automatically populate your endpoints inside your Insights Project. You can search and sort your endpoints, and filter them by host, method, category, or status code. To share your filtered results, copy and send the URL of your filtered page.

Select the error rate value to see a pie chart of an endpoint's status codes.

Insights endpoints

You can select View endpoint details Timeline icon to observe a timeline of captured requests by status code. In the graph, select a status code to hide its detail and review the timeline of the status code you're interested in.

Insights timeline

Debug your endpoints

Postman Insights enables you to drill into individual endpoints to observe and debug errors at the request level.

From your Insights Project, select an endpoint with errors.

Drill into an endpoint

The endpoint opens in a new tab.

Insights request

The Insights Agent prefills the data for you from the observed traffic, eliminating the need to check the code or documentation to find the following elements, which are needed to execute the request:

  • The request method types - The types of action you want the API to perform.
  • Query parameters - Sent with your requests using the URL box and the Params tab.
  • Path variables - Form part of the request URL, and are referenced using placeholders preceded by : as in this example: /v2/services/:service.
  • Headers - Provide more metadata about the operation you are performing.
  • Body - Enables you to specify the data you need to send with a request.
  • Response - Gives you several tools to help you understand the response quickly. You can view the body in one of four views: Pretty, Raw, Preview, and Visualize.
  • Environments - Variables you can use to call the same request against different servers, such as local, stage, or production.

To debug one or more endpoints, do the following:

  1. Select the endpoints and save them to a collection. For more information, see Curate your endpoints.

    You can also test your endpoint without saving it to a collection. Creating a collection enables you to organize your work and keep examples of responses in one place.

  2. Select the endpoint from your collection.

  3. Select Send to check the error response message.

    Error response
  4. In the response pane, select Save as example to capture the error response.

  5. Make appropriate updates to your request and send it again.

  6. Save your 200 response as example. Now your collection has examples of both types of responses.

    Saved responses
  7. Return to your Insights Project to check the endpoint graphs and stats.

The updates you make will depend on the type of error message shown in the response. To correct your endpoint, for example, you can send requests using test data at a non-production level. Use the Environments selector to set your test environment. Learn more about setting up environment variables.

You can also ask Postman's AI assistant Postbot for help fixing the error.

Monitor your endpoints

With a curated endpoint collection you can specify a list of endpoints you'd like to track, enabling you to catch errors before your users do.

The Endpoints tab returns a list of error categories for endpoints, selectable from a dropdown list:

  • Endpoints with the most errors, based on the HTTP status code of the response
  • Endpoints with the highest proportion of requests that resulted in an error, based on the HTTP status code of the response
  • Endpoints with new errors in the past day for endpoints that were previously error free for 6 days, based on the HTTP status code of the response
  • Endpoints with the highest p90 latency
  • Slowest endpoints
Endpoints tab

Use the time range selector to get the level of detail you need.

Time range selector

If you select a 14-day time range, the graph overlays errors from the previous week over the errors captured in the past seven days. Check each selection to observe the difference in errors between the captures.

Error comparison

Expand the endpoint to observe error status codes, how many times they occurred, and the last time they were seen.

Endpoint errors

The Errors tab displays per-endpoint error states in a chronological order as well as a graphical representation of the seven-day trend.

Errors tab

Last modified: 2024/08/26