Basic Configuration
Add an HTTP server to expose your database via REST API:API Endpoints
The HTTP server provides two main endpoints:- Execute endpoint:
POST /<base_path>/execute- Execute DQL queries - Health check:
GET /<base_path>- Simple health status
Security Considerations
Authentication
Edge Server supports API key authentication to protect your HTTP endpoints. See the Authentication guide for details on:- Generating API keys
- Configuring identities and permissions
- Securing your HTTP server
Network Access
The HTTP server allows binding to any listen address (e.g.,0.0.0.0 or [::]) to facilitate use inside Docker containers. When exposing the HTTP server to external networks:
- Always enable authentication in production
- Use TLS/HTTPS for encrypted connections
- Consider using a reverse proxy for additional security layers
Using the API
Query Examples
Execute a SELECT query:Docker Networking
When using Docker, ensure proper port mapping:Best Practices
- Use unique ports: Each HTTP server must bind to a different port
- Limit API access: Only enable the execute endpoint if needed
- Monitor health: Use the health check endpoint for monitoring
- Secure production: Always use a reverse proxy with authentication for external access
- Match database IDs: Ensure the
db_idexactly matches your DittoDatabase resource