diff --git a/docs/en/05-develop/01-connect/09-rest-api.md b/docs/en/05-develop/01-connect/09-rest-api.md index b2dd9a6f1593274f3a766342b1ccf99519a8dc3b..f64a47dcc58bc073e2b80a7d46ee9404bdf427be 100644 --- a/docs/en/05-develop/01-connect/09-rest-api.md +++ b/docs/en/05-develop/01-connect/09-rest-api.md @@ -3,6 +3,9 @@ sidebar_label: REST API title: REST API --- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + ## Config Run this command in your terminal to save the TDengine cloud token and URL as variables: diff --git a/docs/en/15-connector/09-rest-api.md b/docs/en/15-connector/09-rest-api.md index 4fb527881ddb2ed1ec432ba171c061fe7f931027..3904c957bb44ad689ff35cc056c5a5961cdd3e35 100644 --- a/docs/en/15-connector/09-rest-api.md +++ b/docs/en/15-connector/09-rest-api.md @@ -24,7 +24,7 @@ The following example lists all databases on the `TDengine Cloud URL` host. If y ```bash curl -L \ -d "select name, ntables, status from information_schema.ins_databases;" \ - /rest/sql?token= + /rest/sql?token= ``` The following return value results indicate that the verification passed. @@ -68,7 +68,7 @@ The following return value results indicate that the verification passed. ## HTTP request URL format ```text -http:///rest/sql/[db_name]?token=TDENGINE_CLOUD_TOKEN +https:///rest/sql/[db_name]?token=TDENGINE_CLOUD_TOKEN ``` Parameter Description: @@ -77,7 +77,7 @@ Parameter Description: - db_name: Optional parameter specifies the default database name for the executed SQL command. - token: used to access TDengine cloud service. -For example, `http://gw-aws.cloud.tdengine.com:80/rest/sql/test?token=xxxxxxxxx` is a URL to `gw-aws.cloud.tdengine:80` and sets the default database name to `test`. +For example, `https://gw-aws.cloud.tdengine.com:80/rest/sql/test?token=xxxxxxxxx` is a URL to `gw-aws.cloud.tdengine:80` and sets the default database name to `test`. The HTTP request's BODY is a complete SQL command, and the data table in the SQL statement should be provided with a database prefix, e.g., `db_name.tb_name`. If the table name does not have a database prefix and the database name is not specified in the URL, the system will respond with an error because the HTTP module is a simple forwarder and has no awareness of the current DB.