---
title: "Get a database"
method: GET
path: "/v1/databases/{id}"
tags: ["Databases"]
---

# Get a database

`GET /v1/databases/{id}`

get a database that user owns

## Path parameters

- `id` string, required

## Response `200`

Successful operation

- DBDetails
  - `database` object
    - `DBId` string — The ID of the database
    - `type` string — The type of the database
    - `planID` string — The plan ID
    - `status` string — The status of the database
    - `scale` integer — The scale of the database
    - `hostname` string — The hostname of the database
    - `publicNetwork` boolean — Indicates if the database is on a public network
    - `version` string — The database version
    - `volumeSize` integer — The size of the database volume
    - `created_at` string — The creation timestamp of the database
    - `dbName` string — The name of db
    - `node` object
      - `_id` string — The ID of the database node
      - `host` string — The host of the database node
    - `port` integer — The port number for the database connection
    - `root_password` string — The root password for the database
    - `internalPort` integer — The internal port of the database
    - `id` string — The unique ID of the database
    - `hourlyPrice` number — The hourly price of the database
    - `metaData` object
      - `standaloneReplicaSet` boolean — Indicates if the database uses a standalone replica set
      - `privateNetwork` boolean — Indicates if the database is on a private network
    - `username` string — The username associated with the database

## Other responses

- `400` — Bad request
- `401` — Missing authentication
- `404` — Database not found

## Changes

> 19 revisions in range; 1 not diffed.

- **2023-10-06** `5f87209bfb82` — 1 breaking, 1 info
  - removed the media type `Databaselication/json` for the response with the status `200`
  - added the media type `application/json` for the response with the status `200`
- **2023-10-01** `be0fd6a4d454` — 1 warning, 1 info
  - removed the optional property `database/_id` from the response with the `200` status
  - added the optional property `database/DBId` to the response with the `200` status

[Change history](https://skmtc.dev/liara-cloud/apis/dbaas/changes/v1/databases/:id/get.md)

---

[API](https://skmtc.dev/liara-cloud/apis/dbaas.md) · [All operations](https://skmtc.dev/liara-cloud/apis/dbaas/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/liara-cloud/dbaas/revisions/6423b3e16f16/schema)
