Api Configuration
Weik.io 2026.1Configure APIs with URL prefixes and routing.
Defines the basic configuration for an API, including its URL prefix for routing.
Schema properties#
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
| prefix | string |
Yes | - | URL prefix for the API endpoints (e.g., “northwind”, “api/products”) |
YAML example#
apiVersion: weik.io/v1alpha1
kind: Api
metadata:
name: northwind-api
spec:
prefix: northwindMultiple APIs example#
apiVersion: weik.io/v1alpha1
kind: Api
metadata:
name: products-api
spec:
prefix: api/products
---
apiVersion: weik.io/v1alpha1
kind: Api
metadata:
name: orders-api
spec:
prefix: api/orders
---
apiVersion: weik.io/v1alpha1
kind: Api
metadata:
name: customers-api
spec:
prefix: api/customersUsage notes#
Use Api configuration to define the base path for your API. The prefix determines the URL structure where the API endpoints are accessible.
The prefix should:
- Have no leading slash
- Be unique across all APIs in your instance
- Follow URL path conventions (lowercase, hyphen-separated)
Example URL structure:
- API with prefix
northwind→ Endpoints accessible athttps://your-host/northwind/v1/... - API with prefix
api/products→ Endpoints accessible athttps://your-host/api/products/v1/...
Combine this configuration with ApiVersion to define specific versions and their settings.