Jennifer88huang commented on a change in pull request #5376: [docs] Add presto 
sql REST APIs doc
URL: https://github.com/apache/pulsar/pull/5376#discussion_r334225442
 
 

 ##########
 File path: site2/docs/sql-rest-api.md
 ##########
 @@ -0,0 +1,185 @@
+---
+id: sql-rest-api
+title: Pulsar SQL REST APIs
+sidebar_label: REST APIs
+---
+
+## Presto HTTP API
+
+Presto configuration in Pulsar is: conf/presto/config.properties
+
+Get cluster status (HTTP method: GET)
+
+```
+localhost:8081/v1/cluster
+```
+
+You can input your SQL as an HTTP request body, and send it to 
`localhost:8081/v1/statement`.
+
+For example:
+
+```
+HTTP request URL : `localhost:8081/v1/statement`
+HTTP header:  X-Presto-User: username
+HTTP body: `show catalogs`
+```
+
+> For more HTTP header, refer to 
https://github.com/prestosql/presto/blob/master/presto-client/src/main/java/io/prestosql/client/PrestoHeaders.java
 )
 
 Review comment:
   ```suggestion
   > Note
   > For more about HTTP header, refer to 
https://github.com/prestosql/presto/blob/master/presto-client/src/main/java/io/prestosql/client/PrestoHeaders.java.
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to