pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] sijie commented on a change in pull request #5376: [Issue 3009][docs] Add presto sql REST APIs doc
Date Wed, 20 Nov 2019 21:09:27 GMT
sijie commented on a change in pull request #5376: [Issue 3009][docs] Add presto sql REST APIs
URL: https://github.com/apache/pulsar/pull/5376#discussion_r348745396

 File path: site2/docs/sql-rest-api.md
 @@ -0,0 +1,196 @@
+id: sql-rest-api
+title: Pulsar SQL REST APIs
+sidebar_label: REST APIs
+## Overview
+This describes the resources that make up the Presto REST API v1. If you have any problems
or request, please create a Github issue to contact us.
+## Current version
+All requests should use the v1 version of REST API to request the presto service. You need
to use explicitly URL `http://presto.service:8081/v1` to request service.
+Also, the header `X-Presto-User` is required when you send a `POST` request.
+X-Presto-User: username
+For more information about headers, see the [presto/PrestoHeaders.java at master · prestodb/presto
· GitHub](https://github.com/prestodb/presto/blob/master/presto-client/src/main/java/com/facebook/presto/client/PrestoHeaders.java)
+## Schema
+You can type statement in the HTTP body. And all data is received as JSON that might contain
a `nextUri` link. If there is no `nextUri` link, then the query is finished (either successfully
completed or failed). Otherwise., keep following the `nextUri` link.
+**Example**: Execute `show catalogs`.
+➜  ~ curl --header "X-Presto-User: test-user" --request POST --data 'show catalogs' http://localhost:8081/v1/statement
| json_pp
 Review comment:
   what is `json_pp`? do users need to install `json_pp` when running this example?

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:

With regards,
Apache Git Services

View raw message