You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/01/10 08:36:47 UTC

[GitHub] [iotdb] WilliamSong112 opened a new pull request #4749: [IOTDB-1992] Add english user doc for IoTDB REST data service

WilliamSong112 opened a new pull request #4749:
URL: https://github.com/apache/iotdb/pull/4749


   ## Description
   Hi all :
   I have submitted a pull request for [IOTDB-1992](https://issues.apache.org/jira/browse/IOTDB-1992), please take a look.
   This pull request about add  english user doc for IoTDB REST data service.  
   ### Content1 ...
   
   ### Content2 ...
   
   ### Content3 ...
   
   <!--
   In each section, please describe design decisions made, including:
    - Choice of algorithms
    - Behavioral aspects. What configuration values are acceptable? How are corner cases and error 
       conditions handled, such as when there are insufficient resources?
    - Class organization and design (how the logic is split between classes, inheritance, composition, 
       design patterns)
    - Method organization and design (how the logic is split between methods, parameters and return types)
    - Naming (class, method, API, configuration, HTTP endpoint, names of emitted metrics)
   -->
   
   
   <!-- It's good to describe an alternative design (or mention an alternative name) for every design 
   (or naming) decision point and compare the alternatives with the designs that you've implemented 
   (or the names you've chosen) to highlight the advantages of the chosen designs and names. -->
   
   <!-- If there was a discussion of the design of the feature implemented in this PR elsewhere 
   (e. g. a "Proposal" issue, any other issue, or a thread in the development mailing list), 
   link to that discussion from this PR description and explain what have changed in your final design 
   compared to your original proposal or the consensus version in the end of the discussion. 
   If something hasn't changed since the original discussion, you can omit a detailed discussion of 
   those aspects of the design here, perhaps apart from brief mentioning for the sake of readability 
   of this PR description. -->
   
   <!-- Some of the aspects mentioned above may be omitted for simple and small changes. -->
   
   <hr>
   
   This PR has:
   - [ ] been self-reviewed.
       - [ ] concurrent read
       - [ ] concurrent write
       - [ ] concurrent read and write 
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods. 
   - [ ] added or updated version, __license__, or notice information
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious 
     for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold 
     for code coverage.
   - [ ] added integration tests.
   - [ ] been tested in a test IoTDB cluster.
   
   <!-- Check the items by putting "x" in the brackets for the done things. Not all of these items 
   apply to every PR. Remove the items which are not done or not relevant to the PR. None of the items 
   from the checklist above are strictly necessary, but it would be very helpful if you at least 
   self-review the PR. -->
   
   <hr>
   
   ##### Key changed/added classes (or packages if there are too many classes) in this PR
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] SteveYurongSu commented on a change in pull request #4749: [IOTDB-1992] Add english user doc for IoTDB REST data service

Posted by GitBox <gi...@apache.org>.
SteveYurongSu commented on a change in pull request #4749:
URL: https://github.com/apache/iotdb/pull/4749#discussion_r781202392



##########
File path: docs/UserGuide/Communication-Service-Protocol/RestService.md
##########
@@ -0,0 +1,268 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+        http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+
+## RESTful Service  
+IoTDB's RESTful services can be used for query, write, and management operations, using the OpenAPI standard to define interfaces and generate frameworks.
+
+
+
+### Authentication
+RESTful services use basic authentication. Each URL request needs to carry `'Authorization': 'Basic ' + base64.encode(username + ':' + password)`.
+
+
+
+### Interface
+
+#### ping
+
+Request method:`GET`

Review comment:
       A white space is needed after the `:`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] SteveYurongSu commented on a change in pull request #4749: [IOTDB-1992] Add english user doc for IoTDB REST data service

Posted by GitBox <gi...@apache.org>.
SteveYurongSu commented on a change in pull request #4749:
URL: https://github.com/apache/iotdb/pull/4749#discussion_r781200472



##########
File path: docs/UserGuide/Communication-Service-Protocol/RestService.md
##########
@@ -0,0 +1,268 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+        http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+
+## RESTful Service  
+IoTDB's RESTful services can be used for query, write, and management operations, using the OpenAPI standard to define interfaces and generate frameworks.
+
+
+
+### Authentication
+RESTful services use basic authentication. Each URL request needs to carry `'Authorization': 'Basic ' + base64.encode(username + ':' + password)`.
+
+
+
+### Interface
+
+#### ping
+
+Request method:`GET`
+
+Request path:http://ip:port/ping
+
+The user name used in the example is:root,password:root
+
+Example request:
+
+```shell
+$ curl -H "Authorization:Basic cm9vdDpyb2901" http://127.0.0.1:18080/ping
+```
+Response parameters:
+
+|parameter name  |parameter type |parameter describe|
+|:--- | :--- | :---|
+|code | integer |  status code |
+| message  |  string | message |
+
+Sample response:
+```json
+{
+  "code": 200,
+  "message": "SUCCESS_STATUS"
+}
+```
+Example Of user name and password authentication failure:
+```json
+{
+  "code": 600,
+  "message": "WRONG_LOGIN_PASSWORD_ERROR"
+}
+```
+
+
+
+#### query
+
+Request method:`POST`
+
+Request header:`application/json`
+
+Request path:http://ip:port/rest/v1/query
+
+Parameter Description:
+
+|parameter name  |parameter type |is required|parameter describe|
+|:--- | :--- | :---| :---|
+|  sql | string | yes  |  query content |
+
+Example request:
+```shell
+curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X POST --data '{"sql":"select s3, s4, s3 + 1 from root.sg27 limit 2"}' http://127.0.0.1:18080/rest/v1/query
+```
+
+Response parameters:
+
+|  parameter name  |  parameter type |  parameter describe|
+| :--- |  :--- |  --- |
+|expressions | array |An array of result set column names|
+|timestamps | array | Timestamp column |
+|values| array |Value column, the number of columns is the same length as the result set column name array |
+
+Sample response:
+
+```json
+{
+  "expressions": [
+    "root.sg27.s3",
+    "root.sg27.s4",
+    "root.sg27.s3 + 1"
+  ],
+  "timestamps": [1,2],
+  "values": [[11,12],[false,true],[12.0,23.0]]
+}
+```
+
+
+
+#### nonQuery
+
+Request method:`POST`
+
+Request header:`application/json`
+
+Request path:http://ip:port/rest/v1/nonQuery
+
+Parameter Description:
+
+|parameter name  |parameter type |parameter describe|
+|:--- | :--- | :---|
+|  sql | string | query content  | 
+
+Example request:
+```shell
+curl -H "Content-Type:application/json" -H "Authorization:Basic cm9vdDpyb290" -X POST --data '{"sql":"set storage group to root.ln"}' http://127.0.0.1:18080/rest/v1/nonQuery
+```
+
+Response parameters:
+
+|parameter name  |parameter type |parameter describe|
+|:--- | :--- | :---|
+| code | integer |  status code |
+| message  |  string | message |
+
+Sample response:
+```json
+{
+  "code": 200,
+  "message": "SUCCESS_STATUS"
+}
+```
+
+
+
+#### insertTablet
+
+Request method:`POST`
+
+Request header:`application/json`
+
+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 | boolean | yse  | Device name |

Review comment:
       ```suggestion
   |  deviceId | boolean | yes  | Device name |
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] SteveYurongSu merged pull request #4749: [IOTDB-1992] Add english user doc for IoTDB REST data service

Posted by GitBox <gi...@apache.org>.
SteveYurongSu merged pull request #4749:
URL: https://github.com/apache/iotdb/pull/4749


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls commented on pull request #4749: [IOTDB-1992] Add english user doc for IoTDB REST data service

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #4749:
URL: https://github.com/apache/iotdb/pull/4749#issuecomment-1009627380


   
   [![Coverage Status](https://coveralls.io/builds/45517373/badge)](https://coveralls.io/builds/45517373)
   
   Coverage increased (+0.02%) to 67.641% when pulling **f2af9bb574e7a7858d26320afc932dab01dafbd6 on WilliamSong112:add_english_user_doc_rest_data_service** into **8a51c4245f24709d8629344d2b2cb051d2593759 on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #4749: [IOTDB-1992] Add english user doc for IoTDB REST data service

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4749:
URL: https://github.com/apache/iotdb/pull/4749#issuecomment-1009627380


   
   [![Coverage Status](https://coveralls.io/builds/45749473/badge)](https://coveralls.io/builds/45749473)
   
   Coverage increased (+0.008%) to 67.826% when pulling **6f78569928170925d53fd9f5218d585de21f2305 on WilliamSong112:add_english_user_doc_rest_data_service** into **ea9aaec113cc8fa46f8ae9568d2fb25ccc0e9ce6 on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #4749: [IOTDB-1992] Add english user doc for IoTDB REST data service

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4749:
URL: https://github.com/apache/iotdb/pull/4749#issuecomment-1009627380


   
   [![Coverage Status](https://coveralls.io/builds/45517923/badge)](https://coveralls.io/builds/45517923)
   
   Coverage increased (+0.002%) to 67.625% when pulling **f2af9bb574e7a7858d26320afc932dab01dafbd6 on WilliamSong112:add_english_user_doc_rest_data_service** into **8a51c4245f24709d8629344d2b2cb051d2593759 on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] SteveYurongSu commented on a change in pull request #4749: [IOTDB-1992] Add english user doc for IoTDB REST data service

Posted by GitBox <gi...@apache.org>.
SteveYurongSu commented on a change in pull request #4749:
URL: https://github.com/apache/iotdb/pull/4749#discussion_r781201870



##########
File path: docs/UserGuide/Communication-Service-Protocol/RestService.md
##########
@@ -0,0 +1,268 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+        http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+
+## RESTful Service  
+IoTDB's RESTful services can be used for query, write, and management operations, using the OpenAPI standard to define interfaces and generate frameworks.
+
+
+
+### Authentication
+RESTful services use basic authentication. Each URL request needs to carry `'Authorization': 'Basic ' + base64.encode(username + ':' + password)`.
+
+
+
+### Interface
+
+#### ping
+
+Request method:`GET`
+
+Request path:http://ip:port/ping
+
+The user name used in the example is:root,password:root

Review comment:
       ```suggestion
   The user name used in the example is: root, password: root
   ```

##########
File path: docs/UserGuide/Communication-Service-Protocol/RestService.md
##########
@@ -0,0 +1,268 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+        http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+
+## RESTful Service  
+IoTDB's RESTful services can be used for query, write, and management operations, using the OpenAPI standard to define interfaces and generate frameworks.
+
+
+
+### Authentication
+RESTful services use basic authentication. Each URL request needs to carry `'Authorization': 'Basic ' + base64.encode(username + ':' + password)`.
+
+
+
+### Interface
+
+#### ping
+
+Request method:`GET`
+
+Request path:http://ip:port/ping

Review comment:
       ```suggestion
   Request path: http://ip:port/ping
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] WilliamSong112 commented on a change in pull request #4749: [IOTDB-1992] Add english user doc for IoTDB REST data service

Posted by GitBox <gi...@apache.org>.
WilliamSong112 commented on a change in pull request #4749:
URL: https://github.com/apache/iotdb/pull/4749#discussion_r781897352



##########
File path: docs/UserGuide/Communication-Service-Protocol/RestService.md
##########
@@ -0,0 +1,268 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+        http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+
+## RESTful Service  
+IoTDB's RESTful services can be used for query, write, and management operations, using the OpenAPI standard to define interfaces and generate frameworks.
+
+
+
+### Authentication
+RESTful services use basic authentication. Each URL request needs to carry `'Authorization': 'Basic ' + base64.encode(username + ':' + password)`.
+
+
+
+### Interface
+
+#### ping
+
+Request method:`GET`

Review comment:
       > A white space is needed after the `:`
   
   Hi Yurong , thank's for your review ,I  have fixed these formatting issues  and  update  
    config.js , please take a look.   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org