Skip to main content
GET
/
projects
/
{projectId}
/
environments
/
{environmentId}
/
observability
/
server
Error
A valid request URL is required to generate request examples
{
  "_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
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

projectId
string
required

The unique identifier of the Upsun project

Pattern: [a-z0-9]+
Example:

"abc123def456"

environmentId
string
required

The environment identifier

Pattern: .+
Example:

"main"

Query Parameters

from
integer<int64>
required

Start timestamp for the time range (Unix timestamp in seconds)

Example:

1704067200

to
integer<int64>
required

End timestamp for the time range (Unix timestamp in seconds)

Example:

1704153600

keys[]
enum<string>[]
required

Metrics to retrieve (wall time, memory usage, peak memory, CPU load, stdout, requests per minute)

Available options:
wt,
mu,
pmu,
load,
stdout,
rpms
grain
integer

Granularity of data points in seconds. Auto-calculated if omitted.

Example:

10

contexts[]
enum<string>[]

Filter by execution contexts. Defaults to ["web"] with additive mode when neither contexts nor contexts_mode is specified.

Available options:
web,
cli
contexts_mode
enum<string>

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"].

Available options:
1,
-1
Example:

"1"

distribution_cost
enum<string>

Cost distribution dimension for server load distribution.

Available options:
wt,
pmu

Response

Server global metrics retrieved successfully

_quota
object
required

APM quota usage information

_grain
integer
required

Data granularity in seconds

Example:

5

_from
integer
required

Query start timestamp

Example:

1704067200

_to
integer
required

Query end timestamp

Example:

1704153600

_keys
string[]
required

Requested metric keys

Example:
["wt", "rpms"]
_agent
string<uuid>
required

Blackfire Agent UUID

Example:

"a38f69ca-3b56-4ea6-beac-272b2568164a"

_contexts
string[] | null
required

Applied context filter values

_contexts_mode
enum<string> | null
required

Context filter mode (additive=include only, subtractive=exclude)

Available options:
additive,
subtractive
_project_id
string
required

Project identifier

Example:

"abc123def456"

_environment_id
string
required

Environment identifier

Example:

"main"

_branch_machine_name
string
required

Branch machine name

Example:

"main-bvxea6i"

alert_evaluations
object[]
required

Alert rule evaluations for the time range

server
object
required

Server metrics data

_distribution_cost
enum<string>

Applied distribution cost dimension (wt=wall time, pmu=peak memory usage)

Available options:
wt,
pmu
Last modified on March 25, 2026