registerTrigger()
Register a trigger to invoke a function when an event occurs.RegisterTriggerInput
required
Trigger configuration
Trigger
Trigger reference with unregister method
HTTP Triggers
Expose functions as HTTP endpoints.Basic HTTP Endpoint
http://localhost:3199/hello
HTTP Request Types
object
HTTP request object passed to function handlers
object
JSON response format
Path Parameters
Query Parameters
Request Body
Streaming HTTP Responses
For streaming responses (SSE, file downloads, etc.), use thehttp() helper:
Server-Sent Events (SSE)
Streaming Request Body
Custom Trigger Types
Create custom trigger types for your own event sources.registerTriggerType()
RegisterTriggerTypeMessage
required
Trigger type definition
TriggerHandler<TConfig>
required
Handler for registering/unregistering triggers
Example: Custom Webhook Trigger
unregisterTriggerType()
Remove a custom trigger type:Engine Built-in Triggers
The III Engine provides built-in trigger types:functions_available
Triggers when new functions are registered or unregistered.Best Practices
Use descriptive API paths
Use descriptive API paths
Return appropriate status codes
Return appropriate status codes
Clean up triggers on shutdown
Clean up triggers on shutdown