control

retrieve recorded requests, active expectations, recorded expectations or log messages

put/mockserver/retrieve

Request

  • Base URL: http://localhost:1080
  • URL: http://localhost:1080/mockserver/retrieve
  • Auth: none declared

Query parameters

format'java' | 'javascript' | 'python' | 'go' | 'csharp' | 'ruby' | 'rust' | 'php' | 'json' | 'log_entries' | 'har' | 'openapi' | 'postman' | 'bruno' | 'curl'

changes response format, default if not specified is "json". Not every format is valid for every "type" - the combinations are constrained, and an inapplicable pairing is rejected: the code-generation formats ("java", "javascript", "python", "go", "csharp", "ruby", "rust", "php") apply to "recorded_expectations" and "active_expectations" only and are rejected for "requests" and "request_responses"; the export formats ("openapi", "postman", "bruno") apply to "active_expectations" only; "curl" applies to "requests" and "request_responses" only. "json", "log_entries" and "har" are unconstrained.

type'logs' | 'requests' | 'request_responses' | 'recorded_expectations' | 'active_expectations' | 'metrics'

specifies the type of object that is retrieve, default if not specified is "requests", supported values are "logs", "requests", "request_responses", "recorded_expectations", "active_expectations", "metrics"

correlationIdstring

only return entries whose log correlation id matches this value

namespacestring

tenant filter applied to "active_expectations" retrieval - returns only that namespace's expectations plus global (no-namespace) expectations. When omitted the namespace is taken from the request header named by the matchNamespaceHeader configuration property, if set; when neither is present the retrieval spans all namespaces.

fanInLocalOnlyboolean

when true serve only this node's log rather than aggregating peers. Set by peer nodes on cluster fan-in queries as an infinite-recursion guard; callers do not normally set it. Only affects "requests" and "request_responses" retrieval, and only when cluster fan-in is enabled and configured.

forwardUnmatchedTostring

arms record-and-forward for the session - subsequent requests matching no expectation are forwarded to this upstream and captured as recorded expectations, which this and later retrievals return in the requested format. Only arms recording; it does not synthesise traffic, so a retrieval made before any traffic arrives returns nothing.

consolidateboolean

only applies to "recorded_expectations" retrieval. When true, collapses recorded exchanges that share a request shape into a single reusable, unlimited-times expectation, sequencing any differing responses. Per-request opt-in; takes precedence over the deduplicateRecordedExpectations configuration property. Also implied by parameterize=true.

parameterizeboolean

only applies to "recorded_expectations" retrieval. When true, additionally generalises volatile path/query/header/body values in the consolidated expectations (implies consolidate). Per-request opt-in.

Request body

OR

Response

recorded requests or active expectations returned

Expectation[] required(unresolved $ref)
OR
OR

Changes

No recorded changes to this operation across all 1 revision of this API.