explain why recent requests did not match any expectation
Returns a diagnostic report for recently recorded unmatched requests, including the closest-matching expectations and the per-field differences that prevented a match. An optional 'limit' in the body bounds how many unmatched requests are analysed (default 10). With 'suggestFixes' set to true, each of the five closest non-matching expectations also carries a 'suggestedFix': an RFC 6902 JSON patch of that expectation (as PUT /mockserver/retrieve?type=active_expectations returns it) that would make it match the request, the fields it patches and cannot patch, and whether the patched expectation matches. Nothing is applied: to apply a fix, patch the retrieved expectation and send it to PUT /mockserver/expectation, which updates the expectation with the same id. Values the event log redacts are never copied into a patch. With ?narrate=true the response also carries an AI-generated plain-language summary from the configured LLM backend in 'narration'.
Request
- Base URL: http://localhost:1080
- URL: http://localhost:1080/mockserver/explainUnmatched
- Auth: none declared
Query parameters
when true, and the server has llmExplainNarrationEnabled set, also ask the configured LLM backend (llmProvider) for a plain-language summary of the result, returned in 'narration' and labelled as AI-generated; the deterministic fields are returned unchanged. The prompt is redacted before it is sent. When narration is disabled, no LLM backend is configured, or the LLM fails or does not answer within llmRequestTimeoutMillis plus a 2-second grace, 'narration' says why it is unavailable instead
Request body
Response
unmatched-request explanation returned
Changes
No recorded changes to this operation across all 1 revision of this API.