Skip to main content
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

FieldTypeDescription
statusstringOverall auth system health: healthy, degraded, or unhealthy
timestampstringISO 8601 timestamp of the health check
versionstringAPI version information
servicesobjectHealth status of authentication services
services.authenticationstringCore authentication service status
services.tokenValidationstringJWT token validation service status
services.userDatabasestringUser database connectivity status

Error Responses

Status CodeDescription
401Unauthorized - invalid or missing API key
403Access denied - insufficient permissions
503Service unavailable - authentication system is unhealthy
500Internal 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