浏览代码

[docs] Add optional database param and update /delete connector field (#2685)

Harsh Gupta 3 年之前
父节点
当前提交
22c0824b1a
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      docs/docs-site/content/developer/api/rest/_index.md

+ 6 - 3
docs/docs-site/content/developer/api/rest/_index.md

@@ -175,12 +175,15 @@ And then, add it in `hue.ini` (comma separated and in order of priority if multi
 
 Now that we are authenticated, here is how to execute a `SHOW TABLES` SQL query via the `hive` connector. You could repeat the steps with any query you want, e.g. `SELECT * FROM web_logs LIMIT 100`.
 
-Selecting the Database to query via the **dialect** argument in `/api/editor/execute/<dialect>`:
-- **hive**: select the first configured Hive databases.
+Selecting the **dialect** argument in `/api/editor/execute/<dialect>`:
+- **hive**: select the configured Hive dialect
 - **1**: select the connector id 1
 - **hive-1**: select the interpreter id 1 and hints that it is a Hive dialect
 - If blank will pick the first interpreter
 
+Optional parameter:
+- **database**: select a specific database
+
 For a `SHOW TABLES`, first we send the query statement:
 
     curl -X POST https://demo.gethue.com/api/editor/execute/hive --data 'statement=SHOW TABLES'
@@ -561,7 +564,7 @@ This is the same as creating a new connector instance, but as we provide the `id
 
 ### Delete
 
-    curl -X POST 'https://demo.gethue.com/api/connector/instance/delete' -d '{"connector": {"id": "1"}}'
+    curl -X POST 'https://demo.gethue.com/api/connector/instance/delete' -d 'connector={"id": "1"}'
 
 ### Test