Q: How can I trigger a configured Mock Response for a digiRunner API using Postman?
(Keywords: API Testing, Mocking, Postman, digiRunner, dgr_mock_test, Bypass Backend)
A: If you have already configured a mock response body for your API within the digiRunner console, you can easily test it without hitting the actual backend service by using a specific request header.
To force digiRunner to return the mock data, simply add the following header to your request in Postman (or any other API client):
Header Key: dgr_mock_test
Header Value: true
How it works:
When digiRunner detects that the dgr_mock_test header is set to true, it will automatically bypass the actual backend service and immediately return the mock response body you configured in the console.