v1

latestOpenAPI 3.0.02026-07-14330119.9 KB
Recordings

Take a snapshot recording

post/__admin/recordings/snapshot

Request body

captureHeadersobject

Headers from the request to include in the generated stub mappings, mapped to parameter objects. The only parameter available is "caseInsensitive", which defaults to false

persistboolean

Whether to save stub mappings to the file system or just return them

repeatsAsScenariosboolean

When true, duplicate requests will be added to a Scenario. When false, duplicates are discarded

transformerParametersobject

List of names of stub mappings transformers to apply to generated stubs

transformersstring[]

Parameters to pass to stub mapping transformers

Example request

{
  "captureHeaders": {
    "Accept": {},
    "Content-Type": {
      "caseInsensitive": true
    }
  },
  "extractBodyCriteria": {
    "binarySizeThreshold": "18.2 GB",
    "textSizeThreshold": "18.2 GB"
  },
  "filters": {
    "bodyPatterns": [
      {
        "equalToJson": "{ \"numbers\": [1, 2, 3] }"
      }
    ],
    "headers": {
      "Content-Type": {
        "equalTo": "application/json"
      }
    },
    "method": "POST",
    "url": "/some/thing"
  }
}

Response

Successfully took a snapshot recording

Example response

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