> ## Documentation Index
> Fetch the complete documentation index at: https://developer.upsun.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get resource metrics overview

> Returns time-series resource utilization data for all services. Each timestamp includes per-service metrics: CPU (cores), memory (bytes), swap (bytes), pressure indicators (0.0-1.0), and per-mountpoint disk/inode usage. All metrics include statistical aggregations: min, max, avg, stddev, and percentiles (p50, p95-p99). Service names and mountpoint paths are dynamic. Aggregation values are nullable when insufficient data exists.



## OpenAPI

````yaml https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/resources/overview
openapi: 3.0.1
info:
  title: Upsun.com Rest API
  version: '1.0'
  contact:
    name: Support
    url: https://upsun.com/contact-us/
  termsOfService: https://upsun.com/trust-center/legal/tos/
  description: >
    # Introduction


    Upsun, formerly Platform.sh, is a container-based Platform-as-a-Service. Our
    main API

    is simply Git. With a single `git push` and a couple of YAML files in

    your repository you can deploy an arbitrarily complex cluster.

    Every [**Project**](#tag/Project) can have multiple applications (PHP,

    Node.js, Python, Ruby, Go, etc.) and managed, automatically

    provisioned services (databases, message queues, etc.).


    Each project also comes with multiple concurrent

    live staging/development [**Environments**](#tag/Environment).

    These ephemeral development environments

    are automatically created every time you push a new branch or create a

    pull request, and each has a full copy of the data of its parent branch,

    which is created on-the-fly in seconds.


    Our Git implementation supports integrations with third party Git

    providers such as GitHub, Bitbucket, or GitLab, allowing you to simply

    integrate Upsun into your existing workflow.


    ## Using the REST API


    In addition to the Git API, we also offer a REST API that allows you to
    manage

    every aspect of the platform, from managing projects and environments,

    to accessing accounts and subscriptions, to creating robust workflows

    and integrations with your CI systems and internal services.


    These API docs are generated from a standard **OpenAPI (Swagger)**
    Specification document

    which you can find here in [YAML](openapispec-upsun.yaml) and in
    [JSON](openapispec-upsun.json) formats.


    This RESTful API consumes and produces HAL-style JSON over HTTPS,

    and any REST library can be used to access it. On GitHub, we also host

    a few API libraries that you can use to make API access easier, such as our

    [PHP API client](https://github.com/upsun/upsun-sdk-php).


    In order to use the API you will first need to have an [Upsun
    account](https://auth.upsun.com/register/) 

    and [create an API Token](https://docs.upsun.com/anchors/cli/api-token/).


    # Authentication


    ## OAuth2


    API authentication is done with OAuth2 access tokens.


    ### API tokens


    You can use an API token as one way to get an OAuth2 access token. This

    is particularly useful in scripts, e.g. for CI pipelines.


    To create an API token, go to the "API Tokens" section

    of the "Account Settings" tab on the [Console](https://console.upsun.com).


    To exchange this API token for an access token, a `POST` request

    must be made to `https://auth.upsun.com/oauth2/token`.


    The request will look like this in cURL:


    <pre>

    curl -u platform-api-user: \
        -d 'grant_type=api_token&amp;api_token=<em><b>API_TOKEN</b></em>' \
        https://auth.upsun.com/oauth2/token
    </pre>


    This will return a "Bearer" access token that

    can be used to authenticate further API requests, for example:


    <pre>

    {
        "access_token": "<em><b>abcdefghij1234567890</b></em>",
        "expires_in": 900,
        "token_type": "bearer"
    }

    </pre>


    ### Using the Access Token


    To authenticate further API requests, include this returned bearer token

    in the `Authorization` header. For example, to retrieve a list of

    [Projects](#tag/Project)

    accessible by the current user, you can make the following request

    (substituting the dummy token for your own):


    <pre>

    curl -H "Authorization: Bearer <em><b>abcdefghij1234567890</b></em>" \
        https://api.upsun.com/projects
    </pre>


    # HAL Links


    Most endpoints in the API return fields which defines a HAL

    (Hypertext Application Language) schema for the requested endpoint.

    The particular objects returns and their contents can vary by endpoint.

    The payload examples we give here for the requests do not show these

    elements. These links can allow you to create a fully dynamic API client

    that does not need to hardcode any method or schema.


    Unless they are used for pagination we do not show the HAL links in the

    payload examples in this documentation for brevity and as their content

    is contextual (based on the permissions of the user).


    ## _links Objects


    Most endpoints that respond to `GET` requests will include a `_links` object

    in their response. The `_links` object contains a key-object pair labelled
    `self`, which defines

    two further key-value pairs:


    * `href` - A URL string referring to the fully qualified name of the
    returned object. For many endpoints, this will be the direct link to the API
    endpoint on the region gateway, rather than on the general API gateway. This
    means it may reference a host of, for example, `eu-2.platform.sh` rather
    than `api.upsun.com`.

    * `meta` - An object defining the OpenAPI Specification (OAS) [schema
    object](https://swagger.io/specification/#schemaObject) of the component
    returned by the endpoint.


    There may be zero or more other fields in the `_links` object resembling
    fragment identifiers

    beginning with a hash mark, e.g. `#edit` or `#delete`. Each of these keys

    refers to a JSON object containing two key-value pairs:


    * `href` - A URL string referring to the path name of endpoint which can
    perform the action named in the key.

    * `meta` - An object defining the OAS schema of the endpoint. This consists
    of a key-value pair, with the key defining an HTTP method and the value
    defining the [operation
    object](https://swagger.io/specification/#operationObject) of the endpoint.


    To use one of these HAL links, you must send a new request to the URL
    defined

    in the `href` field which contains a body defined the schema object in the
    `meta` field.


    For example, if you make a request such as `GET
    /projects/abcdefghij1234567890`, the `_links`

    object in the returned response will include the key `#delete`. That object

    will look something like this fragment:


    ```

    "#delete": {
        "href": "/api/projects/abcdefghij1234567890",
        "meta": {
            "delete": {
                "responses": {
                    . . . // Response definition omitted for space
                },
                "parameters": []
            }
        }
    }

    ```


    To use this information to delete a project, you would then send a `DELETE`

    request to the endpoint
    `https://api.upsun.com/api/projects/abcdefghij1234567890`

    with no body or parameters to delete the project that was originally
    requested.


    ## _embedded Objects


    Requests to endpoints which create or modify objects, such as `POST`,
    `PATCH`, or `DELETE`

    requests, will include an `_embedded` key in their response. The object

    represented by this key will contain the created or modified object. This

    object is identical to what would be returned by a subsequent `GET` request

    for the object referred to by the endpoint.
  x-logo:
    url: https://docs.upsun.com/images/upsun-api.svg
    href: https://upsun.com/#section/Introduction
    altText: Upsun logo
servers:
  - url: '{schemes}://api.upsun.com'
    description: The Upsun.com API gateway
    variables:
      schemes:
        default: https
security:
  - BearerAuth: []
tags:
  - name: Cert Management
    description: >
      User-supplied SSL/TLS certificates can be managed using these

      endpoints. You can now list and modify certificate provisioners

      using the `/projects/{projectId}/provisioners` and

      `/projects/{projectId}/provisioners/{certificateProvisionerDocumentId}`

      endpoints. For more information, see our

      [Third-party TLS
      certificate](https://docs.upsun.com/anchors/domains/custom/custom-certificates/)

      documentation. These endpoints are not for managing certificates

      that are automatically supplied by Upsun via Let's Encrypt.
  - name: Environment
    description: |
      On Upsun, an environment encompasses a single instance of your
      entire application stack, the services used by the application,
      the application's data storage, and the environment's backups.

      In general, an environment represents a single branch or merge request
      in the Git repository backing a project. It is a virtual cluster
      of read-only application and service containers with read-write
      mounts for application and service data.

      On Upsun, the default branch is your production environment—thus,
      merging changes to this branch will put those changes to production.
  - name: Environment Type
    description: >
      Environment Types is the way Upsun manages access. We currently have 3
      environment types:

      * Development

      * Staging

      * Production


      Each environment type will contain a group of users and their accesses. We
      manage access,

      adding, updating and removing users and their roles, here.


      Each environment will have a type, pointing to one of these 3 environment
      types.

      See `type` in [Environments](#tag/Environment).


      In general:

      * Production will be reserved for the default branch, and cannot be set
      manually.

      * An environment can be set to be type `staging` or development manually
      and when branching.


      Dedicated Generation 2 projects have different rules for environment
      types. If your project

      contains at least one of those Dedicated Generation 2 environments, the
      rules are slightly different:

      * All non-dedicated environments in your project can be `development` or
      `staging`, but never `production`.

      * Dedicated Generation 2 environments can be set either to `staging` or
      `production`, but never `development`.

      * The default branch is not considered to be a special case.
  - name: Environment Backups
    description: |
      A snapshot is a complete backup of an environment, including all the
      persistent data from all services running in an environment and all
      files present in mounted volumes.

      These endpoints can be used to trigger the creation of new backups,
      get information about existing backups, delete existing backups or
      restore a backup.
      More information about backups can be found in our
      [documentation](https://docs.upsun.com/anchors/environments/backup/).
  - name: Environment Variables
    description: >
      These endpoints manipulate user-defined variables which are bound to a

      specific environment, as well as (optionally) the children of an

      environment. These variables can be made available at both build time

      and runtime. For more information on environment variables,

      see the
      [Variables](https://docs.upsun.com/anchors/variables/set/environment/create/)

      section of the documentation.
  - name: Autoscaling
    description: >
      Upsun provides native support for autoscaling, allowing your applications
      to automatically adjust based on resource usage.

      This ensures that your apps remain responsive under load while helping you
      optimize costs.

      You can configure thresholds for metrics such as CPU, RAM, and request
      latency.  

      Resources will automatically scale to meet demand.

      Each container profile assigned to an application or service provides a
      specific combination of CPU and RAM, which you can select via the Upsun UI
      or CLI.


      These endpoints manage autoscaling configurations that are tied to a

      specific environment, and optionally to its child environments.

      You can define scaling rules based on metrics like CPU, memory, or

      request latency, and these rules will be applied at both build time

      and runtime. For more information on configuring autoscaling for your

      environments, see the
      [Autoscaling](https://docs.upsun.com/manage-resources/autoscaling.html)
      section

      of the documentation.
  - name: Project
    description: >
      ## Project Overview


      On Upsun, a Project is backed by a single Git repository

      and encompasses your entire application stack, the services

      used by your application, the application's data storage,

      the production and staging environments, and the backups of those

      environments.


      When you create a new project, you start with a single

      [Environment](#tag/Environment) called *Master*,

      corresponding to the master branch in the Git repository of

      the project—this will be your production environment.


      If you connect your project to an external Git repo

      using one of our [Third-Party Integrations](#tag/Third-Party-Integrations)

      a new development environment can be created for each branch

      or pull request created in the repository. When a new development

      environment is created, the production environment's data

      will be cloned on-the-fly, giving you an isolated, production-ready

      test environment.


      This set of API endpoints can be used to retrieve a list of projects

      associated with an API key, as well as create and update the parameters

      of existing projects.


      > **Note**:

      >

      > To list projects or to create a new project, use
      [`/subscriptions`](#tag/Subscriptions).
  - name: Project Variables
    description: >
      These endpoints manipulate user-defined variables which are bound to an

      entire project. These variables are accessible to all environments

      within a single project, and they can be made available at both build

      time and runtime. For more information on project variables,

      see the
      [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)

      section of the documentation.
  - name: Project Settings
    description: >
      These endpoints can be used to retrieve and manipulate project-level

      settings. Only the `initialize` property can be set by end users. It is
      used

      to initialize a project from an existing Git repository.


      The other properties can only be set by a privileged user.
  - name: Repository
    description: >
      The Git repository backing projects hosted on Upsun can be

      accessed in a **read-only** manner through the
      `/projects/{projectId}/git/*`

      family of endpoints. With these endpoints, you can retrieve objects from

      the Git repository in the same way that you would in a local environment.
  - name: Domain Management
    description: |
      These endpoints can be used to add, modify, or remove domains from
      a project. For more information on how domains function on
      Upsun, see the [Domains](https://docs.upsun.com/anchors/domains/custom/)
      section of our documentation.
  - name: Routing
    description: >
      These endpoints modify an environment's `routes:` section of the
      `.upsun/config.yaml` file.

      For routes to propagate to child environments, the child environments

      must be synchronized with their parent.


      More information about routing can be found in the
      [Routes](https://docs.upsun.com/anchors/routes/)

      section of the documentation.
  - name: Source Operations
    description: >
      These endpoints interact with source code operations as defined in the
      `source.operations`

      key in a project's `.upsun/config.yaml` configuration. More information

      on source code operations is

      [available in our user
      documentation](https://docs.upsun.com/anchors/app/source-operations/).
  - name: Deployment Target
    description: |
      Upsun is capable of deploying the production environments of
      projects in multiple topologies: both in clusters of containers, and
      as dedicated virtual machines. This is an internal API that can
      only be used by privileged users.
  - name: Deployments
    description: |
      The deployments endpoints gives detailed information about the actual
      deployment of an active environment. Currently, it returns the _current_
      deployment with information about the different apps, services, and
      routes contained within.
  - name: Third-Party Integrations
    description: |
      Upsun can easily integrate with many third-party services, including
      Git hosting services (GitHub, GitLab, and Bitbucket),
      health notification services (email, Slack, PagerDuty),
      performance analytics platforms (New Relic, Blackfire, Tideways),
      and webhooks.

      For clarification about what information each field requires, see the
      [External Integrations](https://docs.upsun.com/anchors/integrations/)
      documentation. NOTE: The names of the CLI arguments listed in the
      documentation are not always named exactly the same as the
      required body fields in the API request.
  - name: MFA
    description: >
      Multi-factor authentication (MFA) requires the user to present two (or
      more) types of evidence (or factors) to prove their identity.


      For example, the evidence might be a password and a device-generated code,
      which show the user has the knowledge factor ("something you know") 

      as well as the possession factor ("something you have"). In this way MFA
      offers good protection against the compromise of any single factor, 

      such as a stolen password.


      Using the MFA API you can set up time-based one-time passcodes (TOTP),
      which can be generated on a single registered device ("something you
      have") such as a mobile phone.
  - name: Subscriptions
    description: >
      Each project is represented by a subscription that holds the plan
      information.

      These endpoints can be used to go to a larger plan, add more storage, or
      subscribe to

      optional features.
  - name: Orders
    description: |
      These endpoints can be used to retrieve order information from our billing
      system. Here you can view information about your bill for our services,
      include the billed amount and a link to a PDF of the bill.
  - name: Invoices
    description: >
      These endpoints can be used to retrieve invoices from our billing system.

      An invoice of type "invoice" is generated automatically every month, if
      the customer has active projects.

      Invoices of type "credit_memo" are a result of manual action when there
      was a refund or an invoice correction.
  - name: Vouchers
    description: >
      These endpoints can be used to retrieve vouchers associated with a
      particular

      user as well as apply a voucher to a particular user.
  - name: Records
    description: >
      These endpoints retrieve information about which plans were assigned to a
      particular

      project at which time.
  - name: Support
    description: >
      These endpoints can be used to retrieve information about support ticket
      priority

      and allow you to submit new ticket to the Upsun Support Team.
  - name: System Information
    description: >
      These endpoints can be used to retrieve low-level information and interact
      with the

      core component of Upsun infrastructure.


      This is an internal API that can only be used by privileged users.
paths:
  /projects/{projectId}/environments/{environmentId}/observability/resources/overview:
    get:
      tags:
        - Resources
      summary: Get resource metrics overview
      description: >-
        Returns time-series resource utilization data for all services. Each
        timestamp includes per-service metrics: CPU (cores), memory (bytes),
        swap (bytes), pressure indicators (0.0-1.0), and per-mountpoint
        disk/inode usage. All metrics include statistical aggregations: min,
        max, avg, stddev, and percentiles (p50, p95-p99). Service names and
        mountpoint paths are dynamic. Aggregation values are nullable when
        insufficient data exists.
      operationId: resources_overview
      parameters:
        - name: projectId
          in: path
          description: The unique identifier of the Upsun project
          required: true
          schema:
            type: string
            pattern: '[a-z0-9]+'
            example: abc123def456
        - name: environmentId
          in: path
          description: The environment identifier
          required: true
          schema:
            type: string
            pattern: .+
            example: main
        - name: from
          in: query
          description: Start timestamp for the time range (Unix timestamp in seconds)
          required: true
          schema:
            type: integer
            format: int64
            example: 1704067200
        - name: to
          in: query
          description: End timestamp for the time range (Unix timestamp in seconds)
          required: true
          schema:
            type: integer
            format: int64
            example: 1704153600
        - name: service
          in: query
          description: Filter by specific service name (optional)
          required: false
          schema:
            type: string
            example: app
        - name: services[]
          in: query
          description: >-
            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).
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              example: app
        - name: services_mode
          in: query
          description: >-
            Filter mode for services parameter. "1" (additive) includes only
            specified services. "-1" (subtractive, default) excludes specified
            services and includes all others.
          required: false
          schema:
            type: string
            example: '1'
            default: null
            enum:
              - '1'
              - '-1'
      responses:
        '200':
          description: Resource metrics retrieved successfully
          content:
            application/json:
              schema:
                required:
                  - _grain
                  - _from
                  - _to
                  - _project_id
                  - _environment_id
                  - _branch_machine_name
                  - data
                properties:
                  _grain:
                    description: Data granularity in seconds
                    type: integer
                    example: 5
                  _from:
                    description: Query start timestamp
                    type: integer
                    example: 1704067200
                  _to:
                    description: Query end timestamp
                    type: integer
                    example: 1704153600
                  _project_id:
                    description: Project identifier
                    type: string
                    example: abc123def456
                  _environment_id:
                    description: Environment identifier
                    type: string
                    example: main
                  _branch_machine_name:
                    description: Branch machine name
                    type: string
                    example: main-bvxea6i
                  data:
                    description: >-
                      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.
                    type: array
                    items:
                      required:
                        - timestamp
                      properties:
                        timestamp:
                          description: Data point timestamp (Unix timestamp in seconds)
                          type: integer
                          example: 1704067200
                        services:
                          description: >-
                            Object with service names as keys (dynamic, e.g.,
                            "app", "database"). Each service contains: cpu_used,
                            cpu_limit, memory_used, memory_limit, swap_used,
                            swap_limit, memory_pressure, cpu_pressure,
                            io_pressure, irq_pressure, and mountpoints. All
                            metrics except limits include min, max, avg, stddev,
                            p50, p95-p99 aggregations (nullable).
                          type: object
                          example:
                            app:
                              cpu_used:
                                min: 0.12
                                max: 1.85
                                avg: 0.45
                                stddev: 0.32
                                p50: 0.42
                                p95: 1.23
                                p96: 1.34
                                p97: 1.45
                                p98: 1.62
                                p99: 1.78
                              cpu_limit:
                                max: 2
                              memory_used:
                                min: 536870912
                                max: 715827883
                                avg: 612892672
                                stddev: 45000000
                                p50: 605000000
                                p95: 690000000
                                p96: 695000000
                                p97: 700000000
                                p98: 708000000
                                p99: 712000000
                              memory_limit:
                                max: 1073741824
                              swap_used:
                                min: 0
                                max: 4194304
                                avg: 1048576
                                stddev: 850000
                                p50: 950000
                                p95: 3200000
                                p96: 3400000
                                p97: 3600000
                                p98: 3900000
                                p99: 4100000
                              swap_limit:
                                max: 536870912
                              memory_pressure:
                                min: 0
                                max: 0.15
                                avg: 0.03
                                stddev: 0.02
                                p50: 0.02
                                p95: 0.12
                                p96: 0.13
                                p97: 0.14
                                p98: 0.145
                                p99: 0.148
                              cpu_pressure:
                                min: 0
                                max: 0.08
                                avg: 0.01
                                stddev: 0.01
                                p50: 0.01
                                p95: 0.05
                                p96: 0.06
                                p97: 0.065
                                p98: 0.07
                                p99: 0.075
                              io_pressure:
                                min: 0
                                max: 0.22
                                avg: 0.05
                                stddev: 0.04
                                p50: 0.04
                                p95: 0.18
                                p96: 0.19
                                p97: 0.2
                                p98: 0.21
                                p99: 0.215
                              irq_pressure:
                                min: 0
                                max: 0.01
                                avg: 0.001
                                stddev: 0.002
                                p50: 0
                                p95: 0.008
                                p96: 0.009
                                p97: 0.0095
                                p98: 0.0097
                                p99: 0.0099
                              mountpoints:
                                '':
                                  disk_used:
                                    min: 3087007744
                                    max: 3221225472
                                    avg: 3154116608
                                    stddev: 35000000
                                    p50: 3150000000
                                    p95: 3210000000
                                    p96: 3215000000
                                    p97: 3217000000
                                    p98: 3219000000
                                    p99: 3220000000
                                  disk_limit:
                                    max: 10737418240
                                  inodes_used:
                                    min: 45000
                                    max: 52000
                                    avg: 48500
                                    stddev: 1500
                                    p50: 48400
                                    p95: 51200
                                    p96: 51400
                                    p97: 51600
                                    p98: 51800
                                    p99: 51900
                                  inodes_limit:
                                    max: 655360
                                /tmp:
                                  disk_used:
                                    min: 524288
                                    max: 2097152
                                    avg: 1310720
                                    stddev: 400000
                                    p50: 1300000
                                    p95: 1900000
                                    p96: 1950000
                                    p97: 2000000
                                    p98: 2050000
                                    p99: 2080000
                                  disk_limit:
                                    max: 1073741824
                                  inodes_used:
                                    min: 120
                                    max: 245
                                    avg: 182
                                    stddev: 25
                                    p50: 180
                                    p95: 230
                                    p96: 235
                                    p97: 238
                                    p98: 242
                                    p99: 244
                                  inodes_limit:
                                    max: 65536
                            database:
                              cpu_used:
                                min: 0.08
                                max: 2.45
                                avg: 0.62
                                stddev: 0.48
                                p50: 0.55
                                p95: 1.85
                                p96: 2.02
                                p97: 2.15
                                p98: 2.28
                                p99: 2.38
                              cpu_limit:
                                max: 4
                              memory_used:
                                min: 1073741824
                                max: 1610612736
                                avg: 1342177280
                                stddev: 120000000
                                p50: 1320000000
                                p95: 1550000000
                                p96: 1570000000
                                p97: 1585000000
                                p98: 1598000000
                                p99: 1606000000
                              memory_limit:
                                max: 2147483648
                              swap_used:
                                min: 0
                                max: 8388608
                                avg: 2097152
                                stddev: 1800000
                                p50: 1900000
                                p95: 6500000
                                p96: 7100000
                                p97: 7500000
                                p98: 7900000
                                p99: 8200000
                              swap_limit:
                                max: 1073741824
                              memory_pressure:
                                min: 0
                                max: 0.25
                                avg: 0.06
                                stddev: 0.05
                                p50: 0.05
                                p95: 0.2
                                p96: 0.21
                                p97: 0.22
                                p98: 0.23
                                p99: 0.24
                              cpu_pressure:
                                min: 0
                                max: 0.12
                                avg: 0.02
                                stddev: 0.02
                                p50: 0.02
                                p95: 0.09
                                p96: 0.1
                                p97: 0.105
                                p98: 0.11
                                p99: 0.115
                              io_pressure:
                                min: 0
                                max: 0.45
                                avg: 0.12
                                stddev: 0.09
                                p50: 0.1
                                p95: 0.35
                                p96: 0.38
                                p97: 0.4
                                p98: 0.42
                                p99: 0.44
                              irq_pressure:
                                min: 0
                                max: 0.02
                                avg: 0.003
                                stddev: 0.004
                                p50: 0.002
                                p95: 0.015
                                p96: 0.017
                                p97: 0.018
                                p98: 0.019
                                p99: 0.0195
                              mountpoints:
                                '':
                                  disk_used:
                                    min: 8589934592
                                    max: 9663676416
                                    avg: 9126805504
                                    stddev: 250000000
                                    p50: 9100000000
                                    p95: 9550000000
                                    p96: 9580000000
                                    p97: 9610000000
                                    p98: 9640000000
                                    p99: 9660000000
                                  disk_limit:
                                    max: 21474836480
                                  inodes_used:
                                    min: 125000
                                    max: 145000
                                    avg: 135000
                                    stddev: 4500
                                    p50: 134500
                                    p95: 142800
                                    p96: 143400
                                    p97: 144000
                                    p98: 144500
                                    p99: 144800
                                  inodes_limit:
                                    max: 1310720
                          additionalProperties:
                            properties:
                              cpu_used:
                                description: >-
                                  CPU usage in cores. Includes statistical
                                  aggregations (all nullable): min, max, avg,
                                  stddev, p50, p95, p96, p97, p98, p99
                                properties:
                                  min:
                                    description: Minimum CPU cores used
                                    type: number
                                    format: float
                                    example: 0.12
                                    nullable: true
                                  max:
                                    description: Maximum CPU cores used
                                    type: number
                                    format: float
                                    example: 1.85
                                    nullable: true
                                  avg:
                                    description: Average CPU cores used
                                    type: number
                                    format: float
                                    example: 0.45
                                    nullable: true
                                  stddev:
                                    description: Standard deviation of CPU cores used
                                    type: number
                                    format: float
                                    example: 0.32
                                    nullable: true
                                  p50:
                                    description: Median (50th percentile) CPU cores used
                                    type: number
                                    format: float
                                    example: 0.42
                                    nullable: true
                                  p95:
                                    description: 95th percentile CPU cores used
                                    type: number
                                    format: float
                                    example: 1.23
                                    nullable: true
                                  p96:
                                    description: 96th percentile CPU cores used
                                    type: number
                                    format: float
                                    example: 1.34
                                    nullable: true
                                  p97:
                                    description: 97th percentile CPU cores used
                                    type: number
                                    format: float
                                    example: 1.45
                                    nullable: true
                                  p98:
                                    description: 98th percentile CPU cores used
                                    type: number
                                    format: float
                                    example: 1.62
                                    nullable: true
                                  p99:
                                    description: 99th percentile CPU cores used
                                    type: number
                                    format: float
                                    example: 1.78
                                    nullable: true
                                type: object
                                additionalProperties: false
                              cpu_limit:
                                description: >-
                                  CPU limit in cores. Contains only max
                                  (nullable)
                                properties:
                                  max:
                                    description: Maximum CPU limit in cores
                                    type: number
                                    format: float
                                    example: 2
                                    nullable: true
                                type: object
                                additionalProperties: false
                              memory_used:
                                description: >-
                                  Memory usage in bytes. Includes statistical
                                  aggregations (all nullable): min, max, avg,
                                  stddev, p50, p95, p96, p97, p98, p99
                                properties:
                                  min:
                                    description: Minimum memory bytes used
                                    type: integer
                                    format: int64
                                    example: 536870912
                                    nullable: true
                                  max:
                                    description: Maximum memory bytes used
                                    type: integer
                                    format: int64
                                    example: 715827883
                                    nullable: true
                                  avg:
                                    description: Average memory bytes used
                                    type: number
                                    format: float
                                    example: 612892672
                                    nullable: true
                                  stddev:
                                    description: Standard deviation of memory bytes used
                                    type: number
                                    format: float
                                    example: 45000000
                                    nullable: true
                                  p50:
                                    description: Median (50th percentile) memory bytes used
                                    type: number
                                    format: float
                                    example: 605000000
                                    nullable: true
                                  p95:
                                    description: 95th percentile memory bytes used
                                    type: number
                                    format: float
                                    example: 690000000
                                    nullable: true
                                  p96:
                                    description: 96th percentile memory bytes used
                                    type: number
                                    format: float
                                    example: 695000000
                                    nullable: true
                                  p97:
                                    description: 97th percentile memory bytes used
                                    type: number
                                    format: float
                                    example: 700000000
                                    nullable: true
                                  p98:
                                    description: 98th percentile memory bytes used
                                    type: number
                                    format: float
                                    example: 708000000
                                    nullable: true
                                  p99:
                                    description: 99th percentile memory bytes used
                                    type: number
                                    format: float
                                    example: 712000000
                                    nullable: true
                                type: object
                                additionalProperties: false
                              memory_limit:
                                description: >-
                                  Memory limit in bytes. Contains only max
                                  (nullable)
                                properties:
                                  max:
                                    description: Maximum memory limit in bytes
                                    type: integer
                                    format: int64
                                    example: 1073741824
                                    nullable: true
                                type: object
                                additionalProperties: false
                              swap_used:
                                description: >-
                                  Swap usage in bytes. Includes statistical
                                  aggregations (all nullable): min, max, avg,
                                  stddev, p50, p95, p96, p97, p98, p99
                                properties:
                                  min:
                                    description: Minimum swap bytes used
                                    type: integer
                                    format: int64
                                    example: 0
                                    nullable: true
                                  max:
                                    description: Maximum swap bytes used
                                    type: integer
                                    format: int64
                                    example: 4194304
                                    nullable: true
                                  avg:
                                    description: Average swap bytes used
                                    type: number
                                    format: float
                                    example: 1048576
                                    nullable: true
                                  stddev:
                                    description: Standard deviation of swap bytes used
                                    type: number
                                    format: float
                                    example: 850000
                                    nullable: true
                                  p50:
                                    description: Median (50th percentile) swap bytes used
                                    type: number
                                    format: float
                                    example: 950000
                                    nullable: true
                                  p95:
                                    description: 95th percentile swap bytes used
                                    type: number
                                    format: float
                                    example: 3200000
                                    nullable: true
                                  p96:
                                    description: 96th percentile swap bytes used
                                    type: number
                                    format: float
                                    example: 3400000
                                    nullable: true
                                  p97:
                                    description: 97th percentile swap bytes used
                                    type: number
                                    format: float
                                    example: 3600000
                                    nullable: true
                                  p98:
                                    description: 98th percentile swap bytes used
                                    type: number
                                    format: float
                                    example: 3900000
                                    nullable: true
                                  p99:
                                    description: 99th percentile swap bytes used
                                    type: number
                                    format: float
                                    example: 4100000
                                    nullable: true
                                type: object
                                additionalProperties: false
                              swap_limit:
                                description: >-
                                  Swap limit in bytes. Contains only max
                                  (nullable)
                                properties:
                                  max:
                                    description: Maximum swap limit in bytes
                                    type: integer
                                    format: int64
                                    example: 536870912
                                    nullable: true
                                type: object
                                additionalProperties: false
                              memory_pressure:
                                description: >-
                                  Memory pressure stall indicator (0.0-1.0).
                                  Includes statistical aggregations (all
                                  nullable): min, max, avg, stddev, p50, p95,
                                  p96, p97, p98, p99
                                properties:
                                  min:
                                    type: number
                                    format: float
                                    example: 0
                                    nullable: true
                                  max:
                                    type: number
                                    format: float
                                    example: 0.15
                                    nullable: true
                                  avg:
                                    type: number
                                    format: float
                                    example: 0.03
                                    nullable: true
                                  stddev:
                                    type: number
                                    format: float
                                    example: 0.02
                                    nullable: true
                                  p50:
                                    type: number
                                    format: float
                                    example: 0.02
                                    nullable: true
                                  p95:
                                    type: number
                                    format: float
                                    example: 0.12
                                    nullable: true
                                  p96:
                                    type: number
                                    format: float
                                    example: 0.13
                                    nullable: true
                                  p97:
                                    type: number
                                    format: float
                                    example: 0.14
                                    nullable: true
                                  p98:
                                    type: number
                                    format: float
                                    example: 0.145
                                    nullable: true
                                  p99:
                                    type: number
                                    format: float
                                    example: 0.148
                                    nullable: true
                                type: object
                                additionalProperties: false
                              cpu_pressure:
                                description: >-
                                  CPU pressure stall indicator (0.0-1.0).
                                  Includes statistical aggregations (all
                                  nullable): min, max, avg, stddev, p50, p95,
                                  p96, p97, p98, p99
                                properties:
                                  min:
                                    type: number
                                    format: float
                                    example: 0
                                    nullable: true
                                  max:
                                    type: number
                                    format: float
                                    example: 0.08
                                    nullable: true
                                  avg:
                                    type: number
                                    format: float
                                    example: 0.01
                                    nullable: true
                                  stddev:
                                    type: number
                                    format: float
                                    example: 0.01
                                    nullable: true
                                  p50:
                                    type: number
                                    format: float
                                    example: 0.01
                                    nullable: true
                                  p95:
                                    type: number
                                    format: float
                                    example: 0.05
                                    nullable: true
                                  p96:
                                    type: number
                                    format: float
                                    example: 0.06
                                    nullable: true
                                  p97:
                                    type: number
                                    format: float
                                    example: 0.065
                                    nullable: true
                                  p98:
                                    type: number
                                    format: float
                                    example: 0.07
                                    nullable: true
                                  p99:
                                    type: number
                                    format: float
                                    example: 0.075
                                    nullable: true
                                type: object
                                additionalProperties: false
                              io_pressure:
                                description: >-
                                  I/O pressure stall indicator (0.0-1.0).
                                  Includes statistical aggregations (all
                                  nullable): min, max, avg, stddev, p50, p95,
                                  p96, p97, p98, p99
                                properties:
                                  min:
                                    type: number
                                    format: float
                                    example: 0
                                    nullable: true
                                  max:
                                    type: number
                                    format: float
                                    example: 0.22
                                    nullable: true
                                  avg:
                                    type: number
                                    format: float
                                    example: 0.05
                                    nullable: true
                                  stddev:
                                    type: number
                                    format: float
                                    example: 0.04
                                    nullable: true
                                  p50:
                                    type: number
                                    format: float
                                    example: 0.04
                                    nullable: true
                                  p95:
                                    type: number
                                    format: float
                                    example: 0.18
                                    nullable: true
                                  p96:
                                    type: number
                                    format: float
                                    example: 0.19
                                    nullable: true
                                  p97:
                                    type: number
                                    format: float
                                    example: 0.2
                                    nullable: true
                                  p98:
                                    type: number
                                    format: float
                                    example: 0.21
                                    nullable: true
                                  p99:
                                    type: number
                                    format: float
                                    example: 0.215
                                    nullable: true
                                type: object
                                additionalProperties: false
                              irq_pressure:
                                description: >-
                                  IRQ pressure stall indicator (0.0-1.0).
                                  Includes statistical aggregations (all
                                  nullable): min, max, avg, stddev, p50, p95,
                                  p96, p97, p98, p99
                                properties:
                                  min:
                                    type: number
                                    format: float
                                    example: 0
                                    nullable: true
                                  max:
                                    type: number
                                    format: float
                                    example: 0.01
                                    nullable: true
                                  avg:
                                    type: number
                                    format: float
                                    example: 0.001
                                    nullable: true
                                  stddev:
                                    type: number
                                    format: float
                                    example: 0.002
                                    nullable: true
                                  p50:
                                    type: number
                                    format: float
                                    example: 0
                                    nullable: true
                                  p95:
                                    type: number
                                    format: float
                                    example: 0.008
                                    nullable: true
                                  p96:
                                    type: number
                                    format: float
                                    example: 0.009
                                    nullable: true
                                  p97:
                                    type: number
                                    format: float
                                    example: 0.0095
                                    nullable: true
                                  p98:
                                    type: number
                                    format: float
                                    example: 0.0097
                                    nullable: true
                                  p99:
                                    type: number
                                    format: float
                                    example: 0.0099
                                    nullable: true
                                type: object
                                additionalProperties: false
                              mountpoints:
                                description: >-
                                  Object with mountpoint paths as keys (dynamic,
                                  e.g., "", "/tmp", "/mnt"). Each mountpoint
                                  contains: disk_used, disk_limit, inodes_used,
                                  inodes_limit. All metrics except limits
                                  include min, max, avg, stddev, p50, p95-p99
                                  aggregations (nullable).
                                type: object
                                additionalProperties:
                                  properties:
                                    disk_used:
                                      description: >-
                                        Disk usage in bytes. Includes
                                        statistical aggregations (all nullable):
                                        min, max, avg, stddev, p50, p95, p96,
                                        p97, p98, p99
                                      properties:
                                        min:
                                          description: Minimum disk bytes used
                                          type: integer
                                          format: int64
                                          example: 3087007744
                                          nullable: true
                                        max:
                                          description: Maximum disk bytes used
                                          type: integer
                                          format: int64
                                          example: 3221225472
                                          nullable: true
                                        avg:
                                          description: Average disk bytes used
                                          type: number
                                          format: float
                                          example: 3154116608
                                          nullable: true
                                        stddev:
                                          description: Standard deviation of disk bytes used
                                          type: number
                                          format: float
                                          example: 35000000
                                          nullable: true
                                        p50:
                                          description: Median (50th percentile) disk bytes used
                                          type: number
                                          format: float
                                          example: 3150000000
                                          nullable: true
                                        p95:
                                          description: 95th percentile disk bytes used
                                          type: number
                                          format: float
                                          example: 3210000000
                                          nullable: true
                                        p96:
                                          description: 96th percentile disk bytes used
                                          type: number
                                          format: float
                                          example: 3215000000
                                          nullable: true
                                        p97:
                                          description: 97th percentile disk bytes used
                                          type: number
                                          format: float
                                          example: 3217000000
                                          nullable: true
                                        p98:
                                          description: 98th percentile disk bytes used
                                          type: number
                                          format: float
                                          example: 3219000000
                                          nullable: true
                                        p99:
                                          description: 99th percentile disk bytes used
                                          type: number
                                          format: float
                                          example: 3220000000
                                          nullable: true
                                      type: object
                                      additionalProperties: false
                                    disk_limit:
                                      description: >-
                                        Disk limit in bytes. Contains only max
                                        (nullable)
                                      properties:
                                        max:
                                          description: Maximum disk limit in bytes
                                          type: integer
                                          format: int64
                                          example: 10737418240
                                          nullable: true
                                      type: object
                                      additionalProperties: false
                                    inodes_used:
                                      description: >-
                                        Inode usage count. Includes statistical
                                        aggregations (all nullable): min, max,
                                        avg, stddev, p50, p95, p96, p97, p98,
                                        p99
                                      properties:
                                        min:
                                          description: Minimum inodes used
                                          type: integer
                                          example: 45000
                                          nullable: true
                                        max:
                                          description: Maximum inodes used
                                          type: integer
                                          example: 52000
                                          nullable: true
                                        avg:
                                          description: Average inodes used
                                          type: number
                                          format: float
                                          example: 48500
                                          nullable: true
                                        stddev:
                                          description: Standard deviation of inodes used
                                          type: number
                                          format: float
                                          example: 1500
                                          nullable: true
                                        p50:
                                          description: Median (50th percentile) inodes used
                                          type: number
                                          format: float
                                          example: 48400
                                          nullable: true
                                        p95:
                                          description: 95th percentile inodes used
                                          type: number
                                          format: float
                                          example: 51200
                                          nullable: true
                                        p96:
                                          description: 96th percentile inodes used
                                          type: number
                                          format: float
                                          example: 51400
                                          nullable: true
                                        p97:
                                          description: 97th percentile inodes used
                                          type: number
                                          format: float
                                          example: 51600
                                          nullable: true
                                        p98:
                                          description: 98th percentile inodes used
                                          type: number
                                          format: float
                                          example: 51800
                                          nullable: true
                                        p99:
                                          description: 99th percentile inodes used
                                          type: number
                                          format: float
                                          example: 51900
                                          nullable: true
                                      type: object
                                      additionalProperties: false
                                    inodes_limit:
                                      description: >-
                                        Inode limit count. Contains only max
                                        (nullable)
                                      properties:
                                        max:
                                          description: Maximum inodes limit
                                          type: integer
                                          example: 655360
                                          nullable: true
                                      type: object
                                      additionalProperties: false
                                  type: object
                                  additionalProperties: false
                            type: object
                            additionalProperties: false
                      type: object
                      additionalProperties: false
                    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
                type: object
                additionalProperties: false
        '400':
          description: >-
            Bad request - Invalid parameters. Please consult the API
            documentation to fix the request parameters.
          content:
            application/json:
              schema:
                required:
                  - type
                  - title
                  - status
                  - violations
                properties:
                  type:
                    description: RFC 2616 reference URL identifying the error type
                    type: string
                    format: uri
                    example: https://tools.ietf.org/html/rfc2616#section-1
                  title:
                    description: Human-readable summary of the validation error
                    type: string
                    example: Please ensure parameters are correct.
                  status:
                    description: HTTP status code
                    type: integer
                    example: 400
                  violations:
                    description: >-
                      Map of parameter names to their validation errors. Each
                      parameter can have multiple error messages.
                    type: object
                    example:
                      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.
                    additionalProperties:
                      type: array
                      items:
                        type: string
                        example: The from timestamp must be in the past.
                type: object
                additionalProperties: false
        '403':
          description: >-
            Forbidden - Access denied due to insufficient permissions, or the
            requested project/environment does not exist (to prevent information
            disclosure)
        '499':
          description: >-
            Too much data fetched - The query is attempting to retrieve too much
            data. Please narrow down the query by reducing the time range or
            adding more specific filters to retrieve less data.
          content:
            application/json:
              schema:
                required:
                  - error
                  - message
                properties:
                  error:
                    type: string
                    example: Too much data fetched
                  message:
                    type: string
                    example: >-
                      Please reduce the time range or add more filters to narrow
                      down the query
                type: object
                additionalProperties: false
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````