latestOpenAPI 3.1.02026-08-1076186318.8 KB

ab648a80ca4d

Application Metrics

CPU Usage

An average of the total CPU usage for the selected time period, as a percentage of instance’s CPU resources.

get/applications/{id}/metrics/cpu-usage

Path parameters

idstring required
Example:54fb80af-576c-4fdc-ba4f-b596c83f15a1

Query parameters

interval_in_secondsinteger required
Example:3600
timeframe_startstring date-time required
Example:2021-07-22T18:10:45.511Z
timeframe_endstring date-time required
Example:2021-07-22T18:10:45.511Z

Response

Successfully retrieved application CPU usage.

Example response

{
  "app": {
    "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
    "app_name": "my-app",
    "processes": [
      {
        "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
        "process_name": "web",
        "cpu_limit": 1,
        "metrics": {
          "timeframe": {
            "start": "1679587045511",
            "end": "1679587045511"
          },
          "cpu_usage": [
            {
              "time": "1679587045511",
              "value": "value"
            }
          ]
        }
      }
    ]
  }
}