---
search:
  tags:
    - metrics
    - GET
seo:
  description: >-
    Get service metrics windows. Reference for the GET
    /api/v1/database-services/{id}/metrics endpoint in the TimescaleDB
    Enterprise API.
  noindex: true
sidebar:
  label: Get service metrics windows
  badge: GET
title: Get service metrics windows
type: openapi-operation
---
`GET /api/v1/database-services/{id}/metrics`

**Responses**

- `200` — OK
- `default` — Error

Response example, 200:

```json
{
  "alerts": [
    {
      "alert": "string",
      "end": "string",
      "server": "string",
      "severity": "string",
      "start": "string"
    }
  ],
  "compute": [
    {
      "data": [
        {
          "cpuPercent": 0.1,
          "memoryPercent": 0.1,
          "memoryTotalBytes": 0.1,
          "memoryUsedBytes": 0.1,
          "time": "string"
        }
      ],
      "ordinal": 0,
      "role": "primary",
      "server": "string"
    }
  ],
  "connections": [
    {
      "data": [
        {
          "active": 0.1,
          "max": 0.1,
          "time": "string",
          "total": 0.1
        }
      ],
      "ordinal": 0,
      "role": "primary",
      "server": "string"
    }
  ],
  "diskPerformance": [
    {
      "data": [
        {
          "readBytesPerSec": 0.1,
          "readIOPS": 0.1,
          "time": "string",
          "writeBytesPerSec": 0.1,
          "writeIOPS": 0.1
        }
      ],
      "ordinal": 0,
      "role": "primary",
      "server": "string"
    }
  ],
  "queriesPerSecond": [
    {
      "data": [
        {
          "time": "string",
          "tps": 0.1
        }
      ],
      "ordinal": 0,
      "role": "primary",
      "server": "string"
    }
  ],
  "storage": [
    {
      "data": [
        {
          "databaseSizeBytes": 0.1,
          "diskTotalBytes": 0.1,
          "diskUsedBytes": 0.1,
          "time": "string"
        }
      ],
      "ordinal": 0,
      "role": "primary",
      "server": "string"
    }
  ]
}
```
