From 854b15c04d4164a448ba1380531550bf71b69cde Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Sat, 24 Sep 2022 11:20:37 +0800 Subject: [PATCH] docs: adjust rest api and schemaless doc (#17045) * docs: add schemaless writing for cloud * docs: add section description and remove http from url * docs: adjust schemaless and rest api doc --- docs/en/07-data-in/05-rest-schemaless.md | 35 ++--------- docs/en/07-data-in/30-schemaless-influxdb.md | 60 +++++++++++++++++++ .../07-data-in/35-schemaless-opentsdb-json.md | 52 ++++++++++++++++ .../38-schemaless-opentsdb-telnet.md | 53 ++++++++++++++++ 4 files changed, 170 insertions(+), 30 deletions(-) create mode 100644 docs/en/07-data-in/30-schemaless-influxdb.md create mode 100644 docs/en/07-data-in/35-schemaless-opentsdb-json.md create mode 100644 docs/en/07-data-in/38-schemaless-opentsdb-telnet.md diff --git a/docs/en/07-data-in/05-rest-schemaless.md b/docs/en/07-data-in/05-rest-schemaless.md index 91eb1057e9..8d94c18c48 100644 --- a/docs/en/07-data-in/05-rest-schemaless.md +++ b/docs/en/07-data-in/05-rest-schemaless.md @@ -1,7 +1,7 @@ --- -sidebar_label: REST and Schemaless -title: REST and Schemaless -description: Insert data using REST API or Schemaless +sidebar_label: REST +title: REST +description: Insert data using REST API --- @@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem'; -In this section we will explain how to write into TDengine cloud service using REST API or schemaless protocols over REST interface. +In this section we will explain how to write into TDengine cloud service using REST API. ## REST API @@ -45,7 +45,7 @@ $env:TDENGINE_CLOUD_URL="" -### Insert Data using REST API +### Insert Following command below show how to insert data into the table `d1001` of the database `test` via the command line utility `curl`. @@ -55,28 +55,3 @@ curl -L \ $TDENGINE_CLOUD_URL/rest/sql/test?token=$TDENGINE_CLOUD_TOKEN ``` -## Schemaless - -### InfluxDB Line Protocol - -You can use any client that supports the http protocol to access the RESTful interface address `/influxdb/v1/write` to write data in InfluxDB compatible format to TDengine. The EndPoint is as follows: - -```text -/influxdb/v1/write?db=&token= -``` - -Support InfluxDB query parameters as follows. - -- `db` Specifies the database name used by TDengine -- `precision` The time precision used by TDengine - -Note: InfluxDB token authorization is not supported at present. Only Basic authorization and query parameter validation are supported. - -### OpenTSDB Json and Telnet Protocol - -You can use any client that supports the http protocol to access the RESTful interface address `/opentsdb/v1/put` to write data in OpenTSDB compatible format to TDengine. The EndPoint is as follows: - -```text -/opentsdb/v1/put/json/?token= -/opentsdb/v1/put/telnet/?token= -``` diff --git a/docs/en/07-data-in/30-schemaless-influxdb.md b/docs/en/07-data-in/30-schemaless-influxdb.md new file mode 100644 index 0000000000..172d0fc7fd --- /dev/null +++ b/docs/en/07-data-in/30-schemaless-influxdb.md @@ -0,0 +1,60 @@ +--- +sidebar_label: Schemaless - InfluxDB Line Protocol +title: Schemaless - InfluxDB Line Protocol +description: Insert data in Schemaless Line Protocol +--- + + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + +In this section we will explain how to write into TDengine cloud service using schemaless InfluxDB line protocols over REST interface. + +## Config + +Run this command in your terminal to save the TDengine cloud token and URL as variables: + + + + +```bash +export TDENGINE_CLOUD_TOKEN="" +export TDENGINE_CLOUD_URL="" +``` + + + + +```bash +set TDENGINE_CLOUD_TOKEN="" +set TDENGINE_CLOUD_URL="" +``` + + + + +```powershell +$env:TDENGINE_CLOUD_TOKEN="" +$env:TDENGINE_CLOUD_URL="" +``` + + + + +## Insert + +You can use any client that supports the http protocol to access the RESTful interface address `/influxdb/v1/write` to write data in InfluxDB compatible format to TDengine. The EndPoint is as follows: + +```text +/influxdb/v1/write?db=&token= +``` + +Support InfluxDB query parameters as follows. + +- `db` Specifies the database name used by TDengine +- `precision` The time precision used by TDengine + +Note: InfluxDB token authorization is not supported at present. Only Basic authorization and query parameter validation are supported. + diff --git a/docs/en/07-data-in/35-schemaless-opentsdb-json.md b/docs/en/07-data-in/35-schemaless-opentsdb-json.md new file mode 100644 index 0000000000..c40bc8c409 --- /dev/null +++ b/docs/en/07-data-in/35-schemaless-opentsdb-json.md @@ -0,0 +1,52 @@ +--- +sidebar_label: Schemaless - OpenTSDB JSON Protocol +title: Schemaless - OpenTSDB JSON Protocol +description: Insert data in OpenTSDB JSON Protocol +--- + + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + +In this section we will explain how to write into TDengine cloud service using schemaless OpenTSDB JSON protocols over REST interface. + +## Config + +Run this command in your terminal to save the TDengine cloud token and URL as variables: + + + + +```bash +export TDENGINE_CLOUD_TOKEN="" +export TDENGINE_CLOUD_URL="" +``` + + + + +```bash +set TDENGINE_CLOUD_TOKEN="" +set TDENGINE_CLOUD_URL="" +``` + + + + +```powershell +$env:TDENGINE_CLOUD_TOKEN="" +$env:TDENGINE_CLOUD_URL="" +``` + + + + +### Insert + +You can use any client that supports the http protocol to access the RESTful interface address `/opentsdb/v1/put` to write data in OpenTSDB compatible format to TDengine. The EndPoint is as follows: + +```text +/opentsdb/v1/put/json/?token= +``` diff --git a/docs/en/07-data-in/38-schemaless-opentsdb-telnet.md b/docs/en/07-data-in/38-schemaless-opentsdb-telnet.md new file mode 100644 index 0000000000..f502e2e4a8 --- /dev/null +++ b/docs/en/07-data-in/38-schemaless-opentsdb-telnet.md @@ -0,0 +1,53 @@ +--- +sidebar_label: Schemaless - OpenTSDB Telnet Protocol +title: Schemaless - OpenTSDB Telnet Protocol +description: Insert data in OpenTSDB Telnet Protocol +--- + + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + +In this section we will explain how to write into TDengine cloud service using schemaless OpenTSDB Telnet protocols over REST interface. + +## Config + +Run this command in your terminal to save the TDengine cloud token and URL as variables: + + + + +```bash +export TDENGINE_CLOUD_TOKEN="" +export TDENGINE_CLOUD_URL="" +``` + + + + +```bash +set TDENGINE_CLOUD_TOKEN="" +set TDENGINE_CLOUD_URL="" +``` + + + + +```powershell +$env:TDENGINE_CLOUD_TOKEN="" +$env:TDENGINE_CLOUD_URL="" +``` + + + + +### Insert + +You can use any client that supports the http protocol to access the RESTful interface address `/opentsdb/v1/put` to write data in OpenTSDB compatible format to TDengine. The EndPoint is as follows: + +```text +/opentsdb/v1/put/telnet/?token= +``` + -- GitLab