Skip to main content
GET
/
projects
/
{projectId}
/
environments
/
{environmentId}
/
observability
/
resources
/
overview
Get resource metrics overview
curl --request GET \
  --url {schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/observability/resources/overview \
  --header 'Authorization: Bearer <token>'
{
  "_grain": 5,
  "_from": 1704067200,
  "_to": 1704153600,
  "_project_id": "abc123def456",
  "_environment_id": "main",
  "_branch_machine_name": "main-bvxea6i",
  "data": [
    {
      "timestamp": 1704067200,
      "services": {
        "app": {
          "cpu_used": {
            "avg": 0.45
          },
          "memory_used": {
            "avg": 612892672
          }
        }
      }
    },
    {
      "timestamp": 1704070800
    },
    {
      "timestamp": 1704074400,
      "services": {
        "app": {
          "cpu_used": {
            "avg": 0.52
          },
          "memory_used": {
            "avg": 625000000
          }
        }
      }
    }
  ]
}

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

service
string

Filter by specific service name (optional)

Example:

"app"

services[]
string[]

Filter results to specific services. Can be specified multiple times for multiple services. When omitted, all services are included by default. Use services_mode to control inclusion/exclusion behavior. Specify parameter multiple times for multiple values (e.g., ?services[]=app&services[]=database).

services_mode
enum<string>

Filter mode for services parameter. "1" (additive) includes only specified services. "-1" (subtractive, default) excludes specified services and includes all others.

Available options:
1,
-1
Example:

"1"

Response

Resource metrics retrieved successfully

_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

_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"

data
object[]
required

Array of timestamped data points, each containing resource metrics grouped by service name. Each data point contains timestamp and optional data fields. Fields are omitted for timestamps with no data - this indicates no data was received.

Example:
[
  {
    "timestamp": 1704067200,
    "services": {
      "app": {
        "cpu_used": { "avg": 0.45 },
        "memory_used": { "avg": 612892672 }
      }
    }
  },
  { "timestamp": 1704070800 },
  {
    "timestamp": 1704074400,
    "services": {
      "app": {
        "cpu_used": { "avg": 0.52 },
        "memory_used": { "avg": 625000000 }
      }
    }
  }
]
Last modified on March 25, 2026