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.

To explore your endpoints, do the following:

  1. Select Insights from the sidebar.

  2. Select your Insights Project.

  3. Select the Endpoints tab.

  4. To see a pie chart of an endpoint's status codes, choose an endpoint and then select the error rate value.

    Insights endpoints

Review status codes

To observe a timeline of captured requests by status code for an endpoint, do the following:

  1. From your Insights Project, select the Errors tab.

  2. On an endpoint you're interested in, select Line chart icon View error details.

    View error details
  3. Change the time range to observe the error trends. Hover over an endpoint to observe the exact time the error was captured.

    Insights timeline

Review an endpoint request

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

From your Insights Project, in the Errors tab, 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 send 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.

Debug your endpoints

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.

    Note: 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 try using Postman's AI assistant Postbot to fix 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 highest proportion of requests that resulted in an error, based on the HTTP status code of the response
  • Endpoints with the highest p90 latency
  • Endpoints with the most errors, based on the HTTP status code of the response
  • Endpoints with new errors in the past day that were previously error free for 6 days, based on the HTTP status code of the response
  • 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

Last modified: 2024/10/01