In this blog we will learn about Postman mock server. Postman have this unique feature of mock servers that allow developers to simulate an endpoint without the need of actually spinning up a back-end server.Postman has now included a new feature to help you even further.This new feature allows you to set mock responses.This feature is called Examples. We will see how to use them below.
To get the x-mock-response-id or in that matter even x-mock-response-name you need to make certain Postman API calls. The Postman API endpoints help you integrate Postman within your development toolchain.You need a valid api-key to send requests to those Postman API's. Please follow my blog to see step by step process to register and get an API key.Also, in that blog you will see how to grab x-mock-response-name and x-mock-response-id which are used in request below Postman Get API key and retrieve collection details
Postman uses it's own algorithm. I have put the link to their official website in "Official Documenation" section below. But i will explain the algorithm in simpler way but not in as detail as Postman ofcourse.
If you want to learn how to configure multiple responses for same response status code, how to use Wildcards etc refer my blog Postman-Advanced
For full documentation you can refer official Postman website Official Postman website -mocking with API