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

# Get database metadata

> Get database statistics and table information for dashboard



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/metadata.yaml get /api/metadata/database
openapi: 3.0.3
info:
  title: Insforge Metadata API
  version: 1.0.0
servers: []
security: []
paths:
  /api/metadata/database:
    get:
      tags:
        - Admin
      summary: Get database metadata
      description: Get database statistics and table information for dashboard
      responses:
        '200':
          description: Database metadata
          content:
            application/json:
              schema:
                type: object
                properties:
                  tables:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        recordCount:
                          type: integer
                  totalTables:
                    type: integer
                  totalRecords:
                    type: integer
                  databaseSize:
                    type: string
                  lastUpdated:
                    type: string
                    format: date-time
              example:
                tables:
                  - name: posts
                    recordCount: 5678
                  - name: comments
                    recordCount: 9012
                totalTables: 15
                totalRecords: 16924
                databaseSize: 125 MB
                lastUpdated: '2024-01-21T10:30:00Z'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: UNAUTHORIZED
                message: Invalid or missing authentication
                statusCode: 401
                nextAction: Please provide valid authentication credentials
      security:
        - bearerAuth: []
        - apiKey: []
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
        - message
        - statusCode
      properties:
        error:
          type: string
          description: Error code for programmatic handling
        message:
          type: string
          description: Human-readable error message
        statusCode:
          type: integer
          description: HTTP status code
        nextAction:
          type: string
          description: Suggested action to resolve the error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key

````