cURL
curl --request POST \
--url https://{axiom-domain}/v1/query/_mpl \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endTime": "<string>",
"startTime": "<string>",
"mpl": "<string>"
}
'import requests
url = "https://{axiom-domain}/v1/query/_mpl"
payload = {
"endTime": "<string>",
"startTime": "<string>",
"mpl": "<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({endTime: '<string>', startTime: '<string>', mpl: '<string>'})
};
fetch('https://{axiom-domain}/v1/query/_mpl', 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/_mpl",
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([
'endTime' => '<string>',
'startTime' => '<string>',
'mpl' => '<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/_mpl"
payload := strings.NewReader("{\n \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"mpl\": \"<string>\"\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/_mpl")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"mpl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{axiom-domain}/v1/query/_mpl")
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 \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"mpl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"error": "<string>",
"message": "<string>"
}Run MPL query to edge deployment
POST
/
query
/
_mpl
cURL
curl --request POST \
--url https://{axiom-domain}/v1/query/_mpl \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endTime": "<string>",
"startTime": "<string>",
"mpl": "<string>"
}
'import requests
url = "https://{axiom-domain}/v1/query/_mpl"
payload = {
"endTime": "<string>",
"startTime": "<string>",
"mpl": "<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({endTime: '<string>', startTime: '<string>', mpl: '<string>'})
};
fetch('https://{axiom-domain}/v1/query/_mpl', 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/_mpl",
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([
'endTime' => '<string>',
'startTime' => '<string>',
'mpl' => '<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/_mpl"
payload := strings.NewReader("{\n \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"mpl\": \"<string>\"\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/_mpl")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"mpl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{axiom-domain}/v1/query/_mpl")
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 \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"mpl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"error": "<string>",
"message": "<string>"
}Support for MPL queries is currently in public preview. For more information, see Feature states.
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
Response format. If omitted, the Accept header is used for content negotiation. Defaults to metrics-v2 when neither is specified.
Available options:
metrics-v1, metrics-v2 Body
application/json
Response
MetricsResult
Metrics query result (streaming binary data)
Was this page helpful?
⌘I