> ## Documentation Index
> Fetch the complete documentation index at: https://docs.korve.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get

> Get one database's status and connection details (never the password).



## OpenAPI

````yaml /openapi.json get /v1/orgs/{orgId}/projects/{projectId}/databases/{databaseId}
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/orgs/{orgId}/projects/{projectId}/databases/{databaseId}:
    get:
      tags:
        - databases
      summary: Get
      description: Get one database's status and connection details (never the password).
      operationId: databases.get
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          description: The organization's id (UUID) or slug — either form is accepted.
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The project's id (UUID) or slug — either form is accepted.
        - name: databaseId
          in: path
          required: true
          schema:
            type: string
          description: The database's id (UUID), from databases.list.
      responses:
        '200':
          description: The database.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                    pattern: ^[a-z][a-z0-9-]{1,61}$
                    description: >-
                      Customer-chosen database name — unique within the
                      environment. 2-62 chars of lowercase letters, digits, and
                      hyphens, starting with a letter.
                  environment:
                    type: string
                    pattern: ^[a-z][a-z0-9-]{0,38}$
                    description: Slug of the environment the database belongs to.
                  status:
                    type: string
                    enum:
                      - provisioning
                      - resizing
                      - ready
                      - failed
                  region:
                    type: string
                    description: >-
                      Database region id (see regions.list). Immutable after
                      provisioning.
                  replicas:
                    type: integer
                    enum:
                      - 0
                      - 2
                    description: >-
                      Topology: 0 creates a single-node database; 2 creates one
                      primary plus two data replicas with synchronous quorum
                      commits and continuous recovery.
                  host:
                    type: string
                    description: >-
                      Managed database endpoint — the in-platform hostname for
                      SKU databases, "db.korve.app" for legacy ones.
                  port:
                    type: integer
                  poolerPort:
                    type: integer
                    description: >-
                      PgBouncer transaction-pooling port. The primary port
                      remains available for session-mode clients.
                  dbName:
                    type: string
                  user:
                    type: string
                  provider:
                    type: string
                    description: >-
                      Database backend generation the row lives on. Set at
                      provisioning.
                  sku:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Database SKU id (see the rate card via billing.get); null
                      on legacy databases.
                  targetSku:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Requested SKU while a zero-downtime HA resize is running;
                      otherwise null.
                  allocatedStorageGb:
                    type:
                      - integer
                      - 'null'
                    description: >-
                      Actual allocated data-disk capacity. It grows with larger
                      SKUs and remains allocated after a compute downsize
                      because durable volumes cannot shrink.
                  resize:
                    type:
                      - object
                      - 'null'
                    description: >-
                      Durable progress for an active rolling resize; null when
                      no resize is running.
                    properties:
                      direction:
                        type: string
                        enum:
                          - up
                          - down
                      phase:
                        type: string
                        enum:
                          - queued
                          - preparing
                          - growing-storage
                          - resizing-replicas
                          - switching-primary
                          - resizing-former-primary
                          - verifying
                          - retrying
                      progressPercent:
                        type: integer
                      startedAt:
                        type: string
                        format: date-time
                      estimatedCompletedAt:
                        type: string
                        format: date-time
                    required:
                      - direction
                      - phase
                      - progressPercent
                      - startedAt
                      - estimatedCompletedAt
                  liveStatus:
                    type: string
                    enum:
                      - live
                      - stale
                      - unknown
                    description: >-
                      Liveness from the instance's heartbeat: live when the last
                      report is recent, stale once it lapses, unknown before the
                      instance has ever reported.
                  lastSeenAt:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: >-
                      When the instance last reported in; null until the first
                      heartbeat.
                  sizeBytes:
                    type:
                      - integer
                      - 'null'
                    description: >-
                      On-disk size in bytes from the latest heartbeat; null
                      until the first report.
                  nodes:
                    type: array
                    description: >-
                      Instance topology for managed databases. Empty for legacy
                      databases.
                    items:
                      type: object
                      properties:
                        ordinal:
                          type: integer
                        role:
                          type: string
                          enum:
                            - primary
                            - replica
                            - witness
                        region:
                          type: string
                        status:
                          type: string
                        metrics:
                          type:
                            - object
                            - 'null'
                          description: >-
                            Latest one-minute operational sample; null until the
                            node agent reports one.
                          properties:
                            sampledAt:
                              type: string
                              format: date-time
                            qps:
                              type:
                                - number
                                - 'null'
                              description: Queries per second in the sample window.
                            readIops:
                              type:
                                - number
                                - 'null'
                            writeIops:
                              type:
                                - number
                                - 'null'
                            cpuPercent:
                              type:
                                - number
                                - 'null'
                            memoryUsedBytes:
                              type:
                                - integer
                                - 'null'
                            memoryLimitBytes:
                              type:
                                - integer
                                - 'null'
                            directConnections:
                              type:
                                - integer
                                - 'null'
                            pgbouncer:
                              type: object
                              properties:
                                clientActive:
                                  type:
                                    - integer
                                    - 'null'
                                clientWaiting:
                                  type:
                                    - integer
                                    - 'null'
                                serverActive:
                                  type:
                                    - integer
                                    - 'null'
                                serverIdle:
                                  type:
                                    - integer
                                    - 'null'
                                maxClientConnections:
                                  type:
                                    - integer
                                    - 'null'
                              required:
                                - clientActive
                                - clientWaiting
                                - serverActive
                                - serverIdle
                                - maxClientConnections
                          required:
                            - sampledAt
                            - qps
                            - readIops
                            - writeIops
                            - cpuPercent
                            - memoryUsedBytes
                            - memoryLimitBytes
                            - directConnections
                            - pgbouncer
                      required:
                        - ordinal
                        - role
                        - region
                        - status
                        - metrics
                  metrics:
                    type:
                      - object
                      - 'null'
                    description: >-
                      Latest one-minute operational sample; null until the node
                      agent reports one.
                    properties:
                      sampledAt:
                        type: string
                        format: date-time
                      qps:
                        type:
                          - number
                          - 'null'
                        description: Queries per second in the sample window.
                      readIops:
                        type:
                          - number
                          - 'null'
                      writeIops:
                        type:
                          - number
                          - 'null'
                      cpuPercent:
                        type:
                          - number
                          - 'null'
                      memoryUsedBytes:
                        type:
                          - integer
                          - 'null'
                      memoryLimitBytes:
                        type:
                          - integer
                          - 'null'
                      directConnections:
                        type:
                          - integer
                          - 'null'
                      pgbouncer:
                        type: object
                        properties:
                          clientActive:
                            type:
                              - integer
                              - 'null'
                          clientWaiting:
                            type:
                              - integer
                              - 'null'
                          serverActive:
                            type:
                              - integer
                              - 'null'
                          serverIdle:
                            type:
                              - integer
                              - 'null'
                          maxClientConnections:
                            type:
                              - integer
                              - 'null'
                        required:
                          - clientActive
                          - clientWaiting
                          - serverActive
                          - serverIdle
                          - maxClientConnections
                    required:
                      - sampledAt
                      - qps
                      - readIops
                      - writeIops
                      - cpuPercent
                      - memoryUsedBytes
                      - memoryLimitBytes
                      - directConnections
                      - pgbouncer
                  createdAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - name
                  - environment
                  - status
                  - region
                  - replicas
                  - host
                  - port
                  - poolerPort
                  - dbName
                  - user
                  - provider
                  - sku
                  - targetSku
                  - allocatedStorageGb
                  - resize
                  - liveStatus
                  - lastSeenAt
                  - sizeBytes
                  - nodes
                  - metrics
                  - createdAt
        '404':
          description: No such database in this project.
      security:
        - apiKey: []
        - session: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: korve_api_key
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````