Request Lifecycle
Unlike other hooks that run during request processing,serveSE runs once when the Orchestrator starts up. Your extension registers HTTP route handlers that then execute whenever a matching request arrives.
Hooks
serveSE
Register custom HTTP endpoints on the Orchestrator. This hook runs at startup and gives you access to the router to define your own API routes. Use this to implement custom REST endpoints, webhook receivers, or internal service APIs.
Signature:
apis[]
Config location: apis[].serveSE
Parameters:
| Parameter | Type | Description |
|---|---|---|
api | orchestrator.Orchestrator | Access to sessions, caches, secrets, logging, router, and other Orchestrator services |
error — return nil on success, or an error if the API handler setup fails.
Configuration
Custom API endpoints are defined under theapis top-level key in the deployment configuration.
maverics.yaml
Field Reference
| Key | Type | Default | Required | Description |
|---|---|---|---|---|
apis[].name | string | — | Yes | Unique name for the API endpoint |
apis[].serveSE | ServiceExtension | — | Yes | Service extension that handles requests to this endpoint |
serveSE field accepts the standard ServiceExtension object (funcName, code/file, metadata, goPath, allowedProtectedPackages).
Validation Rules
- Each
namemust be unique across allapis[]entries - The
serveSEfield is required — an API endpoint without a handler is invalid
Example
A custom health check endpoint and a user info endpoint:maverics.yaml