curl --request GET \
--url https://api.byteful.com/1.0/public/user/analytics/graph \
--header 'X-API-Private-Key: <api-key>' \
--header 'X-API-Public-Key: <api-key>'import requests
url = "https://api.byteful.com/1.0/public/user/analytics/graph"
headers = {
"X-API-Private-Key": "<api-key>",
"X-API-Public-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-API-Private-Key': '<api-key>', 'X-API-Public-Key': '<api-key>'}
};
fetch('https://api.byteful.com/1.0/public/user/analytics/graph', 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.byteful.com/1.0/public/user/analytics/graph",
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-Private-Key: <api-key>",
"X-API-Public-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.byteful.com/1.0/public/user/analytics/graph"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Private-Key", "<api-key>")
req.Header.Add("X-API-Public-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.byteful.com/1.0/public/user/analytics/graph")
.header("X-API-Private-Key", "<api-key>")
.header("X-API-Public-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.byteful.com/1.0/public/user/analytics/graph")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Private-Key"] = '<api-key>'
request["X-API-Public-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"intervals": [
{
"bytes": 1102393,
"error": 0,
"interval": "2025-02-27 13:02:00",
"interval_name": "2025-02-27 13:02:00",
"requests": 266,
"smartpath_money_saved": 0,
"smartpath_routed_bytes": 0,
"smartpath_routed_requests": 0,
"successful": 266
}
],
"total_bytes": 1102393,
"total_error": 0,
"total_requests": 266,
"total_smartpath_money_saved": 0,
"total_smartpath_routed_bytes": 0,
"total_smartpath_routed_requests": 0,
"total_successful": 266
},
"message": "Analytics graphing successful."
}Graph Proxy Analytics
This endpoint analyzes proxy usage for a given customer within a specified time range
and groups them by one of four discrete intervals: minute, hour, day, or month.
You can either
- Provide a
presetparameter, which automatically sets period and interval (e.g.last_day,last_hour, etc.) - OR, manually specify your own time range (
period_start,period_end) plusinterval
You can also filter by hostname, network, proxy_user_id, and service_id.
Service ID can only be filtered if period is within 7 days and interval is hour or less.
Hostname filters are disallowed if searching older than 90 days.
curl --request GET \
--url https://api.byteful.com/1.0/public/user/analytics/graph \
--header 'X-API-Private-Key: <api-key>' \
--header 'X-API-Public-Key: <api-key>'import requests
url = "https://api.byteful.com/1.0/public/user/analytics/graph"
headers = {
"X-API-Private-Key": "<api-key>",
"X-API-Public-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-API-Private-Key': '<api-key>', 'X-API-Public-Key': '<api-key>'}
};
fetch('https://api.byteful.com/1.0/public/user/analytics/graph', 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.byteful.com/1.0/public/user/analytics/graph",
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-Private-Key: <api-key>",
"X-API-Public-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.byteful.com/1.0/public/user/analytics/graph"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Private-Key", "<api-key>")
req.Header.Add("X-API-Public-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.byteful.com/1.0/public/user/analytics/graph")
.header("X-API-Private-Key", "<api-key>")
.header("X-API-Public-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.byteful.com/1.0/public/user/analytics/graph")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Private-Key"] = '<api-key>'
request["X-API-Public-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"intervals": [
{
"bytes": 1102393,
"error": 0,
"interval": "2025-02-27 13:02:00",
"interval_name": "2025-02-27 13:02:00",
"requests": 266,
"smartpath_money_saved": 0,
"smartpath_routed_bytes": 0,
"smartpath_routed_requests": 0,
"successful": 266
}
],
"total_bytes": 1102393,
"total_error": 0,
"total_requests": 266,
"total_smartpath_money_saved": 0,
"total_smartpath_routed_bytes": 0,
"total_smartpath_routed_requests": 0,
"total_successful": 266
},
"message": "Analytics graphing successful."
}Authorizations
Private API key for user-level authentication.
Public API key for user-level authentication.
Query Parameters
If provided, overrides period_start, period_end, and interval. Must be one of ["last_hour", "last_day", "last_week", "last_30_days", "last_60_days", "last_90_days", "last_year"].
End of the analytics period, exclusive. Date-only values (e.g. 2026-07-29) cover that entire day.
minute, hour, day, month datacenter, isp, residential, mobile If true, includes avg_log_concurrency and max_log_concurrency per interval bucket and total_avg_log_concurrency and total_max_log_concurrency for the period. Only valid when interval is minute or hour (raw log data). Returns 422 for day or month intervals.

