Introducing Postman Mock Call Logs

Avatar

With the most recent release of Postman, we introduced call logging to ensure that mock servers generated from Postman collections are more useful. Prior to this release, you could publish a mock server from any Postman collection, but you didn’t have much visibility into exactly what was going on under the hood when making calls to each mocked server. With the new mock call logs feature, you can now see the details of the request and responses made to and from mock servers, providing you with much more insight into any API your team is designing with Postman.

Background: What are mock servers?

Before we talk more about specifically what’s available with the new mock call logs, let’s back up and do a quick refresher on what mock servers are all about. In Postman, while working with any collection of requests, you can right-click on your collection and choose to mock the collection. Postman then generates a mock server which creates a static representation of each individual API request that possesses an example response. This allows you to quickly see what an API would potentially deliver in a production instance by mocking the request and example responses provided within the Postman collection. Mock servers enable rapid development of API infrastructure without having to write code, shortening the feedback loop and allowing developers to iterate more quickly.

Mock call logs: What do you get?

With this new mock call logs feature release, you’ll now get a wealth of data regarding how each mock server is being used by Postman users in your API development process. Specifically, you’ll see the following details that can be used to inform stakeholders and move the API development conversation forward:

  • Mock URL: Mock call logs will display the URL for each mock server deployed.
  • Collection: Mock call logs will publish the collection used to generate a mock server.
  • Environment: Mock call logs will associate any environment used with a mock server.
  • Request: The successful and unsuccessful details of each request made to a mock server are logged.
  • Response: The full details and body of each response are provided as part of mock server call logs.

Mock call logs are available for mock servers via the Postman web or desktop applications, providing quick observability into how your mock servers are being used across team members and what each request contains. Mock call logs can also be searched via the desktop application, with seven days of logs remaining accessible for customers using the free version of Postman, 15 days for users on the Postman Team plan and the Postman Business plan, and 30 days for users on the Postman Enterprise plan (see the full comparison of all Postman plans).

The new mock call logs interface in the Postman app

Want to know more? Just head over to the Postman Knowledge Center to learn all about setting up a mock server or viewing mock calls using the mock call log. We also recommend that you stay tuned to the Postman Roadmap for Developers because we’re just getting started with making Postman mock servers smarter, more aware, and more useful for you.

What do you think about this topic? Tell us in a comment below.

Comment

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

3 thoughts on “Introducing Postman Mock Call Logs

    Avatar

    I can’t find a way to copy content of the request from logs. Lets say I want to share a body of the content or use diff tool to compare two requests. Its just impossible. Simple copy paste destroyes JSON structure.

    Would be great if you could add “Raw” version

    Avatar

    Why is there no way to view the raw HTTP request?

    Avatar

    Yes, An Option to copy raw HTTP Request. Will be really useful. When i try to copy Request Body . All i get to clipboard is

    (4) [{…}, {…}, {…}, {…}, {…}, …]
    0: {…}
    1:{…}
    2: {…}
    3: {…}
    Not very useful