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

docs: fix restful api page (#12043)

* docs: refine connector doc

[TD-14839]

* docs: use TDengine CLI

[TD-14839]

* docs: replace JNI with navtive connection

[TD-14839]

* docs: make connectors doc use same preparition

[TD-14839]

* docs: refine connectors doc

[TD-14839]

* docs: refine connectors doc

[TD-14839]

* docs: refine connector docs

* docs: refine connector doc

[TD-14839]

* docs: refine connector doc

[TD-14839]

* docs: refine connector

[TD-14839]

* docs: fix faq path

* docs: refine cpp connector doc

* docs: refine cpp docs

* docs: fix java preparition

* docs: refine connector docs

* docs: refine connector docs

[TD-14839]

* docs: refine connector doc

[TD-14839]

* docs: refine connector docs

[TD-14839]

* docs: fix node.mdx

[TD-14839]

* docs: refine connector

[TD-14839]

* docs: refine cpp connector

[TD-14839]

* docs: correct bind parameter interface name

[TD-14839]

* docs: refine connector docs

[TD-14839]

* docs: refine connector

[TD-14839]

* docs: refine connector

[TD-14839]

* docs: refine connector docs

[TD-14839]

* docs: refine connector

[TD-14839]

* docs: fix connector tabs

[TD-14839]

* fix tabitem values

* docs: refine connector

[TD-14839]

* fix typo

* docs: fix connector

[TD-14839]

* fix csharp.mdx

* refine connector docs

question list is numerical

* refine go connector doc

* refine go.mdx

* docs: fix 03-connector.mdx

* docs: fix rust.mdx

* docs: fix 27-train-faq/01-faq.md

* docs: fix 27-train-faq/01-faq.md

* docs: fix 27-train-faq/01-faq.md

* docs: fix 27-train-faq/01-faq.md

* docs: fix 14-reference/02-rest-api/02-rest-api.mdx
上级 08f49373
......@@ -90,15 +90,15 @@ HTTP 请求的 Header 里需带有身份认证信息,TDengine 支持 Basic 认
- 自定义身份认证信息如下所示(token 稍后介绍)
```
Authorization: Taosd <TOKEN>
```
```
Authorization: Taosd <TOKEN>
```
- Basic 身份认证信息如下所示
```
Authorization: Basic <TOKEN>
```
```
Authorization: Basic <TOKEN>
```
HTTP 请求的 BODY 里就是一个完整的 SQL 语句,SQL 语句中的数据表应提供数据库前缀,例如 \<db_name>.\<tb_name>。如果表名不带数据库前缀,又没有在 url 中指定数据库名的话,系统会返回错误。因为 HTTP 模块只是一个简单的转发,没有当前 DB 的概念。
......@@ -190,47 +190,47 @@ curl http://192.168.0.1:6041/rest/login/root/taosdata
- 在 demo 库里查询表 d1001 的所有记录:
```bash
curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d 'select * from demo.d1001' 192.168.0.1:6041/rest/sql
```
```bash
curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d 'select * from demo.d1001' 192.168.0.1:6041/rest/sql
```
返回值:
返回值:
```json
{
"status": "succ",
"head": ["ts", "current", "voltage", "phase"],
"column_meta": [
["ts", 9, 8],
["current", 6, 4],
["voltage", 4, 4],
["phase", 6, 4]
],
"data": [
["2018-10-03 14:38:05.000", 10.3, 219, 0.31],
["2018-10-03 14:38:15.000", 12.6, 218, 0.33]
],
"rows": 2
}
```
```json
{
"status": "succ",
"head": ["ts", "current", "voltage", "phase"],
"column_meta": [
["ts", 9, 8],
["current", 6, 4],
["voltage", 4, 4],
["phase", 6, 4]
],
"data": [
["2018-10-03 14:38:05.000", 10.3, 219, 0.31],
["2018-10-03 14:38:15.000", 12.6, 218, 0.33]
],
"rows": 2
}
```
- 创建库 demo:
```bash
curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d 'create database demo' 192.168.0.1:6041/rest/sql
```
```bash
curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d 'create database demo' 192.168.0.1:6041/rest/sql
```
返回值:
返回值:
```json
{
"status": "succ",
"head": ["affected_rows"],
"column_meta": [["affected_rows", 4, 4]],
"data": [[1]],
"rows": 1
}
```
```json
{
"status": "succ",
"head": ["affected_rows"],
"column_meta": [["affected_rows", 4, 4]],
"data": [[1]],
"rows": 1
}
```
## 其他用法
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册