v1

latestOpenAPI 3.0.02026-07-14330119.9 KB
Near Misses

Find near misses matching specific request

Find at most 3 near misses for closest stub mappings to the specified request

post/__admin/near-misses/request

Request body

absoluteUrlstring

The full URL to match against

bodystring

Body string to match against

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

urlstring

The path and query to match exactly against

Example request

{
  "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"
}

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"
    }
  ]
}