Query traffic (bandwidth) and request-count time series for your account or a specific sub-user, plus a per-domain breakdown. All analytics endpoints use POST (the request body carries the query parameters) and return flat, bespoke JSON — they do not use the standard {success, payload, ...} envelope.
Common request parameters. Every analytics endpoint accepts the same three inputs (domain breakdown adds limit):
user — nullable string. A sub-user uuid to scope results to one sub-user, or the literal string "All Users" (or omit / null) for the whole account.
period — nullable integer, one of 1, 2, 3.1 = last 24 hours, 2 = last 7 days, 3 = last 30 days. Defaults to 1.
timezone — nullable string. A valid IANA timezone name (e.g. "America/New_York") used to bucket the series. Defaults to UTC.
There is no custom date range.period is a fixed integer (1/2/3) — there are no start_date, end_date, or "custom" options. labels are full ISO-8601 timestamps: hourly buckets when period=1, daily buckets for period=2 and period=3.
Traffic Time Series
POST/v1/trafficRequires Auth
Traffic Time Series
Traffic Time Series
Return bandwidth usage over the selected period as two parallel arrays: labels (ISO-8601 timestamps) and data (bytes consumed in each bucket). Hourly buckets for period=1, daily otherwise.
We filled these in for you:userperiodtimezone
Tweak any value if you like — or just press Try.
Request Body
Name
Type
Required
Description
user
string
Optional
Sub-user uuid, or "All Users" (or null) for the whole account.
period
integer
Optional
Time window: 1 = 24h, 2 = 7d, 3 = 30d. Default 1.
timezone
string
Optional
IANA timezone used to bucket the series. Default UTC.
payload := strings.NewReader(`{"user":"All Users","period":2,"timezone":"America/New_York"}`)
req, _ := http.NewRequest("POST", "https://api.proxyhat.com/v1/traffic", payload)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Accept", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var series struct {
Labels []string `json:"labels"`
Data []int64 `json:"data"`
}
json.NewDecoder(resp.Body).Decode(&series)
for i, label := range series.Labels {
fmt.Printf("%s: %d bytes\n", label, series.Data[i])
}
POST/v1/traffic/period-totalRequires Auth
Traffic Period Total
Traffic Period Total
Return the total bandwidth (in bytes) consumed across the whole selected period as a single number. The response contains only a raw byte total — there is no pre-formatted human-readable field.
We filled these in for you:userperiodtimezone
Tweak any value if you like — or just press Try.
Request Body
Name
Type
Required
Description
user
string
Optional
Sub-user uuid, or "All Users" (or null) for the whole account.
period
integer
Optional
Time window: 1 = 24h, 2 = 7d, 3 = 30d. Default 1.
timezone
string
Optional
IANA timezone used to bound the period. Default UTC.
payload := strings.NewReader(`{"user":"All Users","period":3,"timezone":"UTC"}`)
req, _ := http.NewRequest("POST", "https://api.proxyhat.com/v1/traffic/period-total", payload)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Accept", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var result struct {
Total int64 `json:"total"`
}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("%.2f GB over the period\n", float64(result.Total)/1e9)
Requests Time Series
POST/v1/requestsRequires Auth
Requests Time Series
Requests Time Series
Return request counts over the selected period as parallel labels and data arrays. For period=1 the daily request totals are distributed across hourly buckets weighted by traffic; period=2 and period=3 return daily buckets.
We filled these in for you:userperiodtimezone
Tweak any value if you like — or just press Try.
Request Body
Name
Type
Required
Description
user
string
Optional
Sub-user uuid, or "All Users" (or null) for the whole account.
period
integer
Optional
Time window: 1 = 24h, 2 = 7d, 3 = 30d. Default 1.
timezone
string
Optional
IANA timezone used to bucket the series. Default UTC.
payload := strings.NewReader(`{"user":"All Users","period":2,"timezone":"UTC"}`)
req, _ := http.NewRequest("POST", "https://api.proxyhat.com/v1/requests/period-total", payload)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Accept", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var result struct {
Total int64 `json:"total"`
}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("%d requests over the period\n", result.Total)
Domain Breakdown
POST/v1/domain-breakdownRequires Auth
Domain Breakdown
Domain Breakdown
Return the top destination domains for the selected period, each with bytes of bandwidth and request count. Items are ordered by bandwidth descending. Accepts an additional limit parameter to cap the number of rows.
We filled these in for you:userperiodlimittimezone
Tweak any value if you like — or just press Try.
Request Body
Name
Type
Required
Description
user
string
Optional
Sub-user uuid, or "All Users" (or null) for the whole account.
period
integer
Optional
Time window: 1 = 24h, 2 = 7d, 3 = 30d. Default 1.
limit
integer
Optional
Maximum number of domains to return, 1–500. Default 50.
timezone
string
Optional
IANA timezone used to bound the period. Default UTC.