curl --request GET \
--url {schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/server \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/server"
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/server', 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/server",
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/server"
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/server")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/server")
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{
"_quota": {
"allowed": 2147000000,
"used": 103139,
"exceeded": false,
"period_started_at": "2026-02-01T00:00:00+00:00",
"period_ends_at": "2026-03-01T00:00:00+00:00"
},
"_grain": 10,
"_from": 1771435023,
"_to": 1771440423,
"_keys": [
"wt",
"rpms"
],
"_agent": "a38f69ca-3b56-4ea6-beac-272b2568164a",
"_contexts": [
"web"
],
"_contexts_mode": "additive",
"_project_id": "abc123def456",
"_environment_id": "main",
"_branch_machine_name": "main-bvxea6i",
"alert_evaluations": [
{
"timestamp": 1771435030,
"alert_rule_uuid": "b534721b-9751-49bf-ad86-e3bf50d6ec39",
"value": 92395.49,
"state": "normal"
}
],
"server": {
"total": 136328,
"data": [
{
"timestamp": 1771435020,
"rpms": 672,
"wt": 89698.03
},
{
"timestamp": 1771435030,
"rpms": 1338,
"wt": 82021.59
}
]
}
}{
"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 server monitoring overview
Returns time-series server monitoring data for the specified metrics (wall time, memory usage, peak memory usage, CPU load, stdout, requests per minute). Includes alert evaluations and APM quota usage. Data points contain metric values aggregated at the requested granularity.
curl --request GET \
--url {schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/server \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/server"
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/server', 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/server",
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/server"
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/server")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/server")
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{
"_quota": {
"allowed": 2147000000,
"used": 103139,
"exceeded": false,
"period_started_at": "2026-02-01T00:00:00+00:00",
"period_ends_at": "2026-03-01T00:00:00+00:00"
},
"_grain": 10,
"_from": 1771435023,
"_to": 1771440423,
"_keys": [
"wt",
"rpms"
],
"_agent": "a38f69ca-3b56-4ea6-beac-272b2568164a",
"_contexts": [
"web"
],
"_contexts_mode": "additive",
"_project_id": "abc123def456",
"_environment_id": "main",
"_branch_machine_name": "main-bvxea6i",
"alert_evaluations": [
{
"timestamp": 1771435030,
"alert_rule_uuid": "b534721b-9751-49bf-ad86-e3bf50d6ec39",
"value": 92395.49,
"state": "normal"
}
],
"server": {
"total": 136328,
"data": [
{
"timestamp": 1771435020,
"rpms": 672,
"wt": 89698.03
},
{
"timestamp": 1771435030,
"rpms": 1338,
"wt": 82021.59
}
]
}
}{
"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
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]+"abc123def456"
The environment identifier
.+"main"
Query Parameters
Start timestamp for the time range (Unix timestamp in seconds)
1704067200
End timestamp for the time range (Unix timestamp in seconds)
1704153600
Metrics to retrieve (wall time, memory usage, peak memory, CPU load, stdout, requests per minute)
wt, mu, pmu, load, stdout, rpms Granularity of data points in seconds. Auto-calculated if omitted.
10
Filter by execution contexts. Defaults to ["web"] with additive mode when neither contexts nor contexts_mode is specified.
web, cli Filter mode for contexts parameter. "1" (additive, default) includes only specified contexts. "-1" (subtractive) excludes specified contexts and includes all others. When neither contexts nor contexts_mode is specified, defaults to "1" (additive) with contexts=["web"].
1, -1 "1"
Filter by application names
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 by instance names
Filter mode for instances parameter. "1" (additive) includes only specified instances. "-1" (subtractive) excludes specified instances and includes all others. When omitted: defaults to "-1" if no instances values are provided; defaults to "1" (additive) if at least one instances value is provided.
1, -1 "1"
Cost distribution dimension for server load distribution.
wt, pmu Response
Server global metrics retrieved successfully
APM quota usage information
Show child attributes
Show child attributes
Data granularity in seconds
5
Query start timestamp
1704067200
Query end timestamp
1704153600
Requested metric keys
["wt", "rpms"]
Blackfire Agent UUID
"a38f69ca-3b56-4ea6-beac-272b2568164a"
Applied context filter values
Context filter mode (additive=include only, subtractive=exclude)
additive, subtractive Project identifier
"abc123def456"
Environment identifier
"main"
Branch machine name
"main-bvxea6i"
Alert rule evaluations for the time range
Show child attributes
Show child attributes
Server metrics data
Show child attributes
Show child attributes
Applied application filter values
Application filter mode (additive=include only, subtractive=exclude)
additive, subtractive Applied instance filter values
Instance filter mode (additive=include only, subtractive=exclude)
additive, subtractive Applied distribution cost dimension (wt=wall time, pmu=peak memory usage)
wt, pmu Was this page helpful?