Recordings
Start recording
Mock APIs
Teams
Organisations
Data sources
Database connections
Usage
Access control
Stub Mappings
- GETGet all stub mappings
- POSTCreate a new stub mapping
- DELDelete all stub mappings
- POSTReset stub mappings
- POSTPersist stub mappings
- POSTImport stub mappings
- GETGet stub mapping by ID
- PUTUpdate a stub mapping
- DELDelete a stub mapping
- POSTFind stub mappings matching metadata
- POSTDelete stub mappings matching metadata
Requests
OpenAPI
Imports
Recordings
Start recording
Begin recording stub mappings
POST
/
v1
/
mock-apis
/
{mockApiId}
/
recordings
/
start
curl --request POST \
--url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/recordings/start \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"targetBaseUrl": "http://example.mocklab.io",
"filters": {
"urlPathPattern": "/api/.*",
"method": "GET"
},
"captureHeaders": {
"Accept": {},
"Content-Type": {
"caseInsensitive": true
}
},
"requestBodyPattern": {
"matcher": "equalToJson",
"ignoreArrayOrder": false,
"ignoreExtraElements": true
},
"extractBodyCriteria": {
"textSizeThreshold": "2048",
"binarySizeThreshold": "10240"
},
"persist": false,
"repeatsAsScenarios": false,
"transformers": [
"modify-response-header"
],
"transformerParameters": {
"headerValue": "123"
}
}'
Authorizations
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Path Parameters
The ID of the Mock API
Required string length:
5 - 10
Example:
"jjl8y"
Body
application/json
Response
200
Successfully started recording
curl --request POST \
--url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/recordings/start \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"targetBaseUrl": "http://example.mocklab.io",
"filters": {
"urlPathPattern": "/api/.*",
"method": "GET"
},
"captureHeaders": {
"Accept": {},
"Content-Type": {
"caseInsensitive": true
}
},
"requestBodyPattern": {
"matcher": "equalToJson",
"ignoreArrayOrder": false,
"ignoreExtraElements": true
},
"extractBodyCriteria": {
"textSizeThreshold": "2048",
"binarySizeThreshold": "10240"
},
"persist": false,
"repeatsAsScenarios": false,
"transformers": [
"modify-response-header"
],
"transformerParameters": {
"headerValue": "123"
}
}'