List Query History requests
curl --request GET \
--url https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/query-history/requests \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/query-history/requests"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/query-history/requests', 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://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/query-history/requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/query-history/requests"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/query-history/requests")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/query-history/requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"cacheType": "<string>",
"id": "<string>",
"isPlayground": true,
"isSubscription": true,
"requestId": "<string>",
"spanId": "<string>",
"status": "success",
"timestamp": "<string>",
"usedPreAggregations": true,
"apiType": "<string>",
"durationMs": 123,
"error": "<string>",
"preAggregations": "<string>",
"query": "<string>",
"responseBytes": 123,
"securityContext": "<string>"
}
],
"pageInfo": {
"hasNextPage": true,
"hasPreviousPage": true,
"endCursor": "<string>",
"startCursor": "<string>"
}
}Query History
List Query History requests
GET
/
api
/
v1
/
deployments
/
{deploymentId}
/
query-history
/
requests
List Query History requests
curl --request GET \
--url https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/query-history/requests \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/query-history/requests"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/query-history/requests', 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://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/query-history/requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/query-history/requests"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/query-history/requests")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/query-history/requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"cacheType": "<string>",
"id": "<string>",
"isPlayground": true,
"isSubscription": true,
"requestId": "<string>",
"spanId": "<string>",
"status": "success",
"timestamp": "<string>",
"usedPreAggregations": true,
"apiType": "<string>",
"durationMs": 123,
"error": "<string>",
"preAggregations": "<string>",
"query": "<string>",
"responseBytes": 123,
"securityContext": "<string>"
}
],
"pageInfo": {
"hasNextPage": true,
"hasPreviousPage": true,
"endCursor": "<string>",
"startCursor": "<string>"
}
}API requests to the deployment, newest first. Covers the deployment’s production API requests that queried data (REST, GraphQL, SQL and WebSocket), as the Query History page in Cube Cloud shows them; requests to development branches and metadata calls are left out. How far back it reaches is the deployment’s Query History retention. Filters combine with AND. A page holds up to 200 requests (100 by default). An
endCursor keeps its first page’s filters: with after, the other filters are ignored. Open a request with GET …/query-history/requests/{id} to see the SQL it generated.Authorizations
Query Parameters
Only requests at or after this ISO 8601 date or date-time, UTC unless it names a zone. Defaults to 24 hours before to. A window that starts earlier than the deployment’s Query History retention answers 400.
Pattern:
^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?$