Submit a sql statement for execution
curl --request POST \
--url https://firebolt.go.firebolt.io/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/sql' \
--data '<string>'import requests
url = "https://firebolt.go.firebolt.io/query"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "text/sql"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'text/sql'},
body: '<string>'
};
fetch('https://firebolt.go.firebolt.io/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://firebolt.go.firebolt.io/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: text/sql"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://firebolt.go.firebolt.io/query"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "text/sql")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://firebolt.go.firebolt.io/query")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "text/sql")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://firebolt.go.firebolt.io/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'text/sql'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"query": {
"query_id": "<string>",
"request_id": "<string>",
"query_label": "<string>"
},
"meta": [
{
"name": "<string>",
"type": "<string>"
}
],
"rows": 123,
"data": [
[
"<string>"
]
],
"statistics": {
"elapsed": 123,
"rows_read": 123,
"bytes_read": 123,
"scanned_bytes_cache": 123,
"scanned_bytes_storage": 123
},
"explain_analyze": {
"version": 123,
"root_description": "<string>",
"explain_type": "<string>",
"query_id": "<string>",
"operators": [
{
"operator_id": 123,
"operator_type": "<string>",
"input_ids": 123,
"annotations": {
"label": "<string>",
"output_types": [
"<string>"
],
"input_ids": [
123
],
"execution_metrics": {
"cpu_time_ms": 123,
"max_single_work_call_thread_time_us": 123,
"thread_time_ms": 123,
"output_cardinality": 123,
"optimized_out": true,
"nothing_executed": true
}
}
}
]
}
}{
"message": "<string>",
"token": "<string>",
"monitorSql": "<string>"
}API Reference
Submit a sql statement for execution
POST
/
query
Submit a sql statement for execution
curl --request POST \
--url https://firebolt.go.firebolt.io/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/sql' \
--data '<string>'import requests
url = "https://firebolt.go.firebolt.io/query"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "text/sql"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'text/sql'},
body: '<string>'
};
fetch('https://firebolt.go.firebolt.io/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://firebolt.go.firebolt.io/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: text/sql"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://firebolt.go.firebolt.io/query"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "text/sql")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://firebolt.go.firebolt.io/query")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "text/sql")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://firebolt.go.firebolt.io/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'text/sql'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"query": {
"query_id": "<string>",
"request_id": "<string>",
"query_label": "<string>"
},
"meta": [
{
"name": "<string>",
"type": "<string>"
}
],
"rows": 123,
"data": [
[
"<string>"
]
],
"statistics": {
"elapsed": 123,
"rows_read": 123,
"bytes_read": 123,
"scanned_bytes_cache": 123,
"scanned_bytes_storage": 123
},
"explain_analyze": {
"version": 123,
"root_description": "<string>",
"explain_type": "<string>",
"query_id": "<string>",
"operators": [
{
"operator_id": 123,
"operator_type": "<string>",
"input_ids": 123,
"annotations": {
"label": "<string>",
"output_types": [
"<string>"
],
"input_ids": [
123
],
"execution_metrics": {
"cpu_time_ms": 123,
"max_single_work_call_thread_time_us": 123,
"thread_time_ms": 123,
"output_cardinality": 123,
"optimized_out": true,
"nothing_executed": true
}
}
}
]
}
}{
"message": "<string>",
"token": "<string>",
"monitorSql": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
text/sql
Text of query to execute
The body is of type string.
Response
OK
Describes the result from a query
info on the query
Show child attributes
Show child attributes
schema of the query results
Show child attributes
Show child attributes
the number of rows returned
the data returned
the statistics of the query
Show child attributes
Show child attributes
the explain analyze of the query
Show child attributes
Show child attributes
Was this page helpful?
⌘I