Replace Portainer container management service with Dockhand: - Update docker-compose.yml.template with Dockhand service definition - Replace portainer_data volume with dockhand_data - Update PORTAINER_PORT to DOCKHAND_PORT in demo.env - Update all script references (demo-stack.sh, demo-test.sh, validate-all.sh) - Update integration test from Portainer to Dockhand - Update documentation files (README.md, AGENTS.md, api-docs, service-guides, troubleshooting) Dockhand provides modern Docker management UI with: - Container lifecycle management - Compose stack orchestration - Git-based deployments - Multi-environment support - Terminal access and log streaming - File browser capabilities Maintains same port (4007) for consistency. 💘 Generated with Crush Assisted-by: GLM-4.7 via Crush <crush@charm.land>
TSYS Developer Support Stack - API Documentation
Service APIs Overview
This document provides API endpoint information for all services in the stack.
Infrastructure Services APIs
Docker Socket Proxy
- Base URL:
http://localhost:4005 - API Version: Docker Engine API
- Authentication: None (restricted by proxy)
- Endpoints:
GET /version- Docker version informationGET /info- System informationGET /containers/json- List containersGET /images/json- List images
Pi-hole
- Base URL:
http://localhost:4006/admin - API Version: v1
- Authentication: Basic auth (demo_password)
- Endpoints:
GET /admin/api.php- Statistics and statusGET /admin/api.php?list- Blocked domains listGET /admin/api.php?summaryRaw- Raw statistics
Dockhand
- Base URL:
http://localhost:4007 - Authentication: Direct Docker API access
- Features:
- Container lifecycle management
- Compose stack orchestration
- Git-based deployments
- Multi-environment support
- Terminal access
- Log streaming
- File browser
Monitoring & Observability APIs
InfluxDB
- Base URL:
http://localhost:4008 - API Version: v2
- Authentication: Token-based
- Endpoints:
GET /ping- Health checkPOST /api/v2/write- Write dataGET /api/v2/query- Query dataGET /api/health- Health status
Grafana
- Base URL:
http://localhost:4009 - API Version: v1
- Authentication: API key or Basic auth
- Endpoints:
GET /api/health- Health checkGET /api/dashboards- List dashboardsGET /api/datasources- List data sourcesPOST /api/login- Authentication
Documentation & Diagramming APIs
Draw.io
- Base URL:
http://localhost:4010 - API Version: None (web interface)
- Authentication: None
- Endpoints:
GET /- Main interfacePOST /export- Export diagramGET /images- Image library
Kroki
- Base URL:
http://localhost:4011 - API Version: v1
- Authentication: None
- Endpoints:
GET /health- Health checkPOST /plantuml/svg- PlantUML to SVGPOST /mermaid/svg- Mermaid to SVGPOST /graphviz/svg- GraphViz to SVG
Developer Tools APIs
Homepage
- Base URL:
http://localhost:4000 - API Version: None (web interface)
- Authentication: None
- Endpoints:
GET /- Main dashboardGET /widgets- Widget dataGET /bookmarks- Bookmark data
Atomic Tracker
- Base URL:
http://localhost:4012 - API Version: v1
- Authentication: Required
- Endpoints:
GET /api/habits- List habitsPOST /api/habits- Create habitPUT /api/habits/:id- Update habitDELETE /api/habits/:id- Delete habit
ArchiveBox
- Base URL:
http://localhost:4013 - API Version: v1
- Authentication: Required
- Endpoints:
GET /api/v1/core/health- Health checkPOST /api/v1/core/add- Add URLGET /api/v1/snapshots- List snapshotsGET /api/v1/snapshots/:id- Get snapshot
Tube Archivist
- Base URL:
http://localhost:4014 - API Version: v1
- Authentication: Required
- Endpoints:
GET /api/health- Health checkPOST /api/subscribe- Subscribe to channelGET /api/video/:id- Get video infoGET /api/search- Search videos
Wakapi
- Base URL:
http://localhost:4015 - API Version: v1
- Authentication: API key
- Endpoints:
GET /api/health- HeartbeatGET /api/summary- Time summaryGET /api/durations- HeartbeatsPOST /api/heartbeats- Add heartbeat
MailHog
- Base URL:
http://localhost:4017 - API Version: v1
- Authentication: None
- Endpoints:
GET /api/v1/messages- List messagesGET /api/v1/messages/:id- Get messageDELETE /api/v1/messages- Delete allPOST /api/v1/messages- Create message
Atuin
- Base URL:
http://localhost:4018 - API Version: v1
- Authentication: Required
- Endpoints:
GET /api/health- Health checkPOST /api/sync- Sync historyGET /api/history- Get historyPOST /api/history- Add history
API Usage Examples
Docker Socket Proxy Example
# Get Docker version
curl http://localhost:4005/version
# List containers
curl http://localhost:4005/containers/json
InfluxDB Example
# Write data
curl -X POST http://localhost:4008/api/v2/write \
-H "Authorization: Token demo_token_replace_in_production" \
-H "Content-Type: text/plain" \
--data-binary "measurement,field=value"
# Query data
curl -G http://localhost:4008/api/v2/query \
-H "Authorization: Token demo_token_replace_in_production" \
--data-urlencode "query=from(bucket:\"demo_metrics\") |> range(start: -1h)"
Grafana Example
# Get dashboards
curl -u admin:demo_password http://localhost:4009/api/dashboards
# Create API key
curl -X POST -u admin:demo_password \
http://localhost:4009/api/auth/keys \
-H "Content-Type: application/json" \
-d '{"name":"demo","role":"Admin"}'
Kroki Example
# Convert PlantUML to SVG
curl -X POST http://localhost:4011/plantuml/svg \
-H "Content-Type: text/plain" \
-d "@startuml
Alice -> Bob: Hello
@enduml"
Authentication
Demo Credentials
- Username:
admin - Password:
demo_password - API Keys: Use demo tokens provided in configuration
Token-based Authentication
# InfluxDB token
export INFLUX_TOKEN="demo_token_replace_in_production"
# Grafana API key
export GRAFANA_API_KEY="demo_api_key"
# Wakapi API key
export WAKAPI_API_KEY="demo_wakapi_key"
Rate Limiting
Most services have no rate limiting in demo mode. In production:
- Configure appropriate rate limits
- Implement authentication
- Set up monitoring
- Use reverse proxy for additional security
Error Handling
Common HTTP Status Codes
200- Success401- Authentication required403- Forbidden404- Not found500- Internal server error
Error Response Format
{
"error": "Error message",
"code": "ERROR_CODE",
"details": "Additional details"
}
Health Checks
All services provide health check endpoints:
GET /health- Standard health checkGET /ping- Simple ping responseGET /api/health- API-specific health
Development Notes
Testing APIs
# Test all health endpoints
for port in 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4017 4018; do
echo "Testing port $port..."
curl -f -s "http://localhost:$port/health" || \
curl -f -s "http://localhost:$port/ping" || \
curl -f -s "http://localhost:$port/api/health" || \
echo "Health check failed for port $port"
done
Monitoring API Usage
- Use Grafana dashboards to monitor API calls
- Check service logs for API errors
- Monitor resource usage with Docker stats
- Set up alerts for API failures
Security Considerations
Demo Mode
- All APIs are accessible without authentication
- No rate limiting implemented
- No HTTPS encryption
- Default demo credentials
Production Migration
- Implement proper authentication
- Add rate limiting
- Use HTTPS/TLS
- Set up API gateway
- Implement audit logging
- Configure CORS policies