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

# Get database

> Get details for a specific database, including configuration and status.



## OpenAPI

````yaml https://api.sevalla.com/v2/openapi.json get /databases/{id}
openapi: 3.1.0
info:
  title: Sevalla API docs
  version: 1.0.0
servers:
  - url: https://api.sevalla.com/v2
security:
  - bearerAuth: []
paths:
  /databases/{id}:
    get:
      tags:
        - Databases
      summary: Get database
      description: Get details for a specific database, including configuration and status.
      operationId: getDatabaseV2
      parameters:
        - schema:
            default: true
            example: true
            type: boolean
          in: query
          name: internal
          required: false
          description: Include internal connection info
        - schema:
            default: true
            example: true
            type: boolean
          in: query
          name: external
          required: false
          description: Include external connection info
        - schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            example: fb5e5168-4281-4bec-94c5-0d1584e9e657
          in: path
          name: id
          required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  database:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        description: Unique identifier for the database
                        example: fb5e5168-4281-4bec-94c5-0d1584e9e657
                      name:
                        type: string
                        description: Unique name of the database
                        example: my-database
                      display_name:
                        type: string
                        description: Display name of the database
                        example: My Database
                      status:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Current database status
                        example: ready
                      created_at:
                        type: number
                        description: Creation timestamp in milliseconds
                        example: 1738195200000
                      memory_limit:
                        anyOf:
                          - type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          - type: 'null'
                        description: Memory limit in MB
                        example: 1024
                      cpu_limit:
                        anyOf:
                          - type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          - type: 'null'
                        description: CPU limit in millicores
                        example: 1000
                      storage_size:
                        anyOf:
                          - type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          - type: 'null'
                        description: Storage size in MB
                        example: 10240
                      type:
                        type: string
                        description: Database engine type
                        example: postgresql
                      version:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Database engine version
                        example: '16'
                      resource_type_name:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Resource type tier name
                        example: db-standard-1
                      cluster:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                example: fb5e5168-4281-4bec-94c5-0d1584e9e657
                              location:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                example: europe-west1
                              display_name:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                example: Europe West 1
                            required:
                              - id
                              - location
                              - display_name
                            additionalProperties: false
                          - type: 'null'
                      internal_hostname:
                        example: my-database.internal
                        anyOf:
                          - type: string
                          - type: 'null'
                      internal_port:
                        example: '5432'
                        anyOf:
                          - type: string
                          - type: 'null'
                      internal_connection_string:
                        example: postgresql://user:pass@my-database.internal:5432/mydb
                        type: string
                      internal_connections:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              example: fb5e5168-4281-4bec-94c5-0d1584e9e657
                            type:
                              type: string
                              example: appResource
                          required:
                            - id
                            - type
                          additionalProperties: false
                      data:
                        type: object
                        properties:
                          db_name:
                            anyOf:
                              - type: string
                              - type: 'null'
                            example: mydb
                          db_password:
                            anyOf:
                              - type: string
                              - type: 'null'
                            example: '********'
                          db_root_password:
                            anyOf:
                              - type: string
                              - type: 'null'
                            example: '********'
                          db_user:
                            anyOf:
                              - type: string
                              - type: 'null'
                            example: dbuser
                        required:
                          - db_name
                          - db_password
                          - db_root_password
                          - db_user
                        additionalProperties: false
                      external_connection_string:
                        example: postgresql://user:pass@ext-host.sevalla.com:5432/mydb
                        type: string
                      external_hostname:
                        example: ext-host.sevalla.com
                        anyOf:
                          - type: string
                          - type: 'null'
                      external_port:
                        example: '5432'
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - id
                      - name
                      - display_name
                      - status
                      - created_at
                      - memory_limit
                      - cpu_limit
                      - storage_size
                      - type
                      - version
                      - resource_type_name
                      - cluster
                    additionalProperties: false
                required:
                  - database
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Not found
                  status:
                    type: number
                    example: 404
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err_12345
                        type: string
                      message:
                        description: Instructions for the user
                        example: The requested resource was not found
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Not found
                  status:
                    type: number
                    example: 404
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err_12345
                        type: string
                      message:
                        description: Instructions for the user
                        example: The requested resource was not found
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Not found
                  status:
                    type: number
                    example: 404
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err_12345
                        type: string
                      message:
                        description: Instructions for the user
                        example: The requested resource was not found
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authentication. Pass your API key as a Bearer token in the
        Authorization header.

````