---
title: "Get database by ID"
method: GET
path: "/database/{databaseId}"
tags: ["Database Main Calls"]
---

# Get database by ID

`GET /database/{databaseId}`

## Request

- Base URL: `https://api.qovery.com`
- URL: `https://api.qovery.com/database/{databaseId}`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/qovery/apis/qovery-api/docs/database/:databaseId/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `databaseId` string, uuid, required

## Response `200`

Get database  by ID

- Database
  - `id` string, uuid, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time
  - `name` string, required: name is case insensitive
  - `description` string: give a description to this database
  - `type` 'MONGODB' | 'MYSQL' | 'POSTGRESQL' | 'REDIS', required
  - `version` string, required
  - `mode` 'CONTAINER' | 'MANAGED', required
  - `accessibility` 'PRIVATE' | 'PUBLIC'
  - `cpu` integer: unit is millicores (m). 1000m = 1 cpu This field will be ignored for managed DB (instance type will be used instead).
  - `instance_type` string: Database instance type to be used for this database. The list of values can be retrieved via the endpoint /{CloudProvider}/managedDatabase/instanceType/{region}/{dbType}. This field is null for container DB.
  - `memory` integer: unit is MB. 1024 MB = 1GB This field will be ignored for managed DB (instance type will be used instead). Default value is linked to the database type: - MANAGED: `100` - CONTAINER - POSTGRES: `100` - REDIS: `100` - MYSQL: `512` - MONGODB: `256`
  - `storage` integer: unit is GB
  - `annotations_groups` object[]
    - `id` string, uuid, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time
    - `name` string, required
    - `annotations` Annotation[], required
      - `key` string, required
      - `value` string, required
    - `scopes` OrganizationAnnotationsGroupScopeEnum[], required
  - `labels_groups` object[]
    - `id` string, uuid, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time
    - `name` string, required
    - `labels` Label[], required
      - `key` string, required
      - `value` string, required
      - `propagate_to_cloud_provider` boolean, required
  - `icon_uri` string, uri, required: Icon URI representing the database.
  - `environment` ReferenceObject, required
    - `id` string, uuid, required
  - `host` string
  - `port` integer
  - `maximum_cpu` integer: Maximum cpu that can be allocated to the database based on organization cluster configuration. unit is millicores (m). 1000m = 1 cpu
  - `maximum_memory` integer: Maximum memory that can be allocated to the database based on organization cluster configuration. unit is MB. 1024 MB = 1GB
  - `disk_encrypted` boolean: indicates if the database disk is encrypted or not
  - `service_type` 'APPLICATION' | 'DATABASE' | 'CONTAINER' | 'JOB' | 'HELM' | 'TERRAFORM', required: type of the service (application, database, job, ...)

## Other responses

- `401`: Access token is missing or invalid
- `403`: Access forbidden
- `404`: Resource not found

---

[API](https://skmtc.dev/qovery/apis/qovery-api.md) - [All operations](https://skmtc.dev/qovery/apis/qovery-api/llms.txt) - [OpenAPI document](https://skmtc.dev/qovery/apis/qovery-api/revisions/93c4960a44ba?raw)
