API Reference
Welcome to the Oddsmaker API Reference. This section provides detailed documentation for all API endpoints.
Base URL
http://localhost:8085/apiFor production deployments, replace with your actual domain.
Authentication
Most endpoints require authentication using JWT tokens:
bash
Authorization: Bearer YOUR_JWT_TOKENSome endpoints use API keys:
bash
x-api-key: YOUR_API_KEYAPI Versioning
The API uses URL versioning:
- v1:
/v1/- Current stable version - No version:
/api/- Latest version (may change)
Common Response Codes
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 409 | Conflict |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Response Format
json
{
"error": "Error Type",
"message": "Human-readable error message",
"timestamp": "2024-01-01T00:00:00Z",
"path": "/api/resource"
}Pagination
List endpoints support pagination:
bash
GET /api/games?page=0&size=20&sort=name,ascResponse format:
json
{
"items": [...],
"total": 100,
"page": 0,
"size": 20
}Rate Limiting
API endpoints are rate-limited:
- Default: 1000 requests per minute per API key
- Burst: 100 requests per second
Rate limit headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1700000060API Sections
Core APIs
- Games API - Game management
- Environments API - Environment management
- API Keys API - API key management
Analytics APIs
- Experiments API - A/B testing
- Events API - Event tracking
- Reports API - Report generation
Risk Management APIs
- Risk Rules API - Risk rule management
- Risk Cases API - Risk case management
- Block Lists API - Block list management
Advanced APIs
- ML Models API - Machine learning models
- Integrations API - External integrations
- Developer API - SDK and developer tools
System APIs
- Health API - Health checks
- Metrics API - Prometheus metrics
- Admin API - Administration
SDKs
Official SDKs are available for:
OpenAPI Specification
The OpenAPI specification is available at:
http://localhost:8085/v3/api-docsSwagger UI is available at:
http://localhost:8085/swagger-ui.htmlSupport
For API support: