Skip to content

Your first API Bundle

An API Bundle is a complete authoring workspace. Its root is always api.yaml; child documents live in known folders and inherit the root apiVersion.

orders-api/
├── api.yaml
├── routes/
│ └── orders.yaml
├── targets/
│ └── default.yaml
└── policies/
└── correlation.policy.yaml

api.yaml identifies the bundle and controls route precedence:

apiVersion: centiceps.io/v1
kind: GatewayAPI
name: orders-api
displayName: Orders API
basePath: /orders
routeOrder:
- orders

routes/orders.yaml matches the inbound request, runs an ordered request flow, and selects a target:

kind: APIRoute
name: orders
match:
method: POST
path: /
flows:
request:
- policy: request-correlation
backend:
target: default
path: /v2/orders

targets/default.yaml points to an environment-managed target server:

kind: Target
name: default
url: https://orders.internal

policies/correlation.policy.yaml configures a versioned policy type:

kind: Policy
name: request-correlation
type: correlation-id/v1
enabled: true
onError: fault
config:
header: "X-Correlation-ID"
generate: uuidv7
echoInResponse: true

The physical filename must agree with the document name. Centiceps validates document schemas, known folders, route order, and cross-document references before publication.

Continue with Bundle concepts for revision and reachability behavior.