curl --request POST \
--url https://engine-api.unomiq.com/engine/metrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Unomiq-App-Id: <x-unomiq-app-id>' \
--data '
{
"filter": {
"field": "<string>",
"value": "<string>"
}
}
'import requests
url = "https://engine-api.unomiq.com/engine/metrics"
payload = { "filter": {
"field": "<string>",
"value": "<string>"
} }
headers = {
"X-Unomiq-App-Id": "<x-unomiq-app-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Unomiq-App-Id': '<x-unomiq-app-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({filter: {field: '<string>', value: '<string>'}})
};
fetch('https://engine-api.unomiq.com/engine/metrics', 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://engine-api.unomiq.com/engine/metrics",
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([
'filter' => [
'field' => '<string>',
'value' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Unomiq-App-Id: <x-unomiq-app-id>"
],
]);
$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://engine-api.unomiq.com/engine/metrics"
payload := strings.NewReader("{\n \"filter\": {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Unomiq-App-Id", "<x-unomiq-app-id>")
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://engine-api.unomiq.com/engine/metrics")
.header("X-Unomiq-App-Id", "<x-unomiq-app-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://engine-api.unomiq.com/engine/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Unomiq-App-Id"] = '<x-unomiq-app-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"trace_count": 123,
"duration": {
"mean": 123,
"median": 123,
"p50": 123,
"p90": 123,
"p95": 123,
"p99": 123,
"min": 123,
"max": 123,
"stddev": 123
},
"cost": {
"mean": 123,
"median": 123,
"p50": 123,
"p90": 123,
"p95": 123,
"p99": 123,
"min": 123,
"max": 123,
"stddev": 123
},
"spans_per_trace": {
"mean": 123,
"median": 123,
"p50": 123,
"p90": 123,
"p95": 123,
"p99": 123,
"min": 123,
"max": 123,
"stddev": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get Trace Metrics
Get aggregated metrics for traces.
Requires a valid JWT token with the read:traces permission.
Computes statistical distributions (mean, median, percentiles, min, max, stddev) for trace duration, cost per trace, and spans per trace.
Supports the same filter expressions as the engine/query endpoint.
Returns trace metrics with duration, cost, and volume statistics.
curl --request POST \
--url https://engine-api.unomiq.com/engine/metrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Unomiq-App-Id: <x-unomiq-app-id>' \
--data '
{
"filter": {
"field": "<string>",
"value": "<string>"
}
}
'import requests
url = "https://engine-api.unomiq.com/engine/metrics"
payload = { "filter": {
"field": "<string>",
"value": "<string>"
} }
headers = {
"X-Unomiq-App-Id": "<x-unomiq-app-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Unomiq-App-Id': '<x-unomiq-app-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({filter: {field: '<string>', value: '<string>'}})
};
fetch('https://engine-api.unomiq.com/engine/metrics', 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://engine-api.unomiq.com/engine/metrics",
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([
'filter' => [
'field' => '<string>',
'value' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Unomiq-App-Id: <x-unomiq-app-id>"
],
]);
$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://engine-api.unomiq.com/engine/metrics"
payload := strings.NewReader("{\n \"filter\": {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Unomiq-App-Id", "<x-unomiq-app-id>")
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://engine-api.unomiq.com/engine/metrics")
.header("X-Unomiq-App-Id", "<x-unomiq-app-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://engine-api.unomiq.com/engine/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Unomiq-App-Id"] = '<x-unomiq-app-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"trace_count": 123,
"duration": {
"mean": 123,
"median": 123,
"p50": 123,
"p90": 123,
"p95": 123,
"p99": 123,
"min": 123,
"max": 123,
"stddev": 123
},
"cost": {
"mean": 123,
"median": 123,
"p50": 123,
"p90": 123,
"p95": 123,
"p99": 123,
"min": 123,
"max": 123,
"stddev": 123
},
"spans_per_trace": {
"mean": 123,
"median": 123,
"p50": 123,
"p90": 123,
"p95": 123,
"p99": 123,
"min": 123,
"max": 123,
"stddev": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Query Parameters
Start datetime (inclusive)
"2025-01-15T00:00:00Z"
End datetime (exclusive)
"2025-01-16T00:00:00Z"
Body
Request model for query filter.
A single filter condition.
- Condition
- AndGroup
- OrGroup
Show child attributes
Show child attributes
Response
Successful Response
Aggregated metrics for traces.
Statistical distribution metrics.
Show child attributes
Show child attributes
Statistical distribution metrics.
Show child attributes
Show child attributes
Statistical distribution metrics.
Show child attributes
Show child attributes