yapi/exampleCode/api/interface/add.json
2017-07-20 16:14:20 +08:00

71 lines
1.4 KiB
JSON

//请求 /interface/add
//header Content-Type:application/json
{
"title": "testapi",
"desc": "api",
"method": "post",
"path": "/testapi",
"project_id": 8,
"req_headers": [
{
"key": "h",
"value": "t"
}
],
"req_params_type": "form",
"req_params": [
{
"name": "uid",
"value": 100,
"type": "text"
},
{
"name": "gid",
"value": 1001,
"type": "text"
}
],
"res_body_type": "json",
"res_body": "{\"tt\": 222}"
}
//返回结果
{
"errcode": 0,
"errmsg": "success",
"data": {
"__v": 0,
"_id": 422,
"title": "testapi",
"project_id": 8,
"path": "/testapi",
"desc": "api",
"method": "post",
"req_params_type": "form",
"res_body": "{\"tt\": 222}",
"res_body_type": "json",
"uid": 0,
"add_time": 1499658569,
"up_time": 1499658569,
"req_params_form": [
{
"name": "uid",
"value": "100",
"_id": "5962f94940a7a5767088fcc0"
},
{
"name": "gid",
"value": "1001",
"_id": "5962f94940a7a5767088fcbf"
}
],
"req_headers": [
{
"value": "t",
"_id": "5962f94940a7a5767088fcc1"
}
]
}
}