Skip to content

Commit

Permalink
docs: add rest api diff (#20892)
Browse files Browse the repository at this point in the history
  • Loading branch information
sangshuduo committed Apr 12, 2023
1 parent 3f045b7 commit b8ca369
Show file tree
Hide file tree
Showing 2 changed files with 191 additions and 0 deletions.
94 changes: 94 additions & 0 deletions docs/en/14-reference/02-rest-api/02-rest-api.mdx
Expand Up @@ -382,6 +382,100 @@ Response body:
}
```
## REST API between TDengine 2.x and 3.0
### URI
| URI | TDengine 2.x | TDengine 3.0 |
| :--------------------| :------------------: | :--------------------------------------------------: |
| /rest/sql | Supported | Supported (with different response code and body) |
| /rest/sqlt | Supported | No more supported |
| /rest/sqlutc | Supported | No more supported |
### HTTP code
| HTTP code | TDengine 2.x | TDengine 3.0 | note |
| :--------------------| :------------------: | :----------: | :-----------------------------------: |
| 200 | Supported | Supported | Success or taosc return error |
| 400 | Not supported | Supported | Parameter error |
| 401 | Not supported | Supported | Authentication failure |
| 404 | Supported | Supported | URI not exist |
| 500 | Not supported | Supported | Internal error |
| 503 | Supported | Supported | Insufficient system resources |
### Response body
| Response body | TDengine 2.x | TDengine 3.0 | note |
| :--------------------| :------------------: | :----------: | :-----------------------------------: |
| Success | "status": "succ", | "code": 0, | |
| Column meta | "head": [
"name",
"created_time",
"ntables",
"vgroups",
"replica",
"quorum",
"days",
"keep1,keep2,keep(D)",
"cache(MB)",
"blocks",
"minrows",
"maxrows",
"wallevel",
"fsync",
"comp",
"precision",
"status"
], | "column_meta": [
[
"name",
"VARCHAR",
64
],
[
"ntables",
"BIGINT",
8
],
[
"status",
"VARCHAR",
10
]
], | |
| Data | "data": [
[
"log",
"2020-09-02 17:23:00.039",
4,
1,
1,
1,
10,
"30,30,30",
1,
3,
100,
4096,
1,
3000,
2,
"us",
"ready"
]
], | "data": [
[
"information_schema",
16,
"ready"
],
[
"performance_schema",
9,
"ready"
]
], | |
## Reference
[taosAdapter](/reference/taosadapter/)
97 changes: 97 additions & 0 deletions docs/zh/08-connector/02-rest-api.mdx
Expand Up @@ -383,6 +383,103 @@ curl http://192.168.0.1:6041/rest/login/root/taosdata
}
```
## TDengine 2.x 和 3.0 之间 REST API 的差异
### URI
| URI | TDengine 2.x | TDengine 3.0 |
| :--------------------| :------------------: | :--------------------------------------------------: |
| /rest/sql | 支持 | 支持 (响应代码和消息体不同) |
| /rest/sqlt | 支持 | 不再支持 |
| /rest/sqlutc | 支持 | 不再支持 |
### HTTP code
| HTTP code | TDengine 2.x | TDengine 3.0 | 备注 |
| :--------------------| :------------------: | :----------: | :-----------------------------------: |
| 200 | 支持 | 支持 | 正确返回和 taosc 接口错误返回 |
| 400 | 不支持 | 支持 | 参数错误返回 |
| 401 | 不支持 | 支持 | 鉴权失败 |
| 404 | 支持 | 支持 | 接口不存在 |
| 500 | 不支持 | 支持 | 内部错误 |
| 503 | 支持 | 支持 | 系统资源不足 |
### 响应代码和消息体
| 响应代码和消息体 | TDengine 2.x | TDengine 3.0 | note |
| :--------------------| :------------------: | :----------: | :-----------------------------------: |
| Success | "status": "succ", | "code": 0, | |
| Column meta | "head": [
"name",
"created_time",
"ntables",
"vgroups",
"replica",
"quorum",
"days",
"keep1,keep2,keep(D)",
"cache(MB)",
"blocks",
"minrows",
"maxrows",
"wallevel",
"fsync",
"comp",
"precision",
"status"
], | "column_meta": [
[
"name",
"VARCHAR",
64
],
[
"ntables",
"BIGINT",
8
],
[
"status",
"VARCHAR",
10
]
], | |
| Data | "data": [
[
"log",
"2020-09-02 17:23:00.039",
4,
1,
1,
1,
10,
"30,30,30",
1,
3,
100,
4096,
1,
3000,
2,
"us",
"ready"
]
], | "data": [
[
"information_schema",
16,
"ready"
],
[
"performance_schema",
9,
"ready"
]
], | |
## 参考
[taosAdapter](/reference/taosadapter/)

0 comments on commit b8ca369

Please sign in to comment.