This endpoint provides authentication-specific health information and system status.
This endpoint requires authentication and valid API access permissions.
Request
curl -X GET "https://api.g2cplatform.com/v2/auth/health" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response
{
"status": "healthy",
"timestamp": "2024-03-15T10:30:00Z",
"version": "2.0.0",
"services": {
"authentication": "healthy",
"tokenValidation": "healthy",
"userDatabase": "healthy"
}
}
Response Fields
| Field | Type | Description |
|---|
status | string | Overall auth system health: healthy, degraded, or unhealthy |
timestamp | string | ISO 8601 timestamp of the health check |
version | string | API version information |
services | object | Health status of authentication services |
services.authentication | string | Core authentication service status |
services.tokenValidation | string | JWT token validation service status |
services.userDatabase | string | User database connectivity status |
Error Responses
| Status Code | Description |
|---|
| 401 | Unauthorized - invalid or missing API key |
| 403 | Access denied - insufficient permissions |
| 503 | Service unavailable - authentication system is unhealthy |
| 500 | Internal server error |
Usage Notes
- This endpoint helps monitor the operational status of authentication services
- Regular health checks can be used for monitoring and alerting
- Authentication service status provides insight into login/logout functionality
- Token validation status indicates JWT processing health
- Use this endpoint to verify auth system availability before performing authentication operations