---
search:
  tags:
    - database-services
    - GET
seo:
  description: >-
    Runs pgbackrest info for the stanza of the… Reference for the GET
    /api/v1/database-services/{id}/health/pgbackrest endpoint in the TimescaleDB
    Enterprise API.
  noindex: true
sidebar:
  label: Get pgBackRest health
  badge: GET
title: Get pgBackRest health
type: openapi-operation
---
Runs pgbackrest info for the stanza of the service. When the service has no active backup repo, it runs nothing and returns not_applicable. When the service is not running and no deploy of it completed (also when the first deploy failed), it runs nothing and returns not_deployed with the error "The service is not deployed yet". first_backup_pending tells that no backups is expected: the first backup runs, or an operation whose end starts a full backup runs or ended less than 15 minutes ago.

`GET /api/v1/database-services/{id}/health/pgbackrest`

**Responses**

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

Response example, 200:

```json
{
  "backup_running": true,
  "backups": [
    {
      "checksum_errors": true,
      "database_id": 0,
      "database_size_bytes": 0,
      "label": "string",
      "older": true,
      "pg_version": "string",
      "prior_checksum_errors": true,
      "repo": 0,
      "size_bytes": 0,
      "start_time": "string",
      "stop_time": "string",
      "type": "string",
      "wal_start": "string",
      "wal_stop": "string"
    }
  ],
  "coverage": {
    "assumes_archiving": true,
    "earliest": "string",
    "end": "string",
    "now": "string",
    "repos": [
      {
        "backups": [
          {
            "checksum_errors": true,
            "label": "string",
            "stop_time": "string"
          }
        ],
        "current_tli": 0,
        "database_id": 0,
        "earliest": "string",
        "grant_fingerprint": "string",
        "kind": "local",
        "older": true,
        "pg_version": "string",
        "repo": 0,
        "wal_max": "string",
        "wal_min": "string"
      }
    ]
  },
  "error": "string",
  "first_backup_pending": true,
  "stanza": "string",
  "status": "healthy",
  "wal_max": "string",
  "wal_min": "string"
}
```
