阿里L7可视化的后端json样例具体数据内容
时间: 2023-10-10 12:14:02 浏览: 59
以下是阿里L7可视化后端返回的一个JSON样例数据,具体内容如下:
```json
{
"code": 200,
"message": "success",
"data": [
{
"id": "1",
"name": "example_service",
"endpoints": [
{
"id": "1",
"name": "example_endpoint_1",
"requests": [
{
"id": "1",
"name": "example_request_1",
"method": "GET",
"url": "/example/url",
"headers": [
{
"name": "Content-Type",
"value": "application/json"
}
],
"body": "{\"example_key\": \"example_value\"}",
"response": {
"status": 200,
"headers": [
{
"name": "Content-Type",
"value": "application/json"
}
],
"body": "{\"example_key\": \"example_value\"}"
}
},
{
"id": "2",
"name": "example_request_2",
"method": "POST",
"url": "/example/url",
"headers": [
{
"name": "Content-Type",
"value": "application/json"
}
],
"body": "{\"example_key\": \"example_value\"}",
"response": {
"status": 201,
"headers": [
{
"name": "Content-Type",
"value": "application/json"
}
],
"body": "{\"example_key\": \"example_value\"}"
}
}
]
},
{
"id": "2",
"name": "example_endpoint_2",
"requests": [
{
"id": "3",
"name": "example_request_3",
"method": "GET",
"url": "/example/url",
"headers": [
{
"name": "Content-Type",
"value": "application/json"
}
],
"body": "{\"example_key\": \"example_value\"}",
"response": {
"status": 200,
"headers": [
{
"name": "Content-Type",
"value": "application/json"
}
],
"body": "{\"example_key\": \"example_value\"}"
}
}
]
}
]
}
]
}
```
其中,`data`字段表示服务列表,每个服务下包含多个`endpoint`,每个`endpoint`下包含多个请求`request`。具体数据内容如下:
- 服务`example_service`下有两个`endpoint`:`example_endpoint_1`和`example_endpoint_2`。
- `example_endpoint_1`下有两个请求`request`:`example_request_1`和`example_request_2`。
- `example_request_1`是一个`GET`请求,请求路径为`/example/url`,请求头包含`Content-Type`字段,值为`application/json`,请求体为`{"example_key": "example_value"}`,响应状态码为`200`,响应头包含`Content-Type`字段,值为`application/json`,响应体为`{"example_key": "example_value"}`。
- `example_request_2`是一个`POST`请求,请求路径为`/example/url`,请求头包含`Content-Type`字段,值为`application/json`,请求体为`{"example_key": "example_value"}`,响应状态码为`201`,响应头包含`Content-Type`字段,值为`application/json`,响应体为`{"example_key": "example_value"}`。
- `example_endpoint_2`下有一个请求`request`:`example_request_3`。
- `example_request_3`是一个`GET`请求,请求路径为`/example/url`,请求头包含`Content-Type`字段,值为`application/json`,请求体为`{"example_key": "example_value"}`,响应状态码为`200`,响应头包含`Content-Type`字段,值为`application/json`,响应体为`{"example_key": "example_value"}`。
阅读全文