curl --request GET \
--url {schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls', 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 => "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"_grain": 5,
"_from": 1704067200,
"_to": 1704153600,
"_project_id": "abc123def456",
"_environment_id": "main",
"_environment_type": "production",
"_branch_machine_name": "main-bvxea6i",
"_breakdown_limit": 200,
"_breakdown_top_hits": 10,
"breakdown": {
"kind": "url",
"total": 396519,
"data": [
{
"url": "https://example.com/api/products",
"method": "GET",
"impact": 15234.67,
"average": 245.3,
"p_50": 198.5,
"p_96": 512.8,
"count": 62143,
"top_hit": true
},
{
"url": "https://example.com/api/orders",
"method": "POST",
"impact": 6543.21,
"average": 312.5,
"p_50": 267.8,
"p_96": 678.4,
"count": 20945,
"top_hit": false
}
]
},
"top_hits_timeline": {
"data": [
{
"timestamp": 1704067200,
"_total_consumed": 5678.9,
"_total_count": 1543,
"request_size": 524288,
"response_size": 2097152,
"urls": {
"GET-https://example.com/api/products": {
"count": 1543,
"impact": 378.45
}
},
"codes": {
"UNKNOWN": 0,
"1XX": 0,
"2XX": 1543,
"3XX": 0,
"4XX": 0,
"5XX": 0
}
},
{
"timestamp": 1704070800
}
]
},
"filters": {
"max_applicable_filters": 45,
"fields": {
"severity": {
"distinct_values": 3,
"type": "string",
"values": [
{
"value": "INFO",
"count": 297
},
{
"value": "ERROR",
"count": 2
}
]
}
}
},
"_applications": [
"app"
],
"_applications_mode": "1",
"_methods": [
"GET"
],
"_methods_mode": "1",
"_domains": [
"example.com"
],
"_domains_mode": "1",
"_code_slots": [
"2XX"
],
"_code_slots_mode": "1",
"_codes": [
"200"
],
"_codes_mode": "1",
"_request_duration_slots": [
"0-100"
],
"_request_duration_slots_mode": "1"
}{
"type": "https://tools.ietf.org/html/rfc2616#section-1",
"title": "Please ensure parameters are correct.",
"status": 400,
"violations": {
"grain": [
"Grain can not be larger than the selection windows."
],
"from": [
"The from timestamp must be in the past."
],
"to": [
"The to timestamp must be greater than the from timestamp."
]
}
}{
"error": "Too much data fetched",
"message": "Please reduce the time range or add more filters to narrow down the query"
}Get HTTP traffic timeline by URL
Returns HTTP traffic analytics with URLs ranked by impact (response time × request count), aggregated metrics (average, median, p96 response times in milliseconds), status code distributions, and time-series data. Use limit parameter to control total items returned (default: 200, max: 300) and top_hits_count to control how many items are flagged as top hits and tracked in the timeline (default: 10, max: 15). Items with index < top_hits_count are flagged with top_hit: true and tracked in top_hits_timeline; the remainder (up to limit) are returned with top_hit: false.
curl --request GET \
--url {schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls', 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 => "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"_grain": 5,
"_from": 1704067200,
"_to": 1704153600,
"_project_id": "abc123def456",
"_environment_id": "main",
"_environment_type": "production",
"_branch_machine_name": "main-bvxea6i",
"_breakdown_limit": 200,
"_breakdown_top_hits": 10,
"breakdown": {
"kind": "url",
"total": 396519,
"data": [
{
"url": "https://example.com/api/products",
"method": "GET",
"impact": 15234.67,
"average": 245.3,
"p_50": 198.5,
"p_96": 512.8,
"count": 62143,
"top_hit": true
},
{
"url": "https://example.com/api/orders",
"method": "POST",
"impact": 6543.21,
"average": 312.5,
"p_50": 267.8,
"p_96": 678.4,
"count": 20945,
"top_hit": false
}
]
},
"top_hits_timeline": {
"data": [
{
"timestamp": 1704067200,
"_total_consumed": 5678.9,
"_total_count": 1543,
"request_size": 524288,
"response_size": 2097152,
"urls": {
"GET-https://example.com/api/products": {
"count": 1543,
"impact": 378.45
}
},
"codes": {
"UNKNOWN": 0,
"1XX": 0,
"2XX": 1543,
"3XX": 0,
"4XX": 0,
"5XX": 0
}
},
{
"timestamp": 1704070800
}
]
},
"filters": {
"max_applicable_filters": 45,
"fields": {
"severity": {
"distinct_values": 3,
"type": "string",
"values": [
{
"value": "INFO",
"count": 297
},
{
"value": "ERROR",
"count": 2
}
]
}
}
},
"_applications": [
"app"
],
"_applications_mode": "1",
"_methods": [
"GET"
],
"_methods_mode": "1",
"_domains": [
"example.com"
],
"_domains_mode": "1",
"_code_slots": [
"2XX"
],
"_code_slots_mode": "1",
"_codes": [
"200"
],
"_codes_mode": "1",
"_request_duration_slots": [
"0-100"
],
"_request_duration_slots_mode": "1"
}{
"type": "https://tools.ietf.org/html/rfc2616#section-1",
"title": "Please ensure parameters are correct.",
"status": 400,
"violations": {
"grain": [
"Grain can not be larger than the selection windows."
],
"from": [
"The from timestamp must be in the past."
],
"to": [
"The to timestamp must be greater than the from timestamp."
]
}
}{
"error": "Too much data fetched",
"message": "Please reduce the time range or add more filters to narrow down the query"
}Authorizations
Path Parameters
Query Parameters
Filter mode for applications parameter. "1" (additive) includes only specified applications. "-1" (subtractive) excludes specified applications and includes all others. When omitted: defaults to "-1" if no applications values are provided; defaults to "1" (additive) if at least one applications value is provided.
1, -1 "1"
Filter mode for methods parameter. "1" (additive) includes only specified methods. "-1" (subtractive) excludes specified methods and includes all others. When omitted: defaults to "-1" if no methods values are provided; defaults to "1" (additive) if at least one methods value is provided.
1, -1 "1"
Filter by request domains/hosts. Can be specified multiple times for multiple values (e.g., ?domains[]=api.example.com&domains[]=www.example.com). Use domains_mode to control inclusion/exclusion behavior.
Filter mode for domains parameter. "1" (additive) includes only specified domains. "-1" (subtractive) excludes specified domains and includes all others. When omitted: defaults to "-1" if no domains values are provided; defaults to "1" (additive) if at least one domains value is provided.
1, -1 "1"
Filter mode for code_slots parameter. "1" (additive) includes only specified code groups. "-1" (subtractive) excludes specified code groups and includes all others. When omitted: defaults to "-1" if no code_slots values are provided; defaults to "1" (additive) if at least one code_slots value is provided.
1, -1 "1"
Filter mode for codes parameter. "1" (additive) includes only specified codes. "-1" (subtractive) excludes specified codes and includes all others. When omitted: defaults to "-1" if no codes values are provided; defaults to "1" (additive) if at least one codes value is provided.
1, -1 "1"
Filter by response time ranges (in milliseconds). Can be specified multiple times for multiple values (e.g., ?request_duration_slots[]=0-50&request_duration_slots[]=1600+). Use request_duration_slots_mode to control inclusion/exclusion behavior.
0-50, 50-100, 100-200, 200-400, 400-800, 800-1600, 1600+ Filter mode for request_duration_slots parameter. "1" (additive) includes only specified duration ranges. "-1" (subtractive) excludes specified duration ranges and includes all others. When omitted: defaults to "-1" if no request_duration_slots values are provided; defaults to "1" (additive) if at least one request_duration_slots value is provided.
1, -1 "1"
Response
HTTP traffic timeline by URL retrieved successfully
Was this page helpful?