curl --request GET \
--url {schemes}://api.upsun.com/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}/filter \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}/filter"
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/{envId}/continuous-profiling/app/{app}/filter', 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/{envId}/continuous-profiling/app/{app}/filter",
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/{envId}/continuous-profiling/app/{app}/filter"
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/{envId}/continuous-profiling/app/{app}/filter")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}/filter")
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{
"fields": {
"runtime": {
"distinct_values": 2,
"values": [
{
"value": "go",
"count": 1500
},
{
"value": "python",
"count": 500
}
]
},
"runtime_version": {
"distinct_values": 3,
"values": [
{
"value": "1.21",
"count": 1000
},
{
"value": "1.22",
"count": 400
},
{
"value": "3.12",
"count": 600
}
]
}
},
"max_applicable_filters": 45
}{
"code": 400,
"message": "Invalid filters"
}{
"code": 499,
"message": "Timeout while querying data"
}Get application filter values
Returns available label filter fields and their distinct values for the given application. Use these values to build filter parameters (runtime[], runtime_version[], etc.) on the timeline and merge endpoints
curl --request GET \
--url {schemes}://api.upsun.com/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}/filter \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}/filter"
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/{envId}/continuous-profiling/app/{app}/filter', 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/{envId}/continuous-profiling/app/{app}/filter",
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/{envId}/continuous-profiling/app/{app}/filter"
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/{envId}/continuous-profiling/app/{app}/filter")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}/filter")
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{
"fields": {
"runtime": {
"distinct_values": 2,
"values": [
{
"value": "go",
"count": 1500
},
{
"value": "python",
"count": 500
}
]
},
"runtime_version": {
"distinct_values": 3,
"values": [
{
"value": "1.21",
"count": 1000
},
{
"value": "1.22",
"count": 400
},
{
"value": "3.12",
"count": 600
}
]
}
},
"max_applicable_filters": 45
}{
"code": 400,
"message": "Invalid filters"
}{
"code": 499,
"message": "Timeout while querying data"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the Upsun project
[a-z0-9]+"22sdxmbrs4lai"
The environment identifier
.+"main"
URL-encoded application name
.+"my-app"
Query Parameters
Start of the time range as a Unix timestamp, defaults to now minus 30 minutes.
1700000000
End of the time range as a Unix timestamp, defaults to now.
1700003600
Profile type to query.
cpu, wall-time, wall, goroutine, alloc_objects, alloc_space, inuse_objects, inuse_space, space "cpu"
Filter mode for runtime parameter. "1" (additive) includes only specified runtimes. "-1" (subtractive) excludes specified runtimes and includes all others. When omitted while runtime[] is supplied, defaults to "1" (additive).
1, -1 1
Filter by runtime language. Can be specified multiple times for multiple values (e.g., ?runtime[]=go&runtime[]=python). Use runtime_mode to control inclusion/exclusion behavior.
Filter mode for runtime_version parameter. "1" (additive) includes only specified versions. "-1" (subtractive) excludes specified versions and includes all others. When omitted while runtime_version[] is supplied, defaults to "1" (additive).
1, -1 1
Filter by runtime version. Can be specified multiple times for multiple values (e.g., ?runtime_version[]=1.21&runtime_version[]=1.22). Use runtime_version_mode to control inclusion/exclusion behavior.
Filter mode for runtime_arch parameter. "1" (additive) includes only specified architectures. "-1" (subtractive) excludes specified architectures and includes all others. When omitted while runtime_arch[] is supplied, defaults to "1" (additive).
1, -1 1
Filter by runtime architecture. Can be specified multiple times for multiple values (e.g., ?runtime_arch[]=amd64&runtime_arch[]=arm64). Use runtime_arch_mode to control inclusion/exclusion behavior.
Filter mode for runtime_os parameter. "1" (additive) includes only specified operating systems. "-1" (subtractive) excludes specified operating systems and includes all others. When omitted while runtime_os[] is supplied, defaults to "1" (additive).
1, -1 1
Filter by runtime operating system. Can be specified multiple times for multiple values (e.g., ?runtime_os[]=linux&runtime_os[]=darwin). Use runtime_os_mode to control inclusion/exclusion behavior.
Filter mode for probe_version parameter. "1" (additive) includes only specified probe versions. "-1" (subtractive) excludes specified probe versions and includes all others. When omitted while probe_version[] is supplied, defaults to "1" (additive).
1, -1 1
Filter by probe version. Can be specified multiple times for multiple values (e.g., ?probe_version[]=2.28.2&probe_version[]=2.28.1). Use probe_version_mode to control inclusion/exclusion behavior.
Response
Filter values retrieved successfully
Map of filter field name to its distinct values and counts
Show child attributes
Show child attributes
{
"runtime": {
"distinct_values": 2,
"values": [
{ "value": "go", "count": 1500 },
{ "value": "python", "count": 500 }
]
},
"runtime_version": {
"distinct_values": 3,
"values": [
{ "value": "1.21", "count": 1000 },
{ "value": "1.22", "count": 400 },
{ "value": "3.12", "count": 600 }
]
}
}
Maximum number of applicable filters
45
Was this page helpful?