Skip to main content
GET
/
api
/
v1
/
traces
/
stats
Trace Stats
curl --request GET \
  --url https://api.example.com/api/v1/traces/stats
import requests

url = "https://api.example.com/api/v1/traces/stats"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/api/v1/traces/stats', 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.example.com/api/v1/traces/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$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.example.com/api/v1/traces/stats"

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

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.example.com/api/v1/traces/stats")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/v1/traces/stats")

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

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "total_calls": 123,
  "total_tokens": 123,
  "avg_latency_ms": 123,
  "blocked_calls": 123,
  "redacted_calls": 123
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Headers

Authorization
string | null

Query Parameters

proxy_id
string<uuid> | null
from
string<date-time> | null
to
string<date-time> | null

Response

Successful Response

total_calls
integer
required
total_tokens
integer
required
avg_latency_ms
number | null
required
blocked_calls
integer
required
redacted_calls
integer
required