diff --git a/docs/en/14-reference/02-rest-api/02-rest-api.mdx b/docs/en/14-reference/02-rest-api/02-rest-api.mdx index 01d1a9b12b50956ee690fb8d4423f65eacaf6877..409e079b92d5c8375ce6b3da60c0b2aa053ef662 100644 --- a/docs/en/14-reference/02-rest-api/02-rest-api.mdx +++ b/docs/en/14-reference/02-rest-api/02-rest-api.mdx @@ -405,18 +405,12 @@ Response body: ### Response body - - - - - - -/ - - - - - - - - - - -
Response body TDengine 2.x TDengine 3.0
Success "status": "succ", "code": 0,
Column meta -``` -"head": [ +#### REST response body return from TDengine 2.x + +```JSON +{ + "status": "succ", + "head": [ "name", "created_time", "ntables", @@ -435,37 +429,7 @@ Response body: "precision", "status" ], -``` - -``` -"column_meta": [ - [ - "name", - "VARCHAR", - 64 - ], - [ - "ntables", - "BIGINT", - 8 - ], - [ - "status", - "VARCHAR", - 10 - ] - ], -``` -
-Data - -``` -"data": [ + "data": [ [ "log", "2020-09-02 17:23:00.039", @@ -485,10 +449,10 @@ Data "us", "ready" ] - ], + ], + "rows": 1 +} ``` - ``` "data": [ [ @@ -503,9 +467,44 @@ Data ] ], ``` -
+ +#### REST response body return from TDengine 3.0 + +```JSON +{ + "code": 0, + "column_meta": [ + [ + "name", + "VARCHAR", + 64 + ], + [ + "ntables", + "BIGINT", + 8 + ], + [ + "status", + "VARCHAR", + 10 + ] + ], + "data": [ + [ + "information_schema", + 16, + "ready" + ], + [ + "performance_schema", + 9, + "ready" + ] + ], + "rows": 2 +} +``` ## Reference diff --git a/docs/zh/08-connector/02-rest-api.mdx b/docs/zh/08-connector/02-rest-api.mdx index ae0949c4fd7af23ed73ae3a75f3babdd29f1f3f8..f3f1e087d809b7ce98d27721ada13b7a5fdf7159 100644 --- a/docs/zh/08-connector/02-rest-api.mdx +++ b/docs/zh/08-connector/02-rest-api.mdx @@ -408,18 +408,12 @@ curl http://192.168.0.1:6041/rest/login/root/taosdata ### 响应代码和消息体 - - - - - - -/ - - - - - - - - - - -
响应代码和消息体 TDengine 2.x TDengine 3.0
Success "status": "succ", "code": 0,
Column meta -``` -"head": [ +#### TDengine 2.x 响应代码和消息体 + +```JSON +{ + "status": "succ", + "head": [ "name", "created_time", "ntables", @@ -438,37 +432,7 @@ curl http://192.168.0.1:6041/rest/login/root/taosdata "precision", "status" ], -``` - -``` -"column_meta": [ - [ - "name", - "VARCHAR", - 64 - ], - [ - "ntables", - "BIGINT", - 8 - ], - [ - "status", - "VARCHAR", - 10 - ] - ], -``` -
-Data - -``` -"data": [ + "data": [ [ "log", "2020-09-02 17:23:00.039", @@ -488,10 +452,10 @@ Data "us", "ready" ] - ], + ], + "rows": 1 +} ``` - ``` "data": [ [ @@ -506,9 +470,45 @@ Data ] ], ``` -
+ +#### TDengine 3.0 响应代码和消息体 + + +```JSON +{ + "code": 0, + "column_meta": [ + [ + "name", + "VARCHAR", + 64 + ], + [ + "ntables", + "BIGINT", + 8 + ], + [ + "status", + "VARCHAR", + 10 + ] + ], + "data": [ + [ + "information_schema", + 16, + "ready" + ], + [ + "performance_schema", + 9, + "ready" + ] + ], + "rows": 2 +} +``` ## 参考