v1

latestSwagger 2.02026-07-172964242.9 KB
Database

Apply database upgrade

Applies a minor-version upgrade to a database. The target image must be a stable manifest entry in the same Postgres major / Spock major bucket as the current version and strictly newer. Container pull and restart happen asynchronously; this endpoint returns once redeployment is triggered.

post/v1/databases/{database_id}/upgrade

Path parameters

database_idstring required

A user-specified identifier. Must be 1-36 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.

Request body

imagestring required

Full container image reference of the upgrade target. Must match the image field of a stable manifest entry in the same Postgres major / Spock major bucket as the current version and be strictly newer.

Example request

{
  "image": "ghcr.io/pgedge/pgedge-postgres:17.10-spock5.0.8-standard-1"
}

Response

OK response.

Example response

{
  "database": {
    "created_at": "2025-06-18T16:52:05Z",
    "id": "storefront",
    "state": "modifying",
    "updated_at": "2025-06-18T17:58:59Z"
  },
  "task": {
    "created_at": "2025-06-18T17:58:59Z",
    "database_id": "storefront",
    "status": "pending",
    "task_id": "01978431-b628-758a-aec6-03b331fa1a17",
    "type": "upgrade"
  }
}