cURL
curl --request POST \
--url https://{axiom-domain}/v1/query/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"queryId": "<string>"
}
]
'import requests
url = "https://{axiom-domain}/v1/query/batch"
payload = [{ "queryId": "<string>" }]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([{queryId: '<string>'}])
};
fetch('https://{axiom-domain}/v1/query/batch', 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://{axiom-domain}/v1/query/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'queryId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{axiom-domain}/v1/query/batch"
payload := strings.NewReader("[\n {\n \"queryId\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{axiom-domain}/v1/query/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"queryId\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://{axiom-domain}/v1/query/batch")
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"] = 'application/json'
request.body = "[\n {\n \"queryId\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"code": 123,
"detail": {
"column": 123,
"line": 123,
"message": "<string>"
},
"message": "<string>"
}Run batch query to edge deployment
POST
/
query
/
batch
cURL
curl --request POST \
--url https://{axiom-domain}/v1/query/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"queryId": "<string>"
}
]
'import requests
url = "https://{axiom-domain}/v1/query/batch"
payload = [{ "queryId": "<string>" }]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([{queryId: '<string>'}])
};
fetch('https://{axiom-domain}/v1/query/batch', 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://{axiom-domain}/v1/query/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'queryId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{axiom-domain}/v1/query/batch"
payload := strings.NewReader("[\n {\n \"queryId\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{axiom-domain}/v1/query/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"queryId\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://{axiom-domain}/v1/query/batch")
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"] = 'application/json'
request.body = "[\n {\n \"queryId\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"code": 123,
"detail": {
"column": 123,
"line": 123,
"message": "<string>"
},
"message": "<string>"
}Use this endpoint to query data from a specific edge deployment. The data you query must be stored in the edge deployment where you query it. For more information, see Query data and Edge deployments.The base domain for this endpoint is the base domain of the edge deployment where you want to query data.
This endpoint only supports API tokens. Personal access tokens (PATs) aren’t supported. For more information, see Tokens.
| Edge deployment | Base domain for ingest and query |
|---|---|
US East 1 (AWS) | us-east-1.aws.edge.axiom.co |
EU Central 1 (AWS) | eu-central-1.aws.edge.axiom.co |
Authorizations
Query Parameters
Maximum number of concurrent queries to execute
Required range:
1 <= x <= 20Whether to bypass cache for all queries in the batch
Contains the source of the APL query (for example console, dashboard, etc.)
Contains the id of the source, for example dashboard_id
Body
application/json
Response
SSE stream of query results. Each event carries a kind field
("apl" or "mpl") indicating how the data payload for that
queryId should be interpreted.
Was this page helpful?
⌘I