v1

latestOpenAPI 3.0.02026-07-14330119.9 KB
Recordings

Start recording

Begin recording stub mappings

post/__admin/recordings/start

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

targetBaseUrlstring

Target URL when using the record and playback API

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"
  },
  "targetBaseUrl": "http://example.mocklab.io"
}

Response

Successfully started recording