Explorar o código

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

Harsh Gupta %!s(int64=3) %!d(string=hai) anos
pai
achega
22c0824b1a
Modificáronse 1 ficheiros con 6 adicións e 3 borrados
  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`.
 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
 - **1**: select the connector id 1
 - **hive-1**: select the interpreter id 1 and hints that it is a Hive dialect
 - **hive-1**: select the interpreter id 1 and hints that it is a Hive dialect
 - If blank will pick the first interpreter
 - If blank will pick the first interpreter
 
 
+Optional parameter:
+- **database**: select a specific database
+
 For a `SHOW TABLES`, first we send the query statement:
 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'
     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
 ### 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
 ### Test