API Documentation

Available API endpoints for the template

/api/config
GET
Get application configuration
curl http://localhost:3001/api/config
/api/health
GET
System health check
curl http://localhost:3001/api/health
/api/system
GET
System information
curl http://localhost:3001/api/system
/api/env
GET
Environment variables (public only)
curl http://localhost:3001/api/env
/api/features
GET
Feature flags status
curl http://localhost:3001/api/features
/api/features
POST
Update feature flag (demo)
curl -X POST -H "Content-Type: application/json" -d '{"feature":"newUI","enabled":true}' http://localhost:3001/api/features
/api/logs
GET
Get application logs
curl http://localhost:3001/api/logs?level=info&limit=10
/api/logs
POST
Create log entry
curl -X POST -H "Content-Type: application/json" -d '{"level":"info","message":"Test log"}' http://localhost:3001/api/logs
Testing the APIs
You can test these APIs using curl, Postman, or any HTTP client

Quick Test Commands:

# Test all GET endpoints
curl http://localhost:3001/api/config | jq
curl http://localhost:3001/api/health | jq
curl http://localhost:3001/api/system | jq
# Create a test log
curl -X POST -H "Content-Type: application/json" \
  -d '{"level":"info","message":"API test log"}' \
  http://localhost:3001/api/logs | jq