Data APIs

Generate REST APIs automatically from databases

Data APIs automatically generate REST APIs from databases, allowing you to expose data sources as REST endpoints without writing code.

Overview

Data APIs provide automatic API generation for databases:

  • PostgreSQL
  • MySQL
  • SQL Server
  • ODBC
  • Oracle

Features

  • Auto-generated query endpoints
  • OpenAPI/Swagger documentation
  • Query support (filtering, sorting, pagination)
  • Authentication integration via ApiSubscription

Creating Data APIs

Use the Data APIs interface to:

  1. Select your database type
  2. Configure connection parameters
  3. Define API route
  4. Choose authentication method
  5. Generate the API

Configuration Example

apiVersion: weikio/v1
kind: OpenApiEndpoint
metadata:
  name: sql-customers
spec:
  apiName: Weikio.ApiFramework.Plugins.SqlServer
  apiVersion: 1.0.0
  route: /api/v1/customers
  configuration:
    connectionString: "Server=localhost;Database=Customers;Trusted_Connection=True;"

Note: The kind is currently OpenApiEndpoint but will be renamed to DataApi in a future release.

Authentication

Secure Data APIs using ApiSubscription:

apiVersion: weik.io/v1alpha1
kind: ApiSubscription
metadata:
  name: data-api-access
spec:
  apis:
    - sql-customers
  isActive: true
  parameters:
    key: "your-api-key"

Use Cases

  • Rapid prototyping without backend code
  • Exposing legacy databases as modern REST APIs
  • Creating data access layers for mobile apps
  • Building internal tools and dashboards

What’s Next