Archived topic — some details may be out of date.
Mock servers built from saved collection examples are still supported. Postman now also has code-based mocks: JavaScript request handlers plus aconfig.yaml, stored as files in your Git repository, which you can run locally or deploy. Create one in the app, or use the Postman CLI to generate one from an OpenAPI spec, collection or dataset (postman mock generate) and run it (postman mock run). See About mocks and Create a mock.
Working with an AI coding agent? The Postman plugin can build and run mocks for you.
For current help, see the Postman docs, try the free Postman tools (no account needed), or join us on Discord.
Hi,
I am new to postman and want to use it to mock APIs to test my application. I have created three mock servers matched to three different example responses. However, all three mock servers return the same response.
In the logs of the mockup I can see that each request is processed by the correct mock server.
Here is two of my responses. The only difference is the server name, the path and query parameters are the same.
My one parameter is a very long jq filter containing spaces. Could that be an issue?
Here is the full jq parameter:
{result:{loadpoints:[.loadpoints[]|{chargePower,chargerFeatureHeating,charging,connected,vehicleName,vehicleSoc,title,phasesActive,mode,chargeRemainingDuration}],pvPower,gridPower,grid:{power:.grid.power},homePower,siteTitle,batterySoc,batteryPower,vehicles:.vehicles|map_values({title}),forecast:(if .forecast.solar then {solar:.forecast.solar|{scale,today:{energy:.today.energy},tomorrow:{energy:.tomorrow.energy},dayAfterTomorrow:{energy:.dayAfterTomorrow.energy}}} else {} end)}}
Any advice is appreciated!



