[TOC]
## 接口说明
> 扩展接口:埋点录制同步、异步请求数据的存储接口。
> 调用方:被测系统。
## 接口定义
~~~[api]
post:/mocklab/mappings/normal
*string:url=/users/add#request.url = 请求URL
*method=POST#request.method = 请求方法
object:headers#request.headers = 请求头
object:body#request.body = 请求正文
int:status=200#response.status = 响应状态码
object:headers#response.headers = 响应头
*object:body#response.body = 响应正文
*string:transID=c95fb9eb40bc449c87b5cbfb5c774e79#metadata.record.transID = 事务ID(仅用于异步请求)
<<<
request
{
"request": {
"url": "/interface/request",
"method": "POST",
"headers": {
"Cache-Control": "no-cache",
"Connection": "keep-alive"
},
"body": {
"PLAIN": {
"ID": "6666",
"ENCODE": "UTF-8",
"REQ_BODY": "043F46913407BE7A0413AE5B45C897053A3586384D47B67AF57F41310479A50B45234FAB13FC125102C1F0899399D4F6977D406F310342904673955ECF32E0B2A3403CC3C5C9AD4577A0CA71FA4BB9089C2D196A4B4B27F2DC85667DBD5558B40E03F27F55733106A37F6671ACE8083848F1839CF62E6BBC5A84EAD5B3D01DD9EF21B7B49E25BEFDB7DA213FF99EE6DD0F2C7158362B80A41159126A31375BA23F5886C36C47455C4FC52AF9093D35E9074CD895891AE00FAA7A66482D75B718D868132DF84C2BED94283F7AB25BB2BB1F3FE55CF013E624D1D3EB87AFDB74892CDE8EE31E5FA135F31E64C87277240A4E656E1C7BC04C8C97C19CF301A1F64D4EA06682E0C49A23EE059D0F37B56E654740A365445BE9EF2791FB36690FE3D372D15CA99DCFB66913E4CF5F24E7054788161B9C4CA82385D534F505EB7DA60A08CEB73D45AC8EA0D74E2607BEB5F6CD9134C007DF88496F0B7FFF916ADA37AF92CE44C280C846344005DCD1BD2228DE3F6B52EF96600440AFE3A4B46DE0FE4C1EACB899E4A88F6856E6C1EB4EC71A423FC5B3A41E479C66D56FACA4407A33A7ED6F8554701DEF26D920C72C82DD7D64CB25CB8FBA1DB3573D568AA8E09D5674B12B235FC4770A63F1F23D6822FEBADC33FA1DAD412929CCC0672643C42AC7BF237DE53727E3ADC6BFF64239C450AF95EF0B3F9FEC75D45735BA0D70B1EEF5496661FD4DDE00A416EC6142B9C89F78FC52454C007B65348939266BA61F6DF548075E517700BC6956D364FD99713C868492247DCEB431B20D4042E77213638702A2E76930CD82B5B31BA0A1134090E51E02CE3B39B63D487E30F69BD30715F481014BD1D9603BF71146964103E9C9DBA87F29A0F30005A18322B2CEBE1FA35831F1723965CACB9C243493146C6F305ED1DF8345D3F5697D858703D488E03980425C9702AFE68068C6736EE7D8A5AF8FC76B1F0C24625983302919C7AFFC3F32D5B3AF848119BFA335E6429B5943424BB63FA9C1C3189B3324E38468820B9F8FBFCCEABD965D0F37BCC5281E6C3AF78DAB3F077A480C6AD2C3A4E6A07B9943AE8816CC05B62E645DFBB9463DEA6CC708237E2B3B7188FD8E14C3D26B9DFF454C6101D5F2DF861F35E383E20C2C1B17399941BDA750BF8A35CCBD4C203941CA1B4803AD7BEECF909D5693C13D70661C095620CA0C3F94F9BC6EA9EECF48F0F1510CF8A193B695C21984A8C9A2",
"TRANS_CODE": "add",
"TRANS_DATE": "2018-10-23",
"TRANS_SEQ": "c95fb9eb40bc449c87b5cbfb5c774e79",
"VERSION": "V1.0"
},
"SIGN": "D073E37AF0ADBEDA7547F9FDB3D1780C302AB0081C84D8A4CC5BF5613E82A83C"
}
},
"response": {
"status":200,
"headers": {
"Date": "Tue, 23 Oct 2018 02:56:33 GMT",
"Server": "Apache"
},
"body": {
"SIGN": "27DA2E0D8120BB5394DEDC9A9BB8E71895B702C7434CB259F7546E4B39EC54AD",
"PLAIN": {
"H_RSP_CODE": "0000",
"TRANS_SEQ": "c95fb9eb40bc449c87b5cbfb5c774e79",
"MER_PRI": "",
"VERSION": "V1.0",
"TRANS_CODE": "add",
"ID": "{{jsonPath request.body '$.PLAIN.ID'}}",
"ENCODE": "UTF-8",
"RES_BODY": "0425350F38EE70FF50B19F9212D739D2C39D27C2946B3330FDCFAB09B83E3E342AD5F60AA0850CC43A1A81CB75FF290A063877AFB648514DC53D5ADF0A7D02538612C9B8F6D482F00380A520BA4C80BE000048A3E7AC54BA5CF6DF5360ACD94242DF6B6B8248E2BA8DC804A844D49C128C842DB98337ECC65F4C4ACB6AA02AB2BA00B96E002ED965F229AD0B2CE7776445DBE1CCA4BF31284BBF5BCBB32E1BE064FD40171794DFB24E3C45F66A60EE67BF3EA728B69CDB3842B94907AD79F7083DF0E5C64513E07BF2488CF9823F6221333F2C24382F7E116C2FE6B7E6FD6F56",
"H_RSP_MSG": "交易成功"
}
}
},
"metadata": {
"record": {
"transID": "c95fb9eb40bc449c87b5cbfb5c774e79"
}
}
}
<<<
response
{
"code":"0000",
"message":"OK",
"data":""
}
~~~
- 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 文章模板