Postman Mock Services

Number of APIs: 8

How to use this collection

This Collection demonstrates how to leverage example responses with a [mock server] in Qodex.

Please review the documentation herein to understand how Qodex's [Example Matching Algorithm] works.


Fork this collection

If you'd like to use this collection, feel free to [fork it to your own workspace]

For any suggestions, feel free to [submit a pull request]


Using request headers


Example Matching

[Setting up mock servers]

"Qodex enables you to create mock servers to assist with API development and testing. A mock server simulates the behavior of a real API server by accepting requests and returning responses. By adding a mock server to your collection and adding examples to your requests, you can simulate the behavior of a real API.

When you send a request to a mock server, Qodex matches the request to a saved example in your collection. Qodex then responds with the data you added to the example. To view existing mock servers in your workspace, select Mock Servers in the sidebar."

When leveraging mock servers, it is important to keep the example matching algorithm in mind. Each piece of this algorithm is described in Qodex's [understanding example matching article]

For more documentation and to review request/response examples, navigate to the Example Matching folder in this collection.


Dynamic mock responses

[Creating dynamic responses]

Qodex allows you to not only access Environment and Collection variables when using mock servers, you can also access data from the request to dynamically appear in the example response.

This is a very powerful feature when it comes to mocking services for developers, as it provides real-time feedback during a request/response flow, and provides lifelike behavior for API consumers that are testing the API functionality.

For more documentation and to review request/response examples, navigate to the Contextual Mock Responses folder in this collection.

  1. Contextual Mock Responses - Create user POST {{url}}/users

  2. Example Matching - Create user POST {{url}}/users

  3. Example Matching - List users GET {{url}}/users/001-234-345-456

  4. Example Matching - Update user PUT {{url}}/users/123-234-345-456

  5. Example Matching - Delete user DELETE {{url}}/users/001-234-345-456

  6. Contextual Mock Responses - User history GET {{url}}/users/history?userlast={{$randomLastName}}&userfirst={{$randomFirstName}}

  7. Contextual Mock Responses - Update user profile PUT {{url}}/users/0001-1234-2345-4567-5678

  8. Example Matching - Get user GET {{url}}/users/1235