[TOC]
## 接口说明
> 获取 StubMappings 列表。
> 参数示例:
> **?limit=100&offset=0** 表示 [0,100) ,即列表中第 0 个元素到第 99 个元素,前端显示:1-100 ,公式为 offset+1 - offset+limit。
> **?limit=100&offset=100** 表示 [100,100) 即列表中第 100 个元素到第 199 个元素前端显示:101-200 。
## 接口定义
~~~[api]
get:/mappings
number:limit=10#返回总条数
number:offset=0#起始位置,从零开始
<<<
response(success)
**Response Body**
{
"mappings": [{
"id": "03ba2797-e4f3-46f8-a680-fee52ac7ce1e",
"name": "wiremock create a stub example",
"request": {
"urlPath": "/thing/100",
"method": "POST",
"headers": {
"Accept": {
"contains": "json"
}
},
"cookies": {
"X-Auth-Token": {
"equalTo": "123usidsldie98le"
}
}
},
"response": {
"status": 200,
"body": "{\n \"test\":\"liyun\",\n \"node\":{\n \"subnode\":\"subnodevalue\"\n }\n}",
"headers": {
"Content-Type": "application/json"
},
"delayDistribution": {
"type": "uniform",
"lower": 100,
"upper": 300
},
"transformers": ["response-template"]
},
"uuid": "03ba2797-e4f3-46f8-a680-fee52ac7ce1e",
"persistent": true,
"priority": 5,
"scenarioName": "订单",
"requiredScenarioState": "Started",
"newScenarioState": "second"
}],
"meta": {
"total": 1
}
}
~~~
## [JSON Schema](https://jsonschema.net/)
### Response JSON Schema
同 [Stub Mappings meta](StubMappingsmeta.md) 。
- 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 文章模板