Skip to main content
GET
/
api
/
v1
/
explorer
/
query-runs
Get Latest Query Run Handler
curl --request GET \
  --url https://api.allium.so/api/v1/explorer/query-runs \
  --header 'X-API-KEY: <api-key>'
import requests

url = "https://api.allium.so/api/v1/explorer/query-runs"

headers = {"X-API-KEY": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};

fetch('https://api.allium.so/api/v1/explorer/query-runs', 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://api.allium.so/api/v1/explorer/query-runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);

$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://api.allium.so/api/v1/explorer/query-runs"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-KEY", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.allium.so/api/v1/explorer/query-runs")
.header("X-API-KEY", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.allium.so/api/v1/explorer/query-runs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "run_id": "<string>",
  "query_id": "<string>",
  "query_config": {
    "sql": "<string>",
    "limit": 123,
    "parameters": {}
  },
  "creator_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "stats": {
    "start_time": "2023-11-07T05:31:56Z",
    "end_time": "2023-11-07T05:31:56Z",
    "sql": "<string>",
    "row_count": 123,
    "data_size_bytes": 123
  },
  "error": "<string>",
  "results": {
    "storage_type": "gcs"
  },
  "zed_token": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

X-API-KEY
string
header
required

Query Parameters

query_id
string
required

Response

Successful Response

run_id
string
required
query_id
string
required
query_config
QueryConfig · object
required
creator_id
string
required
created_at
string<date-time>
required
status
enum<string>
required

An enumeration.

Available options:
created,
queued,
running,
success,
failed,
canceled
completed_at
string<date-time>
stats
QueryRunStats · object
error
string
results
QueryRunResults · object
zed_token
string