TezzApi

API framework for TezzNative services

TezzApi production surface

Fast API development with route tables and TNXB payload support, built on TezzNative net primitives.

Core capabilities

- method/path route-table registration
- CRUD bundle mapping per resource
- HTTP helpers with explicit status handling
- TNXB encode/decode/send/recv helpers
- service integration with TezzServe middleware

Example route-table flow

import "std"
import "tezzapi"

fn main() -> int:
  api:*Api = api_new()
  api_route(api, "GET", "/health", health_handler)
  api_crud(api, "/users", users_crud_handlers())
  ret api_serve(api, 8080)

TNXB contracts

Extension: .tnxb
Use case: compact binary payload transport
Helpers:
- tnxb_encode
- tnxb_decode
- tnxb_http_post (HTTP baseline)
- tls-policy aware client helpers (M3 hardening)

Production checklist

1) Define route table once at startup
2) Register middleware policies in TezzServe
3) Enforce auth + rate-limit + TLS policy per tenant
4) Add smoke + conformance tests
5) Track versioned API contracts in release docs