未验证 提交 c1412648 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

docs: use json instead of table in rest api (#20895)

* docs: add rest api diff

* docs: use html table

* docs: use json instead of table in rest api doc
上级 c3abf5ed
......@@ -405,18 +405,12 @@ Response body:
### Response body
<table>
<tr>
<td> Response body </td> <td> TDengine 2.x </td> <td> TDengine 3.0 </td>
</tr>
<tr>
<td> Success </td> <td> "status": "succ",</td> <td> "code": 0,</td>
/<tr>
<tr>
<td> Column meta </td>
<td>
```
"head": [
#### REST response body return from TDengine 2.x
```JSON
{
"status": "succ",
"head": [
"name",
"created_time",
"ntables",
......@@ -435,37 +429,7 @@ Response body:
"precision",
"status"
],
```
</td>
<td>
```
"column_meta": [
[
"name",
"VARCHAR",
64
],
[
"ntables",
"BIGINT",
8
],
[
"status",
"VARCHAR",
10
]
],
```
</td>
</tr>
<tr>
<td>
Data
</td>
<td>
```
"data": [
"data": [
[
"log",
"2020-09-02 17:23:00.039",
......@@ -485,10 +449,10 @@ Data
"us",
"ready"
]
],
],
"rows": 1
}
```
</td>
<td>
```
"data": [
[
......@@ -503,9 +467,44 @@ Data
]
],
```
</td>
</tr>
</table>
#### REST response body return from TDengine 3.0
```JSON
{
"code": 0,
"column_meta": [
[
"name",
"VARCHAR",
64
],
[
"ntables",
"BIGINT",
8
],
[
"status",
"VARCHAR",
10
]
],
"data": [
[
"information_schema",
16,
"ready"
],
[
"performance_schema",
9,
"ready"
]
],
"rows": 2
}
```
## Reference
......
......@@ -408,18 +408,12 @@ curl http://192.168.0.1:6041/rest/login/root/taosdata
### 响应代码和消息体
<table>
<tr>
<td> 响应代码和消息体 </td> <td> TDengine 2.x </td> <td> TDengine 3.0 </td>
</tr>
<tr>
<td> Success </td> <td> "status": "succ",</td> <td> "code": 0,</td>
/<tr>
<tr>
<td> Column meta </td>
<td>
```
"head": [
#### TDengine 2.x 响应代码和消息体
```JSON
{
"status": "succ",
"head": [
"name",
"created_time",
"ntables",
......@@ -438,37 +432,7 @@ curl http://192.168.0.1:6041/rest/login/root/taosdata
"precision",
"status"
],
```
</td>
<td>
```
"column_meta": [
[
"name",
"VARCHAR",
64
],
[
"ntables",
"BIGINT",
8
],
[
"status",
"VARCHAR",
10
]
],
```
</td>
</tr>
<tr>
<td>
Data
</td>
<td>
```
"data": [
"data": [
[
"log",
"2020-09-02 17:23:00.039",
......@@ -488,10 +452,10 @@ Data
"us",
"ready"
]
],
],
"rows": 1
}
```
</td>
<td>
```
"data": [
[
......@@ -506,9 +470,45 @@ Data
]
],
```
</td>
</tr>
</table>
#### TDengine 3.0 响应代码和消息体
```JSON
{
"code": 0,
"column_meta": [
[
"name",
"VARCHAR",
64
],
[
"ntables",
"BIGINT",
8
],
[
"status",
"VARCHAR",
10
]
],
"data": [
[
"information_schema",
16,
"ready"
],
[
"performance_schema",
9,
"ready"
]
],
"rows": 2
}
```
## 参考
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册