---
search:
  tags:
    - database-services
    - POST
seo:
  description: >-
    Runs the resolved selection of the last Check (ADR… Reference for the POST
    /api/v1/database-services/{id}/upgrade endpoint in the TimescaleDB
    Enterprise API.
sidebar:
  label: Upgrade a database service
  badge: POST
title: Upgrade a database service
type: openapi-operation
---
Runs the resolved selection of the last Check (ADR 2026-10-21 decision items 3 to 7): the pgBackRest step of the backup group, the rolling package pass (HA: the replicas one at a time, one switchover, the catalog step on the new leader, then the old leader; Standard: one stop and start), then the catalog step, then the component steps with no PostgreSQL restart, then Tailscale one server at a time (decision 30). With LiveSync (TSE-1765), the upgrade first stops the running sessions of the service, and starts them again at the end, also after a failure. When the service is a LiveSync source, the HA leader restarts in place with no switchover, so that the replication slot stays on it. The workflow is upgrade_service. 409 when the last Check did not pass, has no item, is older than one hour, was used by an Upgrade that completed, or no longer matches the service or the loaded server packages, when an operation runs on another service of a shared item, when the Check warns about the backups and accept_backup_risk is not true, and when livesync_sessions does not name the running LiveSync sessions of the service.

`POST /api/v1/database-services/{id}/upgrade`

**Request body** (`application/json`, required)

- `accept_backup_risk` (boolean) — Upgrade although the last Check warns about the backups: no backups configured, no successful backup in 24 hours, or WAL archiving not healthy (decision 6). The audit log records it.
- `livesync_sessions` (string[]) — The IDs of the running LiveSync sessions of the service (livesync\_pause of the last Check). The upgrade stops them before the restarts and starts them again after it (TSE-1765).

Request body example:

```json
{
  "accept_backup_risk": true,
  "livesync_sessions": [
    "string"
  ]
}
```

**Responses**

- `202` — Accepted
- `default` — Error

Response example, 202:

```json
{
  "workflow_id": "string"
}
```
