diff --git a/docs/zh/08-connector/02-rest-api.mdx b/docs/zh/08-connector/02-rest-api.mdx index e254244657b457e10bc2daab020b230c9a8bb2cc..12a9cf5347c9f2bb5490a1a19999da79b9d5c58f 100644 --- a/docs/zh/08-connector/02-rest-api.mdx +++ b/docs/zh/08-connector/02-rest-api.mdx @@ -4,7 +4,7 @@ sidebar_label: REST API description: 详细介绍 TDengine 提供的 RESTful API. --- -为支持各种不同类型平台的开发,TDengine 提供符合 REST 设计标准的 API,即 REST API。为最大程度降低学习成本,不同于其他数据库 REST API 的设计方法,TDengine 直接通过 HTTP POST 请求 BODY 中包含的 SQL 语句来操作数据库,仅需要一个 URL。REST 连接器的使用参见 [视频教程](https://www.taosdata.com/blog/2020/11/11/1965.html)。 +为支持各种不同类型平台的开发,TDengine 提供符合 RESTful 设计标准的 API,即 REST API。为最大程度降低学习成本,不同于其他数据库 REST API 的设计方法,TDengine 直接通过 HTTP POST 请求 BODY 中包含的 SQL 语句来操作数据库,仅需要一个 URL。REST API 的使用参见 [视频教程](https://www.taosdata.com/blog/2020/11/11/1965.html)。 :::note 与原生连接器的一个区别是,RESTful 接口是无状态的,因此 `USE db_name` 指令没有效果,所有对表名、超级表名的引用都需要指定数据库名前缀。支持在 RESTful URL 中指定 db_name,这时如果 SQL 语句中没有指定数据库名前缀的话,会使用 URL 中指定的这个 db_name。 @@ -18,7 +18,7 @@ RESTful 接口不依赖于任何 TDengine 的库,因此客户端不需要安 在已经安装 TDengine 服务器端的情况下,可以按照如下方式进行验证。 -下面以 Ubuntu 环境中使用 curl 工具(确认已经安装)来验证 RESTful 接口的正常,验证前请确认 taosAdapter 服务已开启,在 Linux 系统上此服务默认由 systemd 管理,使用命令 `systemctl start taosadapter` 启动。 +下面以 Ubuntu 环境中使用 `curl` 工具(请确认已经安装)来验证 RESTful 接口是否工作正常,验证前请确认 taosAdapter 服务已开启,在 Linux 系统上此服务默认由 systemd 管理,使用命令 `systemctl start taosadapter` 启动。 下面示例是列出所有的数据库,请把 h1.taosdata.com 和 6041(缺省值)替换为实际运行的 TDengine 服务 FQDN 和端口号: diff --git a/docs/zh/08-connector/05-schemaless-api.mdx b/docs/zh/08-connector/05-schemaless-api.mdx new file mode 100644 index 0000000000000000000000000000000000000000..f6d7e09212c71ed7b142eeabf2a2d69c5f79d439 --- /dev/null +++ b/docs/zh/08-connector/05-schemaless-api.mdx @@ -0,0 +1,38 @@ +--- +title: Schemaless API +sidebar_label: Schemaless API +description: 详细介绍 TDengine 提供的 Schemaless API. +--- + +TDengine 提供了兼容 InfluxDB (v1) 和 OpenTSDB 行协议的 Schemaless API。支持 InfluxDB(v1) 或 OpenTSDB 行协议写入数据的第三方软件无需修改代码,只要修改配置的 EndPoint URL 就可以直接把数据写入 TDengine 数据库。 + +### 兼容 InfluxDB 行协议写入的方法 + +您可以配置任何支持使用 InfluxDB(v1) 行协议的应用访问地址 `http://:6041/` 来写入 InfluxDB 兼容格式的数据到 TDengine。EndPoint 如下: +```text +/influxdb/v1/write??... +``` + +支持 InfluxDB 查询参数如下: + +- `db` 指定 TDengine 使用的数据库名 +- `precision` TDengine 使用的时间精度 +- `u` TDengine 用户名 +- `p` TDengine 密码 + +注意: 目前不支持 InfluxDB 的 token 验证方式,仅支持 Basic 验证和查询参数验证。 + +参考链接:[InfluxDB v1 写接口](https://docs.influxdata.com/influxdb/v2.0/reference/api/influxdb-1x/write/) + +### 兼容 OpenTSDB 行协议写入的方法 + +您可以配置任何支持 OpenTSDB 行协议的应用访问地址 `http://:6041/` 来写入 OpenTSDB 兼容格式的数据到 TDengine。EndPoint 如下: + +```text +/opentsdb/v1/put/json/ +/opentsdb/v1/put/telnet/ +``` + +参考链接: + - [OpenTSDB JSON](http://opentsdb.net/docs/build/html/api_http/put.html) + - [OpenTSDB Telnet](http://opentsdb.net/docs/build/html/api_telnet/put.html) diff --git a/docs/zh/08-connector/03-cpp.mdx b/docs/zh/08-connector/10-cpp.mdx similarity index 100% rename from docs/zh/08-connector/03-cpp.mdx rename to docs/zh/08-connector/10-cpp.mdx diff --git a/docs/zh/08-connector/04-java.mdx b/docs/zh/08-connector/14-java.mdx similarity index 100% rename from docs/zh/08-connector/04-java.mdx rename to docs/zh/08-connector/14-java.mdx diff --git a/docs/zh/08-connector/05-go.mdx b/docs/zh/08-connector/20-go.mdx similarity index 100% rename from docs/zh/08-connector/05-go.mdx rename to docs/zh/08-connector/20-go.mdx diff --git a/docs/zh/08-connector/06-rust.mdx b/docs/zh/08-connector/26-rust.mdx similarity index 100% rename from docs/zh/08-connector/06-rust.mdx rename to docs/zh/08-connector/26-rust.mdx diff --git a/docs/zh/08-connector/07-python.mdx b/docs/zh/08-connector/30-python.mdx similarity index 100% rename from docs/zh/08-connector/07-python.mdx rename to docs/zh/08-connector/30-python.mdx diff --git a/docs/zh/08-connector/08-node.mdx b/docs/zh/08-connector/35-node.mdx similarity index 100% rename from docs/zh/08-connector/08-node.mdx rename to docs/zh/08-connector/35-node.mdx diff --git a/docs/zh/08-connector/09-csharp.mdx b/docs/zh/08-connector/40-csharp.mdx similarity index 100% rename from docs/zh/08-connector/09-csharp.mdx rename to docs/zh/08-connector/40-csharp.mdx diff --git a/docs/zh/08-connector/10-php.mdx b/docs/zh/08-connector/45-php.mdx similarity index 100% rename from docs/zh/08-connector/10-php.mdx rename to docs/zh/08-connector/45-php.mdx diff --git a/docs/zh/14-reference/04-taosadapter.md b/docs/zh/14-reference/04-taosadapter.md index 71bf5f4223ae97cf2c1153aaea3b8f946e213522..82efcab06fbe8107583e49485770842c77ff4850 100644 --- a/docs/zh/14-reference/04-taosadapter.md +++ b/docs/zh/14-reference/04-taosadapter.md @@ -196,7 +196,7 @@ AllowWebSockets - `u` TDengine 用户名 - `p` TDengine 密码 -注意: 目前不支持 InfluxDB 的 token 验证方式只支持 Basic 验证和查询参数验证。 +注意: 目前不支持 InfluxDB 的 token 验证方式,仅支持 Basic 验证和查询参数验证。 ### OpenTSDB