Module api

Source
Expand description

Clean API layer with RESTful endpoints

Modules§

handlers
API Handlers
middleware
API Middleware
responses
API Response Types
server
API Server

Structs§

ApiError
API error information
ApiResponse
Standard API response wrapper
AppState
Application state shared across handlers
ArgumentInfo
Argument information response
DiscoveryResponse
Discovery response for available routes
ExecActionRequest
Request body for unified exec_action endpoint
ExecuteQuery
Query parameters for operation execution
ExecuteRequest
Request body for operation execution
ExecutionResult
Operation execution result
FeatureInfo
Feature information response
FeatureSummary
Feature summary for discovery
HealthStatus
System health status
OperationInfo
Operation information response
ProviderInfo
Provider information response
ProviderSummary
Provider summary for discovery
ServerConfig
API server configuration

Functions§

auth_middleware
Authentication middleware (placeholder for future implementation)
cors_middleware
CORS middleware (if not using tower-http)
create_server
Create the API server with all routes configured
discover_providers
Discovery endpoint - list all providers and their capabilities GET /providers
error_handling_middleware
Error handling middleware
exec_action
Unified action execution endpoint POST /exec_action
execute_operation
Execute an operation POST /providers/{provider}/features/{feature}/operations/{operation}
get_feature
Get specific feature information GET /providers/{provider}/features/{feature}
get_operation
Get specific operation information GET /providers/{provider}/features/{feature}/operations/{operation}
get_provider
Get specific provider information GET /providers/{provider}
get_stats
Registry statistics GET /stats
health
Health check endpoint GET /health
list_routes
List all available routes GET /routes
rate_limit_middleware
Rate limiting middleware (placeholder for future implementation)
request_logging_middleware
Request logging middleware
start_server
Start the API server