---
title: "Update Database Status"
method: PATCH
path: "/internal/databases/{database_id}/status"
tags: ["internal"]
---

# Update Database Status

`PATCH /internal/databases/{database_id}/status`

## Request

- Base URL: `https://api.mengi.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mengi.cloud/internal/databases/{database_id}/status`
- Auth: none declared. Required headers: `x-service-token`

Update the status of a managed database instance (worker only).

Responds 409 when ``expected_status`` does not match, and for any update
of a RESTORING database that does not come from the restore job (a
status sync that listed the database before the restore started).
An empty ``error_message`` clears it.

## Path parameters

- `database_id` string, uuid, required

## Headers

- `x-service-token` string, required

## Request body

- DatabaseStatusUpdate
  - `status` string, nullable
  - `error_message` string, nullable
  - `git_commit_sha` string, nullable
  - `connection_host` string, nullable
  - `connection_port` integer, nullable
  - `connection_secret_name` string, nullable
  - `external_host` string, nullable
  - `expected_status` string, nullable
  - `barman_server_name` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mengi/apis/mengi-cloud.md) · [All operations](https://skmtc.dev/mengi/apis/mengi-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/mengi/apis/mengi-cloud/revisions/4ae9b375cdbb?raw)
