---
title: "Gets the current database status"
method: GET
path: "/api/server/database"
tags: ["Server Configuration"]
---

# Gets the current database status

`GET /api/server/database`

## Response `200`

The database status

- ServerDatabase
  - `url` string — Current database URL (DATABASE_URL from .env file in project root).
  - `pattern` string — Regular expression to match a valid database URL.
  - `status` object
    - `type` 'error' | 'problem' | 'migration' | 'schema' | 'empty'
    - `total` number — Number of errors/problems/migrations or schema updates (according to type).
    - `message` string — Contains the console output if the command fails or the first error/problem message.
    - `warnings` number — Number of warnings generated by the contao:migrate command.

## Other responses

- `501` — Contao console does not support the necessary contao:migrate commands or CLI API features.
- `503` — If the PHP command line binary cannot be found.

---

[API](https://skmtc.net/contao/apis/contao-manager-api.md) · [All operations](https://skmtc.net/contao/apis/contao-manager-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/contao/contao-manager-api/revisions/074d8046de13/schema)
