This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 6eca1ec092 Unify Column Header in RestApi (#8114)
6eca1ec092 is described below

commit 6eca1ec0923cf85cbf104101314512f8ad046ca4
Author: Haonan <[email protected]>
AuthorDate: Wed Nov 23 20:38:49 2022 +0800

    Unify Column Header in RestApi (#8114)
---
 docs/UserGuide/API/RestService.md                  | 60 +++++++++---------
 docs/UserGuide/Write-Data/REST-API.md              |  6 +-
 docs/zh/UserGuide/API/RestService.md               | 74 +++++++++++-----------
 docs/zh/UserGuide/Write-Data/REST-API.md           |  6 +-
 grafana-plugin/go.sum                              |  2 +-
 openapi/src/main/openapi3/iotdb-rest.yaml          | 17 ++---
 .../rest/handler/RequestValidationHandler.java     | 14 ++--
 .../rest/handler/StatementConstructionHandler.java |  2 +-
 8 files changed, 91 insertions(+), 90 deletions(-)

diff --git a/docs/UserGuide/API/RestService.md 
b/docs/UserGuide/API/RestService.md
index 2f1188a6f1..9717cb55a3 100644
--- a/docs/UserGuide/API/RestService.md
+++ b/docs/UserGuide/API/RestService.md
@@ -138,16 +138,16 @@ Request path: http://ip:port/rest/v1/query
 Parameter Description:
 
 | parameter name | parameter type | required | parameter description           
                             |
-| -------------- | -------------- | -------- | 
------------------------------------------------------------ |
+|----------------| -------------- | -------- | 
------------------------------------------------------------ |
 | sql            | string         | yes      |                                 
                             |
-| rowLimit       | integer        | no       | The maximum number of rows in 
the result set that can be returned by a query. <br />If this parameter is not 
set, the `rest_query_default_row_size_limit` of the configuration file will be 
used as the default value. <br /> When the number of rows in the returned 
result set exceeds the limit, the status code `411` will be returned. |
+| row_limit      | integer        | no       | The maximum number of rows in 
the result set that can be returned by a query. <br />If this parameter is not 
set, the `rest_query_default_row_size_limit` of the configuration file will be 
used as the default value. <br /> When the number of rows in the returned 
result set exceeds the limit, the status code `411` will be returned. |
 
 Response parameters:
 
 | parameter name | parameter type | parameter description                      
                  |
-| -------------- | -------------- | 
------------------------------------------------------------ |
+|----------------| -------------- | 
------------------------------------------------------------ |
 | expressions    | array          | Array of result set column names for data 
query, `null` for metadata query |
-| columnNames    | array          | Array of column names for metadata query 
result set, `null` for data query |
+| column_names   | array          | Array of column names for metadata query 
result set, `null` for data query |
 | timestamps     | array          | Timestamp column, `null` for metadata 
query                  |
 | values         | array          | A two-dimensional array, the first 
dimension has the same length as the result set column name array, and the 
second dimension array represents a column of the result set |
 
@@ -168,7 +168,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
     "root.sg27.s4",
     "root.sg27.s3 + 1"
   ],
-  "columnNames": null,
+  "column_names": null,
   "timestamps": [
     1635232143960,
     1635232153960
@@ -199,7 +199,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "child paths"
   ],
   "timestamps": null,
@@ -221,7 +221,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "child nodes"
   ],
   "timestamps": null,
@@ -243,7 +243,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "database",
     "ttl"
   ],
@@ -270,7 +270,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "database",
     "ttl"
   ],
@@ -295,7 +295,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "function name",
     "function type",
     "class name (UDF)"
@@ -333,7 +333,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "timeseries",
     "alias",
     "database",
@@ -406,7 +406,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "timeseries",
     "alias",
     "database",
@@ -479,7 +479,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "count"
   ],
   "timestamps": null,
@@ -500,7 +500,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "count"
   ],
   "timestamps": null,
@@ -521,7 +521,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "devices",
     "isAligned"
   ],
@@ -548,7 +548,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "devices",
     "database",
     "isAligned"
@@ -580,7 +580,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "user"
   ],
   "timestamps": null,
@@ -604,7 +604,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
     "count(root.sg27.s3)",
     "count(root.sg27.s4)"
   ],
-  "columnNames": null,
+  "column_names": null,
   "timestamps": [
     0
   ],
@@ -628,7 +628,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "count(root.sg27.*)",
     "count(root.sg28.*)"
   ],
@@ -656,7 +656,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
     "count(root.sg27.s3)",
     "count(root.sg27.s4)"
   ],
-  "columnNames": null,
+  "column_names": null,
   "timestamps": [
     1635232143960,
     1635232144960,
@@ -707,7 +707,7 @@ curl -H "Content-Type:application/json"  -H 
"Authorization:Basic cm9vdDpyb290" -
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "timeseries",
     "value",
     "dataType"
@@ -814,18 +814,18 @@ Request path: http://ip:port/rest/v1/insertTablet
 
 Parameter Description:
 
-|parameter name  |parameter type |is required|parameter describe|
-|:--- | :--- | :---| :---|
-|  timestamps | array | yes |  Time column  |
-|  measurements | array | yes  | The name of the measuring point |
-| dataTypes | array | yes  | The data type |
-|  values | array | yes  | Value columns, the values in each column can be 
`null` |
-|  isAligned | boolean | yes  | Whether to align the timeseries |
-|  deviceId | string | yes  | Device name |
+| parameter name |parameter type |is required|parameter describe|
+|:---------------| :--- | :---| :---|
+| timestamps     | array | yes |  Time column  |
+| measurements   | array | yes  | The name of the measuring point |
+| data_types     | array | yes  | The data type |
+| values         | array | yes  | Value columns, the values in each column can 
be `null` |
+| is_aligned     | boolean | yes  | Whether to align the timeseries |
+| device         | string | yes  | Device name |
 
 Example request:
 ```shell
-curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" 
-X POST --data 
'{"timestamps":[1635232143960,1635232153960],"measurements":["s3","s4"],"dataTypes":["INT32","BOOLEAN"],"values":[[11,null],[false,true]],"isAligned":false,"deviceId":"root.sg27"}'
 http://127.0.0.1:18080/rest/v1/insertTablet
+curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" 
-X POST --data 
'{"timestamps":[1635232143960,1635232153960],"measurements":["s3","s4"],"data_types":["INT32","BOOLEAN"],"values":[[11,null],[false,true]],"is_aligned":false,"device":"root.sg27"}'
 http://127.0.0.1:18080/rest/v1/insertTablet
 ```
 
 Sample response:
diff --git a/docs/UserGuide/Write-Data/REST-API.md 
b/docs/UserGuide/Write-Data/REST-API.md
index a298905741..71927c3dc5 100644
--- a/docs/UserGuide/Write-Data/REST-API.md
+++ b/docs/UserGuide/Write-Data/REST-API.md
@@ -36,7 +36,7 @@ Example:
             "temperature",
             "status"
       ],
-      "dataTypes": [
+      "data_types": [
             "FLOAT",
             "BOOLEAN"
       ],
@@ -52,7 +52,7 @@ Example:
                   true
             ]
       ],
-      "isAligned": false,
-      "deviceId": "root.ln.wf01.wt01"
+      "is_aligned": false,
+      "device": "root.ln.wf01.wt01"
 }
 ```
\ No newline at end of file
diff --git a/docs/zh/UserGuide/API/RestService.md 
b/docs/zh/UserGuide/API/RestService.md
index ae80ecd7dd..5c9fac9ed1 100644
--- a/docs/zh/UserGuide/API/RestService.md
+++ b/docs/zh/UserGuide/API/RestService.md
@@ -131,19 +131,19 @@ query 接口可以用于处理数据查询和元数据查询。
 
 参数说明:
 
-|参数名称  |参数类型  |是否必填|参数描述|
-| ------------ | ------------ | ------------ |------------ |
-|  sql | string | 是  |   |
-| rowLimit | integer | 否 | 一次查询能返回的结果集的最大行数。<br />如果不设置该参数,将使用配置文件的  
`rest_query_default_row_size_limit` 作为默认值。<br />当返回结果集的行数超出限制时,将返回状态码 `411`。 |
+| 参数名称      |参数类型  |是否必填|参数描述|
+|-----------| ------------ | ------------ |------------ |
+| sql       | string | 是  |   |
+| row_limit | integer | 否 | 一次查询能返回的结果集的最大行数。<br />如果不设置该参数,将使用配置文件的  
`rest_query_default_row_size_limit` 作为默认值。<br />当返回结果集的行数超出限制时,将返回状态码 `411`。 |
 
 响应参数:
 
-|参数名称  |参数类型  |参数描述|
-| ------------ | ------------ | ------------|
-| expressions | array | 用于数据查询时结果集列名的数组,用于元数据查询时为`null`|
-| columnNames | array | 用于元数据查询结果集列名数组,用于数据查询时为`null` |
-| timestamps | array | 时间戳列,用于元数据查询时为`null` |
-|values|array|二维数组,第一维与结果集列名数组的长度相同,第二维数组代表结果集的一列|
+| 参数名称         |参数类型  |参数描述|
+|--------------| ------------ | ------------|
+| expressions  | array | 用于数据查询时结果集列名的数组,用于元数据查询时为`null`|
+| column_names | array | 用于元数据查询结果集列名数组,用于数据查询时为`null` |
+| timestamps   | array | 时间戳列,用于元数据查询时为`null` |
+| values       |array|二维数组,第一维与结果集列名数组的长度相同,第二维数组代表结果集的一列|
 
 请求示例如下所示:
 
@@ -163,7 +163,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
     "root.sg27.s4",
     "root.sg27.s3 + 1"
   ],
-  "columnNames": null,
+  "column_names": null,
   "timestamps": [
     1635232143960,
     1635232153960
@@ -195,7 +195,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "child paths"
   ],
   "timestamps": null,
@@ -218,7 +218,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "child nodes"
   ],
   "timestamps": null,
@@ -241,7 +241,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "database",
     "ttl"
   ],
@@ -269,7 +269,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "database",
     "ttl"
   ],
@@ -295,7 +295,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "function name",
     "function type",
     "class name (UDF)"
@@ -306,7 +306,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
       "ABS",
       "ACOS",
       "ASIN",
-       ...
+      ...
     ],
     [
       "built-in UDTF",
@@ -334,7 +334,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "timeseries",
     "alias",
     "database",
@@ -408,7 +408,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "timeseries",
     "alias",
     "database",
@@ -482,7 +482,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "count"
   ],
   "timestamps": null,
@@ -504,7 +504,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "count"
   ],
   "timestamps": null,
@@ -526,7 +526,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "devices",
     "isAligned"
   ],
@@ -554,7 +554,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "devices",
     "database",
     "isAligned"
@@ -587,7 +587,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "user"
   ],
   "timestamps": null,
@@ -612,7 +612,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
     "count(root.sg27.s3)",
     "count(root.sg27.s4)"
   ],
-  "columnNames": null,
+  "column_names": null,
   "timestamps": [
     0
   ],
@@ -637,7 +637,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "count(root.sg27.*)",
     "count(root.sg28.*)"
   ],
@@ -666,7 +666,7 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
     "count(root.sg27.s3)",
     "count(root.sg27.s4)"
   ],
-  "columnNames": null,
+  "column_names": null,
   "timestamps": [
     1635232143960,
     1635232144960,
@@ -718,7 +718,7 @@ curl -H "Content-Type:application/json"  -H 
"Authorization:Basic cm9vdDpyb290" -
 ```json
 {
   "expressions": null,
-  "columnNames": [
+  "column_names": [
     "timeseries",
     "value",
     "dataType"
@@ -828,18 +828,18 @@ curl -H "Content-Type:application/json" -H 
"Authorization:Basic cm9vdDpyb290" -X
 
 参数说明:
 
-|参数名称  |参数类型  |是否必填|参数描述|
-| ------------ | ------------ | ------------ |------------ |
-|  timestamps | array | 是 |  时间列  |
-|  measurements | array | 是  | 测点名称 |
-| dataTypes | array | 是  | 数据类型  |
-|  values | array | 是  | 值列,每一列中的值可以为 `null` |
-|  isAligned | boolean | 是  | 是否是对齐时间序列 |
-|  deviceId | string | 是  | 设备名称 |
+| 参数名称         |参数类型  |是否必填|参数描述|
+|--------------| ------------ | ------------ |------------ |
+| timestamps   | array | 是 |  时间列  |
+| measurements | array | 是  | 测点名称 |
+| data_types   | array | 是  | 数据类型  |
+| values       | array | 是  | 值列,每一列中的值可以为 `null` |
+| is_aligned   | boolean | 是  | 是否是对齐时间序列 |
+| device       | string | 是  | 设备名称 |
 
 请求示例:
 ```shell
-curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" 
-X POST --data 
'{"timestamps":[1635232143960,1635232153960],"measurements":["s3","s4"],"dataTypes":["INT32","BOOLEAN"],"values":[[11,null],[false,true]],"isAligned":false,"deviceId":"root.sg27"}'
 http://127.0.0.1:18080/rest/v1/insertTablet
+curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" 
-X POST --data 
'{"timestamps":[1635232143960,1635232153960],"measurements":["s3","s4"],"data_types":["INT32","BOOLEAN"],"values":[[11,null],[false,true]],"is_aligned":false,"device":"root.sg27"}'
 http://127.0.0.1:18080/rest/v1/insertTablet
 ```
 
 响应参数:
diff --git a/docs/zh/UserGuide/Write-Data/REST-API.md 
b/docs/zh/UserGuide/Write-Data/REST-API.md
index f53a7641c2..edcd552c95 100644
--- a/docs/zh/UserGuide/Write-Data/REST-API.md
+++ b/docs/zh/UserGuide/Write-Data/REST-API.md
@@ -35,7 +35,7 @@
             "temperature",
             "status"
       ],
-      "dataTypes": [
+      "data_types": [
             "FLOAT",
             "BOOLEAN"
       ],
@@ -51,7 +51,7 @@
                   true
             ]
       ],
-      "isAligned": false,
-      "deviceId": "root.ln.wf01.wt01"
+      "is_aligned": false,
+      "device": "root.ln.wf01.wt01"
 }
 ```
diff --git a/grafana-plugin/go.sum b/grafana-plugin/go.sum
index 4dc5cdec48..209251e6b0 100644
--- a/grafana-plugin/go.sum
+++ b/grafana-plugin/go.sum
@@ -657,4 +657,4 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod 
h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
 rsc.io/binaryregexp v0.2.0/go.mod 
h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
-rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
+rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
\ No newline at end of file
diff --git a/openapi/src/main/openapi3/iotdb-rest.yaml 
b/openapi/src/main/openapi3/iotdb-rest.yaml
index 8bdb9dc4e5..b9cd29ff2c 100644
--- a/openapi/src/main/openapi3/iotdb-rest.yaml
+++ b/openapi/src/main/openapi3/iotdb-rest.yaml
@@ -23,6 +23,7 @@ info:
   description: IoTDB Rest API for Grafana, Prometheus, etc..
   license:
     name: Apache 2.0
+    url: https://www.apache.org/licenses/LICENSE-2.0.html
   version: 1.0.0
 servers:
 - url: http://127.0.0.1:18080/
@@ -173,7 +174,7 @@ components:
       properties:
         sql:
           type: string
-        rowLimit:
+        row_limit:
           type: integer
           format: int32
 
@@ -190,7 +191,7 @@ components:
           type: array
           items:
             type: string
-        dataTypes:
+        data_types:
           type: array
           items:
             type: string
@@ -200,9 +201,9 @@ components:
             type: array
             items:
               type: object
-        isAligned:
+        is_aligned:
           type: boolean
-        deviceId:
+        device:
           type: string
 
     ExecutionStatus:
@@ -221,7 +222,7 @@ components:
           type: array
           items:
             type: string
-        columnNames:
+        column_names:
           type: array
           items:
             type: string
@@ -244,7 +245,7 @@ components:
           type: array
           items:
             type: string
-        prefixPath:
+        prefix_path:
           type: array
           items:
             type: string
@@ -252,9 +253,9 @@ components:
           type: string
         control:
            type: string
-        startTime:
+        start_time:
           type: number
-        endTime:
+        end_time:
           type: number
 
     VariablesResult:
diff --git 
a/server/src/main/java/org/apache/iotdb/db/protocol/rest/handler/RequestValidationHandler.java
 
b/server/src/main/java/org/apache/iotdb/db/protocol/rest/handler/RequestValidationHandler.java
index 2837fbc6e1..27b77596a5 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/protocol/rest/handler/RequestValidationHandler.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/protocol/rest/handler/RequestValidationHandler.java
@@ -32,22 +32,22 @@ public class RequestValidationHandler {
   public static void validateSQL(SQL sql) {
     Objects.requireNonNull(sql.getSql(), "sql should not be null");
     if (sql.getRowLimit() != null) {
-      Validate.isTrue(sql.getRowLimit() > 0, "rowLimit should be positive");
+      Validate.isTrue(sql.getRowLimit() > 0, "row_limit should be positive");
     }
   }
 
   public static void validateInsertTabletRequest(InsertTabletRequest 
insertTabletRequest) {
     Objects.requireNonNull(insertTabletRequest.getTimestamps(), "timestamps 
should not be null");
-    Objects.requireNonNull(insertTabletRequest.getIsAligned(), "isAligned 
should not be null");
-    Objects.requireNonNull(insertTabletRequest.getDeviceId(), "deviceId should 
not be null");
-    Objects.requireNonNull(insertTabletRequest.getDataTypes(), "dataTypes 
should not be null");
+    Objects.requireNonNull(insertTabletRequest.getIsAligned(), "is_aligned 
should not be null");
+    Objects.requireNonNull(insertTabletRequest.getDevice(), "device should not 
be null");
+    Objects.requireNonNull(insertTabletRequest.getDataTypes(), "data_types 
should not be null");
     Objects.requireNonNull(insertTabletRequest.getValues(), "values should not 
be null");
   }
 
   public static void validateExpressionRequest(ExpressionRequest 
expressionRequest) {
     Objects.requireNonNull(expressionRequest.getExpression(), "expression 
should not be null");
-    Objects.requireNonNull(expressionRequest.getPrefixPath(), "prefixPath 
should not be null");
-    Objects.requireNonNull(expressionRequest.getStartTime(), "startTime should 
not be null");
-    Objects.requireNonNull(expressionRequest.getEndTime(), "endTime should not 
be null");
+    Objects.requireNonNull(expressionRequest.getPrefixPath(), "prefix_path 
should not be null");
+    Objects.requireNonNull(expressionRequest.getStartTime(), "start_time 
should not be null");
+    Objects.requireNonNull(expressionRequest.getEndTime(), "end_time should 
not be null");
   }
 }
diff --git 
a/server/src/main/java/org/apache/iotdb/db/protocol/rest/handler/StatementConstructionHandler.java
 
b/server/src/main/java/org/apache/iotdb/db/protocol/rest/handler/StatementConstructionHandler.java
index ad53165282..29bd53e9a1 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/protocol/rest/handler/StatementConstructionHandler.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/protocol/rest/handler/StatementConstructionHandler.java
@@ -38,7 +38,7 @@ public class StatementConstructionHandler {
       throws IllegalPathException, WriteProcessRejectException {
     // construct insert statement
     InsertTabletStatement insertStatement = new InsertTabletStatement();
-    insertStatement.setDevicePath(new 
PartialPath(insertTabletRequest.getDeviceId()));
+    insertStatement.setDevicePath(new 
PartialPath(insertTabletRequest.getDevice()));
     
insertStatement.setMeasurements(insertTabletRequest.getMeasurements().toArray(new
 String[0]));
     List<List<Object>> rawData = insertTabletRequest.getValues();
     List<String> rawDataType = insertTabletRequest.getDataTypes();

Reply via email to