v1

latestOpenAPI 3.0.02026-07-14330119.9 KB
Near Misses

Find near misses matching request pattern

Find at most 3 near misses for closest logged requests to the specified request pattern

post/__admin/near-misses/request-pattern

Request body

bodyPatternsobject[]

Request body patterns to match against in the <key>: { "<predicate>": "<value>" } form

cookiesobject

Cookie patterns to match against in the <key>: { "<predicate>": "<value>" } form

headersobject

Header patterns to match against in the <key>: { "<predicate>": "<value>" } form

methodstring

The HTTP request method e.g. GET

queryParametersobject

Query parameter patterns to match against in the <key>: { "<predicate>": "<value>" } form

urlstring

The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.

urlPathstring

The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.

urlPathPatternstring

The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.

urlPatternstring

The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.

Example request

{
  "bodyPatterns": [
    {
      "equalToJson": "{ \"numbers\": [1, 2, 3] }"
    }
  ],
  "headers": {
    "Content-Type": {
      "equalTo": "application/json"
    }
  },
  "method": "POST",
  "url": "/some/thing"
}

Response

Near misses matching criteria

Example response

{
  "nearMisses": [
    {
      "absoluteUrl": "http://localhost:56738/received-request/2",
      "body": "Hello world",
      "cookies": {},
      "headers": {
        "Connection": "keep-alive",
        "Host": "localhost:56738",
        "User-Agent": "Apache-HttpClient/4.5.1 (Java/1.7.0_51)"
      },
      "method": "GET",
      "url": "/received-request/2"
    }
  ]
}