[TOC]
## 接口说明
> 接口用途暂时未明。
> 原文:Take a snapshot recording.
> 接口来源:[Wiremock extension for recording stub mappings](https://github.com/MasonM/wiremock-snapshot)
## 接口定义
~~~[api]
post:/recordings/snapshot
<<<
request
{
"filters" : {
"urlPathPattern" : "/api/.*",
"method" : "GET",
"ids" : [ "40a93c4a-d378-4e07-8321-6158d5dbcb29" ]
},
"captureHeaders" : {
"Accept" : { },
"Content-Type" : {
"caseInsensitive" : true
}
},
"requestBodyPattern" : {
"matcher" : "equalToJson",
"ignoreArrayOrder" : false,
"ignoreExtraElements" : true
},
"extractBodyCriteria" : {
"textSizeThreshold" : "2 kb",
"binarySizeThreshold" : "1 Mb"
},
"outputFormat" : "FULL",
"persist" : false,
"repeatsAsScenarios" : false,
"transformers" : [ "modify-response-header" ],
"transformerParameters" : {
"headerValue" : "123"
}
}
<<<
response
{
"mappings" : [ {
"id" : "093f1027-e5e0-4921-9e6d-e619dfd5d2c7",
"name" : "recordables_123",
"request" : {
"url" : "/recordables/123",
"method" : "GET"
},
"response" : {
"status" : 200,
"body" : "{\n \"message\": \"Congratulations on your first recording!\"\n}",
"headers" : {
"Content-Type" : "application/json"
}
},
"uuid" : "093f1027-e5e0-4921-9e6d-e619dfd5d2c7",
"persistent" : true
} ]
}
~~~
## [JSON Schema](https://jsonschema.net/)
### Request JSON Schema
待补充
### Response JSON Schema
待补充
- Admin API
- Stub Mapping API
- /mappings
- GET
- POST
- DELETE
- /mappings/reset
- /mappings/{stubMappingId}
- GET
- PUT
- DELETE
- /mocklab/mappings/normal
- /mocklab/mappings/notify
- Record API
- /recordings/start
- /recordings/stop
- /recordings/status
- /recordings/snapshot
- Settings API
- /mocklab/settings
- JSON Schema
- Stub Mapping
- Stub Mappings
- Stub Mappings meta
- 官方 API 文档
- 文章模板
- API 文章模板