> ## 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.

# Schema

> Inspect non-system schemas, tables, views, columns, keys, and indexes using a read-only database connection.



## OpenAPI

````yaml /openapi.json get /v1/orgs/{orgId}/projects/{projectId}/databases/{databaseId}/schema
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}/schema:
    get:
      tags:
        - databases
      summary: Schema
      description: >-
        Inspect non-system schemas, tables, views, columns, keys, and indexes
        using a read-only database connection.
      operationId: databases.schema
      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: Database relations sorted by schema and name.
          content:
            application/json:
              schema:
                type: object
                properties:
                  relations:
                    type: array
                    items:
                      type: object
                      properties:
                        schema:
                          type: string
                        name:
                          type: string
                        kind:
                          type: string
                          enum:
                            - table
                            - view
                            - materialized_view
                        columns:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                              dataType:
                                type: string
                              nullable:
                                type: boolean
                              default:
                                type:
                                  - string
                                  - 'null'
                              primaryKey:
                                type: boolean
                              unique:
                                type: boolean
                            required:
                              - name
                              - dataType
                              - nullable
                              - default
                              - primaryKey
                              - unique
                        indexes:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                              unique:
                                type: boolean
                              primary:
                                type: boolean
                              columns:
                                type: array
                                items:
                                  type: string
                            required:
                              - name
                              - unique
                              - primary
                              - columns
                      required:
                        - schema
                        - name
                        - kind
                        - columns
                        - indexes
                required:
                  - relations
        '404':
          description: No ready database in this project.
        '429':
          description: Database explorer concurrency or rate limit reached.
        '504':
          description: Read-only schema inspection exceeded its statement timeout.
      security:
        - apiKey: []
        - session: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: korve_api_key
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````